Notify when a garage door sensor has been open for X minutes

Subject says it all. I have a sensor that can tell the status of my garage door, but I am looking for a way for Vera to notify me if it has been left open for say 20 minutes.

I did this before using PLC but somewhere along the way, that code was broken or got eaten by an upgrade.

Can someone point me in the right direction ? Does PLC even work anymore? I tried to see use it and replicate what I had done in the past, but was unable to.

Thanks in advance,

H

I am using PLEG based on this example
[url=http://forum.micasaverde.com/index.php?topic=13874.0]http://forum.micasaverde.com/index.php?topic=13874.0[/url]

Another way to do this is using the plugin Countdown timer
[url=https://apps.mios.com/plugin.php?id=1588]MiOS Apps. Create a scene that triggers when your garage port opens and start the timer. Create another scene that cancel the timer when your garage port is closed. Finally create a scene to notify when when the timer is up.

Thanks I am playing around w/ the Timer app now. Seems like this may be it, If I can figure it out :slight_smile:

Edit: It took a bit of experimenting, but the Timer app approach appears to be working. Thanks.

No problem. Here is what I use. Pulled the code from another thread. Note I am using vera alert. 3600 sec or 1 hour. No plugins required! Forgot to mention it is triggered by the door being opened in the scene, and this goes in the execute code area with the proper ID for your sensor.

local dID = 35 – Device ID of garage door sensor

function delayitplease()
if( luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,35)==“1” ) then
luup.call_action(“urn:intvelt-com:serviceId:HWPuush1”, “SendMessage”, {Msg = “Close Garage Door!”}, 6)
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”,
{Message = “{tone:2} Garage Door Open.”, Recipients = “”}, 37)
end
end
if( luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,dID)==“1” ) then
luup.call_delay(“delayitplease”,3600)

end

Sent from my iPad using Tapatalk

Cool… thanks. I may try to use this code!