@Camilo has asked how to send a notification if a door was left open and repeat until the door is closed.
This is a common scenario so I thought I would document the solution here.
NOTE: I use BOLD to describe names or values I use in this example. You can change at your discretion.
[hr]
A PLEG Instance called: Repeat Notification Example
The Attached pictures show the setup:
Inputs: DoorOpen bound to the Door Sensor that triggers when it is opened
Conditions: DoorLeftOpen = DoorOpen AND (DoorOpen; NOW > 5:00) LeftOpenRepeat = DoorLeftOpen AND ((LeftOpenRepeat; DoorOpen) OR (LeftOpenRepeat; NOW > 5:00))
Notification:
When Repeat Notification Example has satisfied condition LeftOpenRepeat.
You can also attach actions to the above conditions if you want to do more than just send a notification.
In this example I am using a 5 minute (5:00) delay. This is in both conditions.
You can have a different delay for the first notification and the repeat notifications.
[hr]
How it works:
[ul][li]The condition DoorLeftOpen will trigger when the Door is Left Open for the specified interval.
It will only trigger once after the door is open. So this does not help with a repeated notification.[/li]
[li]The conditon LeftOpenRepeat will trigger immediately when the previous condition becomes true.
This is because the following is true: DoorLeftOpen AND (LeftOpenRepeat; DoorOpen)
The second part is true because the Door was opened after the last time this condition was true.
So both conditions will trigger sequentially at the same time. We will hook our notification up to the LeftOpenRepeat condition.[/li]
[li]The use of NOW will cause these conditions to be evaluated every minute.
[list]
[li]The LeftOpenRepeat condition will then turn to false when NOW is evaluated within the next minute.
This is because during this period both of the following conditions are false
(LeftOpenRepeat; DoorOpen)
This is false because the Last occurrence of LeftOpenRepeat was after DoorOpen
(LeftOpenRepeat; NOW > 5:00)
This is false because it has not been 5 minutes since the last time LeftOpenRepeat was true.[/li]
[li]It will remain false until NOW is evaluated 5 minutes later and finds the DoorLeftOpen condition is still active. At that time the following will be true:
(LeftOpenRepeat; NOW > 5:00)
This will cause another notification of LeftOpenRepeat condition.
[/list]
And the cycle repeats as long as DoorOpen is left open.[/li][/ul]
[hr]
Some additional notes about the Notification Tab for the Repeat Notification Example device.
[ul][li]Note1: The first notification is actually the input triggers. Do not mess with this or it will delete your input triggers! This is only there if you have Input Triggers![/li]
[li]Note2: This is the actual Notification. I use the Vera Alerts Plugin to send this to my Android device. You can also have it email/sms you via MCV notifications[/li][/ul]
Thanks for this writeup - and for the plugins. This is exactly what I needed.
Two additional questions though:
-How do I tag this to a scene? Say I kick off a scene ‘Away from Home’ and I only want the notifications if the scene is active.
-Another use case is to monitor doors/windows when the A/C is on. So how do I tag this to when Thermostat is NOT idle?
I have small kids that leave doors open and a wife that forgets the garage door open. Monitoring and notification of open doors in specific scenarios is invaluable!
hello
I use these reminders successfully by cons I would like a reminder to prowl for ios or android veralert which indicates lastrip because I have a fixed message that says gate open for 30 minutes each reminder
is it feasible to have 30 minutes and 1 hour and then 1:30 etc …
with variable lastrip can not be?
thank you again for this great plugin that aisni veralert is great too
[quote=“RichardTSchaefer, post:10, topic:174490”]You can use Vera Alerts to forward the Notifications to your prowl plugin.
The Vera Alerts template will expand the text template before forwarding.[/quote]
thank you Richard
you have an example of this is our prowl with push notification and it is valid for all notifications or just the one I want?
good day
i have configured the plugin forward with pushnotification but how i can sent to my iphone ?
you have an example of this is our prowl with push notification and it is valid for all notifications or just the one I want?
i have configured the plugin forward with pushnotification but how i can sent to my iphone ?
This should be able to handle ANY notification in Vera.
Make sure the forward works.
In Vera Alerts Control Tab → Send-Alert
Recipient: Forward
Msg: A Test Message
Send - This should get sent to your Prowl device if setup properly.
Add a Notification or SendAlert action from Scene or PLEG Action.
Goto VeraAlerts Tab → Notification Configuration
Configure your userid to have a Vera Alerts Recipient of Forward.
Save Configuration.
Anytime you change any Notification in Vera … Add/Delete/change destination … open the last tab … and save.
In that same tab you can override the default notification message using the template example I provided.
you have an example of this is our prowl with push notification and it is valid for all notifications or just the one I want?
i have configured the plugin forward with pushnotification but how i can sent to my iphone ?
This should be able to handle ANY notification in Vera.
Make sure the forward works.
In Vera Alerts Control Tab → Send-Alert
Recipient: Forward
Msg: A Test Message
Send - This should get sent to your Prowl device if setup properly.
Add a Notification or SendAlert action from Scene or PLEG Action.
Goto VeraAlerts Tab → Notification Configuration
Configure your userid to have a Vera Alerts Recipient of Forward.
Save Configuration.
Anytime you change any Notification in Vera … Add/Delete/change destination … open the last tab … and save.
In that same tab you can override the default notification message using the template example I provided.[/quote]
Very good job it’s wonderful
many thanks
just a little last thing
to change the name of the event in prowl with veraalert I can not do what is the syntax
thank you
i have
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”,
{Message = " {DateTime({device([59].service[urn:micasaverde-com:serviceId:SecuritySensor1].LastTrip)}, %A %B %d %Y %H:%M)}", Recipients = “Forward” , Event = “{Garage}”}, 126)
yes thank you for this example.
allthough i have the plugin installed, i have not made use of it yet. i can use this example for my refridgerator-door sensor so im gonna use it.
also considering using it for my rear window.
could also use it in reverse so it would notify if a door is left closed. (i hate closed doors)
Thanks, I caught that and posted the wrong screenshot. With that fixed the message goes away but I receive the alert @ 5 mins but never a repeat follow up alert.