Author Topic: Have Vera execute VoxCommando commands  (Read 3404 times)

0 Members and 1 Guest are viewing this topic.

naveen

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 1
    • View Profile
Have Vera execute VoxCommando commands
« 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

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Have Vera execute VoxCommando commands
« Reply #1 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

TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Have Vera execute VoxCommando commands
« Reply #2 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
« Last Edit: June 06, 2014, 09:47:50 AM by nime5ter »

naveen

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 1
    • View Profile
Re: Have Vera execute VoxCommando commands
« Reply #3 on: June 06, 2014, 11:30:05 AM »
Awesome, thanks for the resources!

naveen

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 1
    • View Profile
Re: Have Vera execute VoxCommando commands
« Reply #4 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

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Have Vera execute VoxCommando commands
« Reply #5 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
« Last Edit: June 07, 2014, 10:54:09 PM by jitterjames »

naveen

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 1
    • View Profile
Re: Have Vera execute VoxCommando commands
« Reply #6 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")
« Last Edit: June 08, 2014, 12:26:35 AM by naveen »