Jump to content

Emergency All On/Off, State, etc


cayz

Recommended Posts

Posted

I am on a Staycation this week, so I'm looking to improve my Insteon system.

 

I used to have an X10 system, and used the All Lights On, and was looking to do something similar on my 8 buton KPLs (I have 1 button "reserved" for this on all of them). I have a house with 12 lights, 4 ceiling fans, and a 4 controllers.

 

I am also a "classically-trained" programmer, which may be what is getting in my way :lol: .

 

-------------

 

First, I'm trying to set the system to remember its state when the Emergency-All button is hit. I was thinking of using a variable "HouseState", and doing binary arithmetic ("If Kitchen Sink is ON then $HouseState |= 8", etc. for all 12 lights.)

 

Is there a way to do all 12 of these without having to write 12 programs (one for each IF statement) ?

 

Sub-question: if I do this using 1 variable, are there any math / test functions that will make the comparision easier (e.g MOD(HouseStatus,8) or using HouseStatus |= 8 as a condition)? Or is this an additional 12 programs (one for each variable)?

 

-------------

 

Second, is there a way to (in one command) read the statuses all of the devices in the household, perhaps send back as a list or something.

 

------------

 

I can't be the first person to do this, but my searches on "Emergency" or "All ON" have not proven fruitful. Pointers to existing posts are also welcome.

 

Or just tell me that variables are cheap, use 1 per light, and be done with it!

 

Thanks.

 

James

Posted

“Is there a way to do all 12 of these without having to write 12 programs (one for each IF statement) ?â€

 

No. Also keep in mind that if any are dimmers a test for On is looking for 100% On Level.

 

“Second, is there a way to (in one command) read the statuses all of the devices in the household, perhaps send back as a list or something. “

 

The ISY keeps track of device status so there is no need to physically Query each device.

 

 

It can be a challenge to implement a “save current state†and “restore current state laterâ€. In the future it is anticipated that ISY Variables will be able to store current device state and have that information used later to restore a device. If dimmers are used it gets really difficult because only ranges of On Level can be realistically checked without having to write hundreds of Programs to check for each possible On Level and then Restore each possible On level.

Posted
I am also a "classically-trained" programmer, which may be what is getting in my way

Yes, that appears to be a problem for some

 

Is there a way to do all 12 of these without having to write 12 programs (one for each IF statement) ?

None that I can think of. This sounds like a case where nested statements would be useful, but I don't believe ISY has such capability. Are you trying to remember exact state (10%, 50%, full on)?

 

Is there a way to do all 12 of these without having to write 12 programs (one for each IF statement) ?
I believe the answer is the same. The only possibility that I can think of would be if you were able to come up with some variable value for each that, when added all together, would result in an unambiquous result. Taking a simple example of two devices, with $device1=1 (for on) and $device2 = 2 (for on), adding them together would result in a value of anything from zero to three. Zero = none on. One = device1 on and device2 off. Two = device2 on and device1 off. Three = both devices on. Obviously this is a bit more complicated with 12 devices.

 

Second, is there a way to (in one command) read the statuses all of the devices in the household, perhaps send back as a list or something.

 

I believe you can query "my lighting"

 

Regarding the all on command, I approach this via a combination of scenes and programs. I have found it valuable to maintain a couple of generic scenes: All (interior) and All (exterior). In my case, all devices are defined as responders. I use those scenes in several different programs. One is a program to shut off all lights at a prescribed time. One is to turn on all exterior lights as a result of a keypad button press. A third is, as you desire, to turn off all light (interior and exterior) in response to a button press. This has worked for me.

 

Alternatively, I believe (have not tried) that you can create a program to turn off "my lighting" in response to an insteon command, such as a keypad button press.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      372k
×
×
  • Create New...