Occupancy for lighting
Posted: Sat Dec 29, 2018 12:56 pm
I have lights turn on and off based on several sensors. To do this, I have plenty of triggers, variables and conditions setup. This is very error prone, difficult to maintain and replicate. I'm sure there has to be a better way like a plugin.
So, example. I have a garage that I want to light up when things are happening in it. I have one occupancy sensor, one DSC (alarm) motion sensor, main door (dsc), side door (dsc) and the door to the house (dsc). All DSC sensor are instantaneous so motion turns on and off immediately. What I want is the light to come on if any of the doors are opened, or if any of the motion sensor are tripped. I want the light to go off, several minutes after the last sensor reported. So if not doors were opened or closed and no motion detected for several minutes the lights go off. As soon as any of them report then lights go on. (BTW virtual devices don't seem to support DSC plugin sensors)
I have this done using variables and triggers, but this requires 6 status variables plus virtual occupancy variable plus timing variables, 12 triggers (two per device for on and off plus two for final virtual occupancy on and off to actually turn the lights on/off)
I went to edit this today to add one more sensor and after a bit of fiddling, I decided that there has to be a better way.
Hope somebody has a suggestion on how best to do this, or possibly a plugin that does most of the nitty gritty.
So, example. I have a garage that I want to light up when things are happening in it. I have one occupancy sensor, one DSC (alarm) motion sensor, main door (dsc), side door (dsc) and the door to the house (dsc). All DSC sensor are instantaneous so motion turns on and off immediately. What I want is the light to come on if any of the doors are opened, or if any of the motion sensor are tripped. I want the light to go off, several minutes after the last sensor reported. So if not doors were opened or closed and no motion detected for several minutes the lights go off. As soon as any of them report then lights go on. (BTW virtual devices don't seem to support DSC plugin sensors)
I have this done using variables and triggers, but this requires 6 status variables plus virtual occupancy variable plus timing variables, 12 triggers (two per device for on and off plus two for final virtual occupancy on and off to actually turn the lights on/off)
I went to edit this today to add one more sensor and after a bit of fiddling, I decided that there has to be a better way.
Hope somebody has a suggestion on how best to do this, or possibly a plugin that does most of the nitty gritty.