Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Saving current state (Off/On) to restore later

Featured Replies

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

Hi Rick,

 

Currently no, but it's surely on our todo list.

 

With kind regards,

Michel

  • 1 year later...
  • Author

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?

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

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')

  • Author

Thanks polexian - I never thought of it that way, I shall give it a try!

  • 1 year later...

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.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.