Occupancy for lighting

Posted on
Sat Dec 29, 2018 12:56 pm
peszko offline
Posts: 311
Joined: Mar 07, 2012

Occupancy for lighting

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.

Posted on
Sat Dec 29, 2018 4:38 pm
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Occupancy for lighting

peszko wrote:
(BTW virtual devices don't seem to support DSC plugin sensors)


Yeah, the DSC plugin predates some of the API functionality that the Device Group virtual device needs. There are other group/scene type devices in the Plugin Store that may help however.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Dec 29, 2018 4:56 pm
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Occupancy for lighting

Have you checked out the Alarm Zone Group device type in the DSC plugin? It may be what you're looking for.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Dec 29, 2018 4:56 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Occupancy for lighting

I use the group trigger to do the same using any one of multiple alarm PIRs to trigger. That turns on lights then triggers, or restarts if already running, a timed devices timer(can't remember which one) that when runs out, turns off the lights. So if door is opened when lights about to go off, it restarts the timer to give another 5 mins.
Should hopefully make your setup easier. Also thinking about it, look at the EPS extensions for device that gives time since last tripped. Could also be used in a schedule? Ie check every minute all relevant ones are greater than 5 mins then turn off lights.
That's one group trigger to turn on lights, one EPS extension device per PIR to track time since activation and one schedule to to turn them off?


Sent from my iPhone using Tapatalk

Posted on
Sat Dec 29, 2018 7:50 pm
peszko offline
Posts: 311
Joined: Mar 07, 2012

Re: Occupancy for lighting

jay (support) wrote:
Have you checked out the Alarm Zone Group device type in the DSC plugin? It may be what you're looking for.


I haven't considered this one. I'll investigate it a bit.

Posted on
Sat Dec 29, 2018 7:57 pm
peszko offline
Posts: 311
Joined: Mar 07, 2012

Re: Occupancy for lighting

siclark wrote:
I use the group trigger to do the same using any one of multiple alarm PIRs to trigger.


Yes, this looks like a good idea. I rewrote my garage problem using this, and indeed this simplified things. I'll let it run for couple days to see if everything works correctly. I'd still wish for a plugin, that could do it all. Something like a virtual occupancy device that takes other devices and variables as inputs, has setting for what constitutes on or off, how much time to wait etc... I may have to bite the bullet and write one.

Posted on
Sun Dec 30, 2018 2:04 pm
peszko offline
Posts: 311
Joined: Mar 07, 2012

Re: Occupancy for lighting

Sure enough, I turned off notifications when I updated the logic. I have to fix that. But that brings a question regarding triggers and actions. Is there a significant performance penalty in having multiple triggers with one action as opposed to one trigger with multiple actions?

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests