Page 1 of 1

Virtual switch Question

PostPosted: Mon Jan 02, 2017 6:45 pm
by clawmd
I have a virtual switch that manages a bunch of lights. I am trying to get this to work on a control page, but it doesn't seem to work like a normal device i.e. on/off
Is there a best practice for turning a group of devices on/off on a control page?

Re: Virtual switch Question

PostPosted: Tue Jan 03, 2017 10:42 am
by jay (support)
What "virtual switch" are you using?

Re: Virtual switch Question

PostPosted: Tue Jan 03, 2017 3:03 pm
by clawmd
I a using a virtual device as a means to control a group of lights.

Re: Virtual switch Question

PostPosted: Tue Jan 03, 2017 4:30 pm
by jay (support)
If you're using a Virtual On/Off device then it should work exactly as any other on/off switch does on a control page. If you are trying to use the toggle action you must make sure you specify a toggle action and that your device supports status either by watching a status variable or by having your on and off action groups set the device status correctly.

Re: Virtual switch Question

PostPosted: Tue Jan 03, 2017 6:05 pm
by clawmd
I am using the virtual device as a on off switch that can be used by Amazon Echo by way of the Hue bridge. Simple, On turns all lights on and Off does the opposite. I am assuming that the "toggle option" is what I need to address. I will need to set a variable called Lights that has values of On or Off and is somehow kept current. I then see two options:
1. Create an Action group that turns lights on or off based on the variable Lights. This action group would be entered as the "Toggle Group" in the "Supports Toggle" section
2. Select Lights as the "Status Variable" in the "Configure virtual on/off device" dialog. Presumably toggling can occur in this situation without selecting "supports toggle"

Does this seem like a logical direction to head in?

Re: Virtual switch Question

PostPosted: Wed Jan 04, 2017 6:08 pm
by jay (support)
There are some options as I mentioned above. You will need a toggle action group either way. You don't need the variable if your action groups also include an action to set the on state of the device correctly whenever they turn them on or off (Type is Device Actions->Virtual Device Controls->Set Virtual On/Off Device State)