Jump to content

Saving current state (Off/On) to restore later


RickL66

Recommended Posts

Posted

Is there a way to save the current state of a few devices to restore them to their original state later?

 

Example - I may have my kitchen under-cabinet lights dimmed 40%, my den lights on, the hall lights off, and after doing a global all-off, I want to restore the kitchen under-cabinet lights back to 40% dim, the den lights back on, and the hall lights off if they were turned on after the global all-off.

 

Thanks,

Rick

  • 1 year later...
Posted

Hi Michel - Just want to see if you have ever gotten to this "to-do" and made it possible to save the current state of some devices to restore back to the saved state?

Posted

Rick, I beleive you could do it with variables and programs. This is for straight on and off.

 

Variables

MainLight1

MainLight2

 

Program 1(Disabled)Name:CurrentStateMainLight1

If 
mainlight1 is on
then
variable Mainlight1 = 1//(For on)
else
variable MainLight1 = 0//(For off)

 

Program 2(Disabled)Name:CurrentStateMainLight2

If 
mainlight2 is on
then
variable Mainlight2 = 1//(For on)
else
variable MainLight2 = 0//(For off)

 

In any program you want to remember the states then call the program you need to remember the states with. The above programs will only run when called because they are not enabled.

 

When you turn the scenes back on with a program then run these programs for each light in the scene.

Program3(Disabled)Name:Mainlight1RestoreState

If variable MainLight1=1
then
insteon.mainlight1 = on
else
Insteon.mainlight1 = off

 

Program4(Disabled)Name:Mainlight1RestoreState

If variable MainLight2=1
then
insteon.mainlight2 = on
else
Insteon.mainlight2 = off

Posted

Now for dimmed lights you can use this program for the nearest 10 or however specific you want to go all the way to 1.

 

If
       Status  'Equiptment / DiningRoom / LightDining' >= 90%
   And Status  'Equiptment / DiningRoom / LightDining' <= On

Then
       $CurrentStateMainLight1 += 10

Else
  - No Actions - (To add one, press 'Action')

  • 1 year later...
Posted

I'm doing something similar with about 20 devices so am only going to 25% increments for the dimmable ones to cut down on the number of programs (i.e., Off -> Off, 1-25% -> 25%, 26-50% -> 50%, etc.). My goal was to restore the prior state after turning off a scene.

 

However, I'm not storing the state of the devices in variables but instead in a dedicated "Prior State" scene using Adjust Scene when the associated devices change state. I feel this is a more simple (don't need the multiple "restore the status" programs for each device / dim value range, not to mention all of those pesky variables), durable (survives a power failure) and aesthetically pleasing approach -- I just have to turn the "Prior State" scene on just like any other scene and that's it.

Posted

But it sure would be nice if ISY allowed a set device state or adjust scene command to take a variable or even another device state as input so we wouldn't have to mess around with these dimmable state ranges in the first place... :wink:

Guest
This topic is now closed to further replies.

×
×
  • Create New...