Short Answer - It partially works right out of the box in that you can do associations outside of Indigo. Without any difficulty you can also get Indigo to recognize a scene on to trigger other devices.
I'm quite dissatisfied with the lack of Indigo support for z-wave scene switches and ranted about this to Matt in another post. He said the standard is pretty murky for these devices and I don't disagree but other controllers support them.
I tried other scene switches and like this one the best (the Enerwave wouldn't function at all). It's easy to set up associations completely outside of Indigo and they work great along with the dimmer/brightness buttons.
If you want to use it as a switch device inside Indigo you have to make some hacks. I first wrote a plug-in to parse the z-wave commands but ditched that effort due to Indigo's lack of support for getting z-wave data.
If you want to use it to trigger something inside Indigo the first thing you notice is you get the trigger four times. The second thing is you won't get a trigger when the scene is turned off. (You can see the commands from the switch and it expects some responses it's not getting.)
But I did some stupid tricks to get more functionality without any plug-in programming. Create actions groups for ON and OFF for each scene (total of
. Here's what I did for scene 1 to turn it on (do similarly for each scene):
Create a variable named "activeScene"
Create a variable named "activationTime"
Create a trigger for each scene. In the trigger condition type this in script box: value of variable named "activeScene" ≠ "1"
-- so on for each scene number, this keeps the trigger to just once when a button is pressed instead of four
In the actions
set variable activeScene to 1
insert timestamp into variable activationTime
execute action group "Scene 1 ON"
Now you can do as much as you want in the action group. Unfortunately there is no OFF command in Indigo so you have to hack one. Here's how I did that for Scene 1 example:
Create a trigger for z-wave event of "Any Command" for the scene controller device. There are no conditions in mine. In the actions I embedded a python script like this:
- Code: Select all
import datetime
from datetime import datetime
activationTime = indigo.variables[1713199174].value
#indigo.server.log("deactivate scene check")
if len(activationTime) > 0:
d = datetime.now() - datetime.strptime(activationTime, u"%Y-%m-%d %H:%M:%S.%f")
if d.seconds > 1:
# deactivate active scene
activeScene = indigo.variables[638950871].value
indigo.server.log("deactivate active scene " + activeScene)
indigo.variable.updateValue(1713199174, u"")
indigo.variable.updateValue(638950871, u"") # "activeScene"
if activeScene == u"1":
indigo.actionGroup.execute(1675121130) # "Scene 1 OFF"
elif activeScene == u"2":
indigo.actionGroup.execute(1665871737) # "Scene 2 OFF"
# and so on for each scene
What this does is detect the button pressed again and executes the associated action group.
There is no way of capturing the dimming button without a sacrificial device (one you can mirror changes). It's really a hack but it works for me for now. Hopefully Matt will realize we need some support for extending z-wave devices. You can't even get the z-wave data packets in the "Any Command" event. (I'm close to ranting so better quit.)
I like having this in a room with the Hue lights so I can control saved presets using Sheldon's Hue Plug-in from simple buttons. This enables anyone in my house to control without having to give access to the full system. Overall I like the Leviton stuff but they're expensive.