Ok, so I got some Philips Hue lights... they are a little pricey, but are a LOT of fun. I decided to slap together a VoiceAttack plugin just to see what could be done to make it more entertaining and for sharing with the group. Attached is the compiled plugin for use and a sample profile. The full source code (C#) will come soon, after I clean it up a bit and add some documentation (if you would like it sooner, just email me at support@voiceattack.com).
I made a goofy video to show it off:
https://youtu.be/7LquElrXVRA I'm not going to say what the captain showed me o_O
It uses the popular, 'Orion' pack from HCS (
http://www.hcsvoicepacks.com) plus some sounds found on the web.
The underlying Hue api is Q42.HueApiban :
https://github.com/Q42/Q42.HueApiInstalling
In the .zip attachment, you will find the VAHueDemo folder. Copy the WHOLE folder (folder and contents) into your Apps directory located in your VoiceAttack installation folder (usually C:\Program Files (x86)\VoiceAttack\Apps). When you start VoiceAttack, the plugin should be recognized as, 'VoiceAttack Hue Demo Plugin - v1.5.8+' (make sure you have turned on plugin support in options and restart VoiceAttack if needed).
Inside the VAHueDemo folder you just copied, you will find, 'SetupHueDemo.exe'. You will need to run this app first in order to associate the plugin with your Hue bridge.
If your bridge is dectected, it will show up in the list. You can also type in the ip address manually. Once a bridge/ip is indicated, click on, 'Register'. You'll have about 30 seconds to press the button on your bridge. If successful, the plugin will use the ip address provided and the app key that the bridge generates to talk to the bridge. Note that this plugin only supports one bridge for now.
Also inside the .zip, you will find a sample profile (Hue Demo-Profile.vap) with some of the commands used in the video
Note that the profile uses lights id'd as '1', '2' and '3'. Some sounds are included. Just copy the WHOLE, 'VAHueSounds' folder (folder and contents) into the Sounds folder in the VoiceAttack installation directory.
VAHueDemo Plugin Usage
First, add a plugin action to your command by clicking, 'other' then, 'advanced' and then 'Execute an External Plugin Function'.
Next, select the, 'VoiceAttack Hue Demo' plugin from the list.
All you have to do is just indicate what you want to do in the 'Plugin Context' field. There are just a few functions to do what you need to do, with some simple syntax.
onTo turn all the lights on, just type 'on' (no quotes) in the Context field. If you want to turn off a single light, type, 'on', then a colon, then the id of the light. The lights are usually id'd as, '1', '2', '3', etc. So, to turn on light, '1', type 'on:1' in the context field. To turn on multiple lights at the same time, type, 'on' a colon and then the ids separated by a comma. So, to turn on lights '1' and '3', type, 'on:1,3'.
offThe same procedure as, 'on'. To turn off all lights, just put 'off' in the context field. To turn off lights '1' and '3', type, 'off:1,3'.
resetThis does basically what turning off the power and turning it back on will do (resets he color and brightness). Just like 'on' and 'off', to reset all lights, just type, 'reset' in the context field. To reset just lights '1' and '3', type, 'reset:1,3'.
colorTo change the color of your lights, you need to get and provide the hex value of the color you would like them to be. A hex value simply a six-character code to represent the color. For example, 'ff0000' is red, '00ff00' is green, '0000ff' is blue, ffff00 is yellow and so on. The best way to find a color code is to open up Paint.NET or Photoshop (or other application with a color picker (unfortunately, MS Paint lacks a, 'hex' value indicator)). To change the color of all lights to red at once, type, 'color:ff0000' in the context box. To change the color of lights '1' and '3' to purple, type, 'color:1,3:ff00ff'.
brightBrightness has a value of 0 to 255 (dim to bright). To set the brightness of all lights to half, type, 'bright:128' in the context field. To set lights '1' and '3' to full brightness, type, 'bright:1,3:255'.
Note: Somehow a brightness of 0 does not turn the lights completely off... you'll need, 'off' to do that.
fadeFade will transition the brightness of your lights over time. You will need to provide the brightness on a scale of 0 to 255, plus the amount of time represented in milliseconds. To fade all of your lights to full brightness (255) over a period of 3.5 seconds (3500 milliseconds), type, 'fade:255:3500'. To fade lights '1' and '3' to half brightness (128) over four seconds (4000 milliseconds) type, 'fade:1,3:128:4000'.
Hope somebody can use it