Author Topic: how to trigger door open for 30 minutes alert  (Read 278 times)

Offline Mickeytech2000

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
how to trigger door open for 30 minutes alert
« on: July 10, 2018, 01:55:59 am »
I am trying to program an scene to alert me when the garage door is open for 30 minutes. I have both tilt and door sensors installed but only door sensor is accurate.  How do I achieve this?
The sensor only has triggers for: An armed sensor is tripped or A sensor (door/window/motion/etc.) is tripped.

Any help is appreciated.

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: how to trigger door open for 30 minutes alert
« Reply #1 on: July 10, 2018, 09:18:06 am »
Reactor will do this. Set up a service condition on the door sensor with a "sustained for" option of 30 minutes.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline wrathwielder

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +1/-0
Re: how to trigger door open for 30 minutes alert
« Reply #2 on: July 10, 2018, 10:40:43 am »
As rigpapa mentioned, Reactor is one way to do what you want...if you want to see the issue discussed in greater detail, check out this thread for a lot more info as people tried to help me and another person do exactly what you are trying to do :)
I didn't end up using Reactor, but got it working using another suggestion that didn't involve a plug-in (just a little code added to the scene)

http://forum.micasaverde.com/index.php/topic,87408.0/topicseen.html

-Greg
« Last Edit: July 10, 2018, 10:42:37 am by wrathwielder »

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: how to trigger door open for 30 minutes alert
« Reply #3 on: July 10, 2018, 12:42:01 pm »
@wrathwielder just be aware that any solution that involves scene Lua and timing will fail if Luup reloads or Vera reboots during the timing cycle. Scene triggers are edge-sensitive, so when Luup reloads, if the scene was triggered before the reload/reboot, it is not retriggered until the scene condition resets and trips again (e.g. the door sensor reads closed and then reopen), the timing event will have been lost, and any delayed actions of the scene or Lua timer/delay callback will never run. Fixing this is a major feature of both Reactor and PLEG.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline Mickeytech2000

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: how to trigger door open for 30 minutes alert
« Reply #4 on: July 10, 2018, 02:10:59 pm »
Thank you, guys, for the information. I am new to this. What is a Reactor and how do I get it? Thanks again.

Offline Mickeytech2000

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: how to trigger door open for 30 minutes alert
« Reply #5 on: July 10, 2018, 02:31:00 pm »
I found the Reactor plugin and installed it. But it says: Reactor : Incompatible firmware

Offline wrathwielder

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +1/-0
Re: how to trigger door open for 30 minutes alert
« Reply #6 on: July 10, 2018, 04:37:05 pm »
@wrathwielder just be aware that any solution that involves scene Lua and timing will fail if Luup reloads or Vera reboots during the timing cycle. Scene triggers are edge-sensitive, so when Luup reloads, if the scene was triggered before the reload/reboot, it is not retriggered until the scene condition resets and trips again (e.g. the door sensor reads closed and then reopen), the timing event will have been lost, and any delayed actions of the scene or Lua timer/delay callback will never run. Fixing this is a major feature of both Reactor and PLEG.
Hi rigpapa!
Yes, good point! In the OP's case he should use the plug-in since he is looking for a way to reliably tell when the door has been open for 30 mins...
In my case, I just have a simple scene that runs every 60 minutes (using the built-in timing "interval" trigger option) and runs the Lua code to tell me if the door is currently open (not the actual switch from one state to the other - just current status) so if Luup reloads or the Vera reboots, the scene timer will just start over with it's 60 minute checks - so it could definately be shorter or longer than 60 minutes...which is OK in my scenario since I just want it to tell me when I spaced out and forgot to close the garage door :)

-Greg

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: how to trigger door open for 30 minutes alert
« Reply #7 on: July 10, 2018, 06:21:21 pm »
I found the Reactor plugin and installed it. But it says: Reactor : Incompatible firmware

Are you on UI5?
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline kigmatzomat

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +11/-0
Re: how to trigger door open for 30 minutes alert
« Reply #8 on: July 10, 2018, 07:30:28 pm »
Other option is PLEG. I had something similar where the doors would lock themselves after being closed a couple minutes.

Offline Mickeytech2000

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: how to trigger door open for 30 minutes alert
« Reply #9 on: July 10, 2018, 11:49:49 pm »
I found the Reactor plugin and installed it. But it says: Reactor : Incompatible firmware

Are you on UI5?

Yes, I am on UI5. I have about 100 devices on it and a lot of Scenes and security sensors programmed. Tried upgrading Firmware and 80% of the existing devices failed. Any work around?

Offline Mickeytech2000

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: how to trigger door open for 30 minutes alert
« Reply #10 on: July 10, 2018, 11:55:18 pm »
@wrathwielder just be aware that any solution that involves scene Lua and timing will fail if Luup reloads or Vera reboots during the timing cycle. Scene triggers are edge-sensitive, so when Luup reloads, if the scene was triggered before the reload/reboot, it is not retriggered until the scene condition resets and trips again (e.g. the door sensor reads closed and then reopen), the timing event will have been lost, and any delayed actions of the scene or Lua timer/delay callback will never run. Fixing this is a major feature of both Reactor and PLEG.
Hi rigpapa!
Yes, good point! In the OP's case he should use the plug-in since he is looking for a way to reliably tell when the door has been open for 30 mins...
In my case, I just have a simple scene that runs every 60 minutes (using the built-in timing "interval" trigger option) and runs the Lua code to tell me if the door is currently open (not the actual switch from one state to the other - just current status) so if Luup reloads or the Vera reboots, the scene timer will just start over with it's 60 minute checks - so it could definately be shorter or longer than 60 minutes...which is OK in my scenario since I just want it to tell me when I spaced out and forgot to close the garage door :)

-Greg

Hi Greg, can you please show me where to find this built-in timing "interval" trigger option in UI5? I just need it to tell me if I forget to close the garage door, too. Thanks.

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: how to trigger door open for 30 minutes alert
« Reply #11 on: July 11, 2018, 07:58:38 am »
Quote
Are you on UI5?

Yes, I am on UI5. I have about 100 devices on it and a lot of Scenes and security sensors programmed. Tried upgrading Firmware and 80% of the existing devices failed. Any work around?
[/quote]

Reactor is currently UI7 only, and there's no quick workaround. I will take a stab at it, but I'm about to be away for a week, so timingwise probably not until end of the month. Sorry about that!
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.