Page 1 of 2

Scene Toggle Plugin

PostPosted: Thu May 19, 2016 1:20 pm
by Colorado4Wheeler

Scene Toggle is just as the name implies, lets you toggle on and off a scene. While this functionality exists in Indigo already by using virtual devices this plugin takes it a step further.

The scene device lets you choose which On/Off or Dimmable devices in your network that you want included in the scene. You set the devices to be off, on or the brightness you desire and the device takes a "snapshot" of the devices for the scene.

When you turn on your scene device then your snapshot is activated, but also the current state of your devices is saved. When you turn off the scene it restores the pre-scene state of your devices (i.e., "Lamp" was on before the scene, but the scene dims the lamp to 20%, when you turn off the scene "Lamp" returns to the pre-scene state of "On"). You can also opt to have all devices in the scene simply turn off when the scene is turned off and ignore their previous state.

Other features of this allows you to execute action groups before and after turning the scene on or off (giving even more flexibility as to what you want your scenes to be) and optional live updating of your scene meaning if the scene is on and you change a device in the scene it will be saved at that state for the next time the scene is used.

The nice thing about this plugin is that you can activate multiple overlapping scenes easily. For example a movie scene may dim two lights and turn off the rest, while the intermission scene may turn the lights on and when you turn of intermission it will automatically restore back to the movie scene.

I have a few other features that are half-programmed in but not active at the moment like turning off the scene after X minutes and allowing you to change a light level while the scene is active and have that light level remain at that state when the scene is turned off - both experimental and works in progress.

The device supports On, Off and Toggle so you can easily create a single button on a control page to manage the scene and know if it's active or not.

Download and Installation

Install according to the Indigo documentation.

Create a "Scene Device" for each scene you want to have. From there you select your devices to include, set the options and you are ready to go.

Download Plugin (Indigo File Library)

Release Notes

  • May 19, 2016 (1.0.0):
    • Initial release

Configuration and Use

Select all of the devices to be included in the scene (command-click to select multiple items). You can save it like this and it will work or utilize the other options:

  • Live Update: If selected you can use this instead of taking a snapshot of the scene, so you select your devices and save the configuration. Once saved, you then turn On the Scene Device itself. From here simply set the lights in the scene to whatever level you want them, when you turn the Scen Device off again those settings will be stored
  • Do Not Restore: The plugin will store the current states of all devices in the scene before it changes them all to match your snapshot, once your device is turned off all of the devices will return to their previous state. By enabling this option you are telling the plugin to ignore the previous state and always return the devices in the scene to an Off state
  • Actions: If you want to incorporate action groups into your scene you can choose to execute those groups for the four stages of this plugins use: before turning on, after turning on, before turning off and after turning off
  • Clear Actions: There is no simple method to select "none" in the action list popups, this will clear ALL actions. This is useful if you decide you no longer want to execute something, say, after the scene is turned off - however you will need to re-select the other actions you may want to still execute
  • Take Snapshot: This will only show up if you do NOT have Live Update selected. Clicking this button will store the CURRENT states of all devices in the scene so it knows what to turn on/off or dim/brighten when you turn the scene on

To use the plugin you treat it like any other Indigo device by turning it On to turn the scene on or turning it Off to turn the scene off.

You can have multiple scenes active at the same time, each on will restore itself to the state you have configured.

Screen Shot 2016-05-19 at 1.18.28 PM.png
Screen Shot 2016-05-19 at 1.18.28 PM.png (484.11 KiB) Viewed 5270 times

Examples of Use

  • Example: Turn off all the lights in the movie theater except for one that you want to be at 25% brightness
    • Device: Set your scene up manually in Indigo by turning off all the lights and setting the one lamp to 25%. Then create the Scene Device and include all of those devices then click "Take Device Snapshot" to store their states
    • Control Page: Create a button to toggle your scene and indicate if it is on or off:
      • Action: Toggle scene On/Off
      • Image 1: Button.png (scene is Off)
      • Image 2: Button+on.png (scene is On)
  • Example: In addition to changing the light levels in Example 1, you also want to send an IR command to your iTach device to turn the projector on. Since the Scene Device only supports On/Off commands you need to create action groups for the iTach and add them to your scene device:
    • Write action group to turn on the projector using your iTach and test it called "Projector On"
    • Write action group to turn off the projector using your iTach and test it called "Projector Off"
    • In your Scene Device enable "Actions", set the After Turned On event to "Projector On" and the After Turned Off event to "Projector Off"

Re: New Plugin: Scene Toggle

PostPosted: Thu May 19, 2016 1:56 pm
by jay (support)
Published. Thanks for another plugin contribution!

Re: New Plugin: Scene Toggle

PostPosted: Mon May 23, 2016 10:03 am
by Colorado4Wheeler
A lot of folks may not have seen this get posted so I'm replying to bump it in the forums so you know it's out there :).

Re: New Plugin: Scene Toggle

PostPosted: Thu May 26, 2016 11:58 pm
by howartp
Great plugin; will switch to it when I get time.

Sent from my iPhone using Tapatalk

Re: Scene Toggle Plugin

PostPosted: Sun Aug 21, 2016 10:20 am
by dz1rfj
Outstanding! Saved hours of logic development I realized I needed the night before when we had two lamps on under our deck turned on, and the dogs on the deck above us, tripped the nighttime motion to turn on the outside lights for the dogs to do their business....

Well, the dogs get only 10 minutes of light, because they are usually pretty quick to do their business, then all the lights turn off in the backyard, but these two lamps are part of that group, so our company was left in the dark.

Checked this forum, and Viola, problem solved. Works great! Many thanks :D

Re: Scene Toggle Plugin

PostPosted: Sun Aug 21, 2016 10:24 am
by Colorado4Wheeler
That's awesome, thanks for sharing your experience :).

Re: Scene Toggle Plugin

PostPosted: Thu Sep 01, 2016 9:51 am
by dz1rfj
HI - Quick question: Since this is not a normal on off device, is it possible to use this in a python script, and if so, what needs to be changed below:

I want a delay in my script to run it 45 seconds after the trigger

Code: Select all
indigo.device.TurnOff(62867821, duration=1, delay=45) # "BackYard-CaptureLightStatus"


Re: Scene Toggle Plugin

PostPosted: Thu Sep 01, 2016 10:04 am
by Colorado4Wheeler
It is a normal on/off device, so that command should work fine.

Re: Scene Toggle Plugin

PostPosted: Thu Sep 01, 2016 10:30 am
by dz1rfj
I was able to get it in my script, but I had to create two separate action groups to do it, then I executed the STORE or RESTORE (on or off) as needed.
The scene device does not seem to appear as an on off, there is no turn off or turn on button, or send status request button on the indigo dashboard, so I assumed it was not a normal on off device.

If you have it working , and I missed something, please let me know if I may have an old version of the plugin, or missed something.

This would prevent me from having to create two action groups for each scene I create, and that would be great.

- Brian

Re: Scene Toggle Plugin

PostPosted: Thu Sep 01, 2016 10:38 am
by Colorado4Wheeler
It's possible that I have an newer version, I have done some updates that I'll release soon. I thought I had released the version that converted it to an on/off but I could be mistaken. Regardless, a new version is coming out pretty soon.

Re: Scene Toggle Plugin

PostPosted: Thu Sep 01, 2016 10:46 am
by dz1rfj
Excellent, I'll look out for it :)

Re: Scene Toggle Plugin

PostPosted: Thu Dec 08, 2016 2:29 am
by brentb
I've recently purchased First Alert Onelink smoke and CO detectors, and the Insteon smoke bridge for use with them. I'd like to save the state of lighting, ventilation, and possibly door locks, when an 'alarm event' is triggered from smoke or CO, so I can issue commands to turn on all lighting, shut off the furnace fan, and unlock doors, then when an 'all clear' is issued somehow, I'd like to revert everything to its previous state.

Can this plugin do that?

Re: Scene Toggle Plugin

PostPosted: Thu Dec 08, 2016 9:44 am
by Colorado4Wheeler
As long as the devices you are referring to have On/Off and optionally Dim options available then it sounds like it will.

Re: Scene Toggle Plugin

PostPosted: Tue Feb 14, 2017 3:04 am
by colinpartridge
Am I correct in thinking that this plugin doesn't support virtual devices? Have been trying to toggle a virtual device, which appears in the device list, but doesn't toggle as expected with the other devices selected.


Re: Scene Toggle Plugin

PostPosted: Tue Feb 14, 2017 9:22 am
by Colorado4Wheeler
If the device support on/off command then it should. Does your virtual device work fine otherwise?