Author Topic: possible bug with xml payload  (Read 8270 times)

0 Members and 2 Guests are viewing this topic.

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
possible bug with xml payload
« on: October 09, 2010, 07:20:21 PM »
hi james

i've created a xml file based payload (phrases and values) which contains all my devices which are controllable in my homecinema.

i'm using it as a payload in two commands.... as soon as i use it in a third command i get an unhandled exception thrown: " rule reference not defined in this grammar.

also... when i right click and copy my xml payload definition in a command i get a pop up windows with the number 2 in it ?!

Marcel


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #1 on: October 09, 2010, 07:39:26 PM »
i've created a xml file based payload (phrases and values) which contains all my devices which are controllable in my homecinema.

i'm using it as a payload in two commands.... as soon as i use it in a third command i get an unhandled exception thrown: " rule reference not defined in this grammar.
that sounds like a fun one! :bonk  If you don't mind, zip up your whole folder, add a .jpg (to get it past gmail) as the file extension and email it to me.  Or you can just .rar it gmail only hates .zip nor .rar

also... when i right click and copy my xml payload definition in a command i get a pop up windows with the number 2 in it ?!
yes, that's a remnant from debugging.  I've removed it from the current version which I hope to post in the next couple of days.  But don't let it bother you  ;D

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #2 on: October 09, 2010, 07:52:34 PM »
email sent :-)

thank you for your effort !!

marcel

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #3 on: October 10, 2010, 10:27:46 AM »
i've created a xml file based payload (phrases and values) which contains all my devices which are controllable in my homecinema.

i'm using it as a payload in two commands.... as soon as i use it in a third command i get an unhandled exception thrown: " rule reference not defined in this grammar.

I haven't tracked down the cause yet, but a workaround seems to be to move the 3rd command into a new group.

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #4 on: October 10, 2010, 10:41:07 AM »
thanks for the feedback.... i'll give it try.

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #5 on: October 10, 2010, 10:46:06 AM »
update: i have created a new group for each of the four payload commands and so far it seems to at least load them without errors.

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: possible bug with xml payload
« Reply #6 on: October 10, 2010, 03:18:13 PM »
Explain to me how you manage your devices with the vox, I was interested if you can send your configuration file, I see how you did, you can attach the file in the same post, thanks
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #7 on: October 10, 2010, 05:43:33 PM »
which devices?

The TV I control with eventGhost.  I have a wmc remote that has an ir blaster on it.   There is a wire that runs to the ir receiver of the tv and a small ir emmitter is taped there.  I use the EG plugin created by Stottle for this.

I turn the lights, fan and stereo on and off with x10.  X10 is by far the cheapest homevautomation stuff available, but it has a lot of drawbacks too.  Controlling the x10 stuff is very simple using a command line utility that comes with the x10 sdk.  You can send simple commands using VC Launch with parameters.  I can provide more info if you are more specific about what you are interested in.

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: possible bug with xml payload
« Reply #8 on: October 10, 2010, 06:00:26 PM »
James, vou postar em português, eu já havia visto o filme em que mostra o comando de seus aparelhos eletrônicos através do vox, mas aquilo me pareceu algo muito sofisticado, eu uso controle de iluminação via Infrared, também possuo um controle WMC com blaster, e ainda tenho o controle remoto do PS3 - blue tooth que uso para controlar o xbmc via eventghost (funcioma super bem, mas o consumo de pilhas é absurdo.
Minha sala tem receiver onkyo, blu ray oppo bd 83, ps3, projetor full hd da optoma, além do próprio htpc. Tenho um controle remoto da Logitech o Harmony 880...enfim, é uma sala dedicada com muitos equipamentos para controlar, voz eu acho sensacional, mas minha experiência com hardware e voz é quase nulo.
Sou apenas um curioso em saber como funciona...não tenho automação X10, mas sei do que se trata.
« Last Edit: October 10, 2010, 06:30:22 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #9 on: October 11, 2010, 06:48:23 AM »
for me this is:

i use eventghost to automate everything in my homecinema through either serial connection or ir (using usb-uirt). I do use voxcommando to say for instance: activity <xbmc> on <beamer> .... for <xbmc> and <beamer> i've created an xml file based payload to trigger eventhost macros.

The reason for choosing the xml file based "approach" is simply because i'm to lazy... and i'd like to define my devices and possible destination screen only once in vc :-)

Marcel

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #10 on: October 11, 2010, 09:29:27 AM »
this is a very large topic.  If you are interested in controlling a variety of devices, then it is worth taking some time to learn more about how to use eventGhost.  Any action in EventGhost can be initiated (and passed payloads) by VoxCommando.  VoxCommando can also be controlled by eventGhost.  If you have any specific questions I will try to help.

The one thing I will mention off the top of my head, is that I have a ps3 remote that I find extremely useful.  It is true that the battery life is very poor, but I have installed a simple switch on mine and if I remember to turn it off when I am not using it it lasts much longer.  Also, if you have a Widcomm bluetooth device, I think there is a version of the ps3 plugin for eventGhost that will automatically put the remote to sleep when not in use.  There is a long thread about this on the EG forums.  I also, use rechargeable batteries with my ps3 remoted and if you have 4, you can swap them 2 for 2 every few days.  It's worth it, because I really love the responsiveness of this remote, and the layout of the buttons.

I don't have any experience with serial devices (rs-232).  For any particular device that you want to control there is probably a plugin and a forum thread dedicated to it, on the EG forums.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #11 on: October 11, 2010, 09:31:52 AM »
btw it is possible to have x10 control directly from VC, but since there is no demand for it I will not add the extra code to VC.

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: possible bug with xml payload
« Reply #12 on: October 11, 2010, 10:47:30 AM »
Obrigado pelas dicas, penso que isto possa lhe interessar: Já que estão implementado no eventghost, suporte a JsonRPC para controle do XBMC .
http://www.eventghost.org/forum/viewtopic.php?f=10&t=1562&start=145

Eu testei e funcionou perfeitamente, vou seguir suas dicas para o controle do PS3.

Vou ler e me inteirar melhor no forum do Eventghost.

www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #13 on: October 11, 2010, 10:55:52 AM »
let me know if you discover any useful functions in that plugin that we are not already able to do directly from VC

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #14 on: October 11, 2010, 12:06:54 PM »
Also, if you have a Widcomm bluetooth device, I think there is a version of the ps3 plugin for eventGhost that will automatically put the remote to sleep when not in use. 

or use the "BD Remote Power Manager" tool (google for it) if you're NOT running on windows 7 x64!

am i hijacking my own thread ?  :bonk

Marcel

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: possible bug with xml payload
« Reply #15 on: October 11, 2010, 12:20:05 PM »
My http runing in OS win7 64bits, obrigado mesmo assim.
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #16 on: October 11, 2010, 12:22:48 PM »
I've tried that and it is too buggy to be of any use.  It disabled ALL your bluetooth devices, and the idle timeout times out even if you are using the remote.  The developer seems to have given up on the project...  Do you actually use that Marcel?

BTW, it's also not ideal, but you can put the remote to sleep by holding down the button for 6 (I think?) full seconds.

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #17 on: October 11, 2010, 12:49:40 PM »
yes i use it with the windows stack on windows 7 x86!

the only bluetooth device i'm using on my EG Host is the PS3 remote :-)... so i have no issues with disconnecting ALL bluetooth devices.

Yeah... sometimes the idle timeout fires while using the remote... but this is very very rare in my case... maybe 1-2 times a week.... then wait a few seconds... and i works again.

for me this was the cleanest solution without doing any nasty tricks/scripts in EG while still using the latest ps3 plugin.

Marcel

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #18 on: October 11, 2010, 02:08:22 PM »
well for me it would always time out every (x) seconds no matter what.  It was really annoying.  I can't remember if I was on x86 or x64 when I tried it last.  Are you sure it doesn't work on x64?

Wanilton, do you know what bluetooth stack you are using?  The usual options are Microsoft builtin-in, Widcomm, and BlueSoleil, and maybe a toshiba stack...

We have hijacked this quite nicely.  I suppose I should move all this chatter to a special "not about VoxCommando" topic!

I'm uploading a whole bunch of new features in a minute with version 0.83 if you want to test.

http://voxcommando.com/mediawiki/index.php?title=ChangeLog

http://voxcommando.com/forum/index.php?topic=101.0

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #19 on: October 11, 2010, 02:25:09 PM »
cool.... will this new version also solve the problem of this, hijacked ;-) , thread ?

Marcel

BTW: BD Power Manager will DEFINITELY NOT work on x64.... tried it!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #20 on: October 11, 2010, 02:32:56 PM »
I guess, since we are now talking about VC again... :-\

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #21 on: October 11, 2010, 02:38:45 PM »
well... it sort of ;-)

remember the workaround to put those file into separate folders ?.... no i get an error:  "_1 rule reference not defined" just after my first folder with the xml payload file is processed !?

Marcel

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #22 on: October 11, 2010, 02:40:58 PM »
moving the commands back into one folder doesn't work either :-(

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #23 on: October 14, 2010, 04:55:13 PM »
i don't want to push anything.... just wondering if you've found the problem... or if i can assist you with something ?

marcel

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #24 on: October 14, 2010, 05:04:23 PM »
just saw that there is a 831 version and gave it a try... it now loads without errors... but i still can't put all the commands into one folder :-)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #25 on: October 14, 2010, 05:48:41 PM »
I know what the problem is but there is no real solution.  I have found that if I load the payloads one way it can sometimes cause an error with certain complex* commands.  If I load the payloads another way (less efficient) it may work with those commands and not with others.

So VC will try the efficient way first, and if that fails, it will try the less efficient way, and if that fails, it should at least tell you which group is causing problems, and then load everything else.  I think it only double-fails if you put a bunch of complex* commands into a single group.

I am 99.9% sure that this is a glitch in the windows speech API.  They probably don't know about it, probably will never find out, and probably wouldn't care even if they did.

Anyway I feel the problem is basically solved.  VC does the most efficient thing that works, and if that fails you just need to break up your commands into groups.  Until we encounter a (real) command that won't work even when it is in its own group, I'm not going to spend waste any more time (or hair  ;)) on it. 

Note that you can break your group up into multiple groups of the same name.  That way you can still use the same enable and disable group commands and it should enable/disable them all.  If not there are new commands which enable and disable groups using substring matching.

(* by complex commands I mean commands that use multiple XML pair payloads where phrases are mapped to values.)

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #26 on: October 14, 2010, 05:59:44 PM »
ok...i'm fine with that  ;D ;D

version 832 works for me now... with separate folders though... but that cool for me ;-)

actually i'm glad that i'm using "advanced" features :-)

marcel

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #27 on: October 31, 2010, 08:46:47 PM »
do you have any news/progress about this "issue"... or still status quo ? .... just wondering! :-)

any idea why this:
Code: [Select]
       <command name="turnonoffdevice" enabled="true" confirm="False" loop="False" loopDelay="0" loopMax="0">
            <action>
                <cmdType>EventGhost</cmdType>
                <cmdString>statecontrol</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <payloadFromXML>C:\_Applications\VoxCommando\powerstates.xml</payloadFromXML>
            <payloadFromXML>C:\_Applications\VoxCommando\devices.xml</payloadFromXML>
        </command>

is causing vc to crash (windows error reporting)

powerstates.xml contains payloads with values like: "on,power on"
devices.xml contains payload with values like: "dvbviewer, satellite"

Marcel
« Last Edit: October 31, 2010, 08:48:27 PM by derelict »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #28 on: October 31, 2010, 10:38:49 PM »
does it crash when you load it or when yo try to execute the command?

you need to have a phrase somewhere in there, you can't just use payloads alone.  If it crashes when you issue the command it's because it can't figure out which actual command you mean, and so it doesn't know where to look for the actions to perform.

I should probably write some more robust error reporting for this (and other) situations.

derelict

  • $upporter
  • Jr. Member
  • *****
  • Posts: 47
  • Karma: 0
    • View Profile
Re: possible bug with xml payload
« Reply #29 on: November 01, 2010, 01:26:31 PM »
Yes... It crashes as soon as i say one possible combination of the two payloads.

I can "solve" it with a phrase like "state" in the beginning... But it would be cooler to be able to say like:

"Power off" "television"

Instead of:

"state" "power off" "television"

Whereas "state" is the phrase.

Can this be fixed somehow?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: possible bug with xml payload
« Reply #30 on: November 01, 2010, 07:53:44 PM »
mmm, well it might not be the solution you want but the end effect will be the same.  You need to create a separate command for each powerstate.  I figure you've only got two or three actual states right?  Just create one command, and then clone it and change the phrases etc.

There isn't really another way because the command needs to be associated with a word, and the other words have payloads associated with them.  It's the way the MS engine works.  I can tell it that the user is going to say one of these things, and it will have this value.  One of those words has to have the value that points to the list of actions defined in the command builder.

The only other way around it would be to create a group with only one command in it and then it would know, ok if it is in this group it must be using this command, because it is the only one, but I would have to change the code, and for most people I think this would be confusing.