pwmcmaho Posted Tuesday at 12:39 AM Share Posted Tuesday at 12:39 AM As the subject says, is there anyway to have any off event to any insteon device trigger the if condition logic of a program? TLDR: I have a nighttime program that runs and turns on some lights ... however, I need to trap when any of those lights are turned off, either by themselves or through other programs and then turn them back on. Currently I use a variable to keep track of the nighttime status and then a big ol nasty OR blob for a bunch of the devices that are most likely to turn one of the devices in the nighttime scene off ... but that can be a bit much to manage... so looking for something easy. Thanks! Quote Link to comment
Guy Lavoie Posted Tuesday at 01:29 AM Share Posted Tuesday at 01:29 AM It depends on what you mean by if they're turned off "by themselves". By someone manually turning one off? One way might be to use the "Virtual" plugin to create a virtual light that gets turned on at the beginning of the night, and then make all these night lights controllers for a scene that turns that virtual light on or off. That way if one of them is turned off, the virtual light also turns off, and you could have a single IF statement looking for the status change to off for that virtual light, during the night time. Just an idea that I haven't tested. Quote Link to comment
larryllix Posted Tuesday at 03:57 AM Share Posted Tuesday at 03:57 AM Each device needs it's own program eg. If device sends control Off and time is sunset to sunrise (next day) (or nightime variable) Then Turn device on Else -- Quote Link to comment
dbwarner5 Posted Tuesday at 06:27 PM Share Posted Tuesday at 06:27 PM Two other options: 1). A long IF with ALL the lights you have in that scene separated by ORs, that if switched off (during the time period you want ), then maybe wait 30 seconds and then turn the scene back on. example: IF From 9pm until 6am next day AND ( Light A is switched off or Light B is switched off of light c is switched off ) THEN wait 30 seconds,. turn scene "nighttime" on Or 2) Just turn that scene on every 10 minutes during the duration you want it on, so it will "self correct" w/o any monitoring needed. example: IF From 9pm until 6am THEN repeat every 10 minutes Turn "nighttime" scene on. The advantage of this technique is that you can have in your scene all the other lights that you want off to turn off as well, again w/o monitoring I have use both techniques above for different scenarios. For my Bedtime scene. I probably have 30 lights included in it so I use the "every 10 minutes" technique but I think I use 20 minutes so that if someone goes out to the kitchen and turns a light on to see they have in theory anywhere from 0-20 minutes that the light will stay on, and then it goes off. Not always ideal, but it works w.o monitoring all 30 lights as to which are turned on, which are turned off etc. Quote Link to comment
xlurkr Posted Tuesday at 06:34 PM Share Posted Tuesday at 06:34 PM 17 hours ago, Guy Lavoie said: ...make all these night lights controllers for a scene that turns that virtual light on or off. Would this work? I thought controllers for scenes are always responders too. Wouldn't this plan make the single manually switched-off light turn off all the lights that are controllers in the scene, and not just the virtual light? -Tom Quote Link to comment
Guy Lavoie Posted Tuesday at 09:56 PM Share Posted Tuesday at 09:56 PM 3 hours ago, xlurkr said: Would this work? I thought controllers for scenes are always responders too. Wouldn't this plan make the single manually switched-off light turn off all the lights that are controllers in the scene, and not just the virtual light? -Tom It's a conceptual idea, that I haven't tested. But I can picture that kind of thing possibly working. Devices can both be controllers and responders (like we do with virtual 3 way circuits) or not, like in many scene applications. That's the big advantage with Insteon: the multiple linking concept. You'd be testing for the virtual light getting turned off, during the nighttime, which shouldn't occur according to your description of the way it's supposed to work. I'd test it with a couple of switches. Quote Link to comment
pwmcmaho Posted yesterday at 01:38 AM Author Share Posted yesterday at 01:38 AM All interesting ideas ... Thanks! Currently I am using @dbwarner5 option 1 ... which does work ... I do include a random repeat of 2-4 times just to give some backup in case a message gets lost. @Guy Lavoie - that is an interesting idea ... basically the challenge with building programs is that while you might take an action based on an event, other actions can unintentionally interfere with the intended desire of the original program (e.g. keep a collection of lights on during a period of time) ... @larryllix - That is an interesting idea ... and I might do that one ... my hesitation is that I will need to create one of those programs for each device AND each program to ensure that all the programs are covered ... Might be a little bit easier to go for the MASSIVE if statement that @dbwarner5 suggested ... hmmm.. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.