VoxCommando

Help and Support (Using VoxCommando) => Vera Home Automation Controller => Topic started by: naveen on June 06, 2014, 08:47:37 AM

Title: Have Vera execute VoxCommando commands
Post by: naveen on June 06, 2014, 08:47:37 AM
I'm not sure if this is doable...but I'm hoping I can set a Vera scene to execute a voxcommando command on my HTPC. The reason for this is that sometimes I want to be able to activate a scene without a voice command (say via the vera remote app or a wall scene controller) and I'd like to take advantage of some of the great iTunes and XBMC integration capabilities of vox commando (since I can't find another easy way to play XBMC or iTunes).

Naveen
Title: Re: Have Vera execute VoxCommando commands
Post by: nime5ter on June 06, 2014, 09:19:49 AM
Welcome to the forum. Yes, you can certainly do that. Integration among devices, software etc. is what VC is all about.

You can use either voice commands or events to trigger commands in VC. Events can be generated by all sorts of things, including Vera scenes.

If you haven't yet checked them out, take a look at the Vera tutorial video and the Fireside Chat 3. The latter demonstrates using a Vera event (motion detected) to send a gmail message. The same principle can be used to trigger other commands in your VoxCommando tree. http://voxcommando.com/mediawiki/index.php?title=Video_Tutorials

See also:
http://voxcommando.com/mediawiki/index.php?title=Customizing_Commands
http://voxcommando.com/mediawiki/index.php?title=Events

Title: Re: Have Vera execute VoxCommando commands
Post by: jitterjames on June 06, 2014, 09:25:45 AM
You need to enable "Generate Events" in the Vera plugin settings:

http://voxcommando.com/mediawiki/index.php?title=Vera_Configuration
Title: Re: Have Vera execute VoxCommando commands
Post by: naveen on June 06, 2014, 11:30:05 AM
Awesome, thanks for the resources!
Title: Re: Have Vera execute VoxCommando commands
Post by: naveen on June 07, 2014, 10:18:34 PM
I figured out how to get the events working, but now I've got a bit more of a problem. It seems that over at the Vera forums they don't think it is a Vera issue - so maybe its VoxCommando?

I've described the problem at the micasaverde forums: http://forum.micasaverde.com/index.php/topic,25462.0.html
Title: Re: Have Vera execute VoxCommando commands
Post by: jitterjames on June 07, 2014, 10:44:59 PM
Well in fact the Vera does send a message to VoxCommando whenever a scene becomes "true" and another message whenever a scene becomes "false".  A scene is true if all the devices are set according to the way the scene is defined.  I will need to take a closer look at the actual messages that Vera is sending to see if there is any difference between a scene that has been "requested" and a scene that has simply become true by the devices being set a particular way.

If this situation does not work for you, then you will either need to create a different scene somehow (If you add a virtual light switch to the scene then maybe this will prevent the scene event from occurring by accident), or you can use lua to send a message to VoxCommando from Vera.   This is relatively easy to do if you know how to add lua to a scene.  I think that Vera only executes the lua code for a scene when the scene is triggered, and not when the scene becomes "true".

http://voxcommando.com/forum/index.php?topic=1357.msg11693#msg11693
Title: Re: Have Vera execute VoxCommando commands
Post by: naveen on June 08, 2014, 12:06:59 AM
Thank you! It seems fairly easy to program in the commands to send to VC so I'll give that a shot.

Edit:
This is actually a much more elegant solution, it runs much more quickly than using the trigger from the Vera plugin and requires one simple command for me:
sendVC("iTunes.rqPlaylist&&Relaxing")