Scene Toggle Plugin

Posted on
Thu May 19, 2016 1:20 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Scene Toggle Plugin

Introduction

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 5329 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"

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu May 19, 2016 1:56 pm
jay (support) offline
Site Admin
User avatar
Posts: 16344
Joined: Mar 19, 2008
Location: Austin, Texas

Re: New Plugin: Scene Toggle

Published. Thanks for another plugin contribution!

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon May 23, 2016 10:03 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: New Plugin: Scene Toggle

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 :).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu May 26, 2016 11:58 pm
howartp offline
Posts: 4158
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: Scene Toggle

Great plugin; will switch to it when I get time.


Sent from my iPhone using Tapatalk

Posted on
Sun Aug 21, 2016 10:20 am
dz1rfj offline
Posts: 115
Joined: Mar 13, 2016

Re: Scene Toggle Plugin

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

Posted on
Sun Aug 21, 2016 10:24 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Scene Toggle Plugin

That's awesome, thanks for sharing your experience :).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Sep 01, 2016 9:51 am
dz1rfj offline
Posts: 115
Joined: Mar 13, 2016

Re: Scene Toggle Plugin

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"


Thanks

Posted on
Thu Sep 01, 2016 10:04 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Scene Toggle Plugin

It is a normal on/off device, so that command should work fine.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Sep 01, 2016 10:30 am
dz1rfj offline
Posts: 115
Joined: Mar 13, 2016

Re: Scene Toggle Plugin

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.

Thanks
- Brian

Posted on
Thu Sep 01, 2016 10:38 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Scene Toggle Plugin

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.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Sep 01, 2016 10:46 am
dz1rfj offline
Posts: 115
Joined: Mar 13, 2016

Re: Scene Toggle Plugin

Excellent, I'll look out for it :)

Posted on
Thu Dec 08, 2016 2:29 am
brentb offline
Posts: 29
Joined: Jan 20, 2014

Re: Scene Toggle Plugin

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?

Posted on
Thu Dec 08, 2016 9:44 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Scene Toggle Plugin

As long as the devices you are referring to have On/Off and optionally Dim options available then it sounds like it will.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Feb 14, 2017 3:04 am
colinpartridge offline
Posts: 352
Joined: Jan 13, 2014
Location: London, UK

Re: Scene Toggle Plugin

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.

Colin

Posted on
Tue Feb 14, 2017 9:22 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Scene Toggle Plugin

If the device support on/off command then it should. Does your virtual device work fine otherwise?

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Who is online

Users browsing this forum: No registered users and 0 guests