Page 1 of 1
How send notification few minutes after events_
Posted: Tuesday 10 November 2015 23:30
by scatman
Hi
I need help you!
Can I ask for example events in wicht I send notification in few minutes after events?
THX
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 7:25
by jannl
Easiest way (I think) would be start a bash script, wait the desired time and sens the notification via json.
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 8:27
by Egregius
To be clear: if an event (motion, contact whatever) occurs, you want to wait several minutes before sending the notification? Does the event still need to be 'actual' at that point?
I think you need to explain a bit more the situation. I want notification to be sent asap, before burglars might cut the power.
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 8:48
by scatman
Egregius wrote:To be clear: if an event (motion, contact whatever) occurs, you want to wait several minutes before sending the notification? Does the event still need to be 'actual' at that point?
I think you need to explain a bit more the situation. I want notification to be sent asap, before burglars might cut the power.
Yes, if an event (motion, contact whatever) occurs, I want to wait several minutes before sending the notification! For example when my door garage stay open for 5 minutes I want get notification of them.
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 8:51
by scatman
jannl wrote:Easiest way (I think) would be start a bash script, wait the desired time and sens the notification via json.
Maybe but I don't know how I can do

Can you me introduce step by step?
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 8:53
by jannl
I would have to google a lot as well, nothing I did yet.
But I think there example scripts for what you want in wiki
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 9:13
by Jan Jansen
You can create an virtual switch (for example named notification). Set on delay of this switch as you wish and off delay at for example 5 sec.
Blockly
if ... (trigger device) is on
do set notification on
if notification is on
do sent notification
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 10:12
by Egregius
scatman wrote:Egregius wrote:For example when my door garage stay open for 5 minutes I want get notification of them.
Oh, that way. I have that in my PHP script
Code: Select all
if($Spoort!='Closed') {if(xcache_get('alertpoort')<$time-900&&$STpoort<$time-900) {$msg='Poort Open sinds '.strftime("%H:%M:%S", $STpoort);xcache_set('alertpoort',$time);telegram($msg);}}
This sents a telegram every 900 seconds if the port is open for more than 900 seconds.
Re: How send notification few minutes after events_
Posted: Wednesday 11 November 2015 12:45
by scatman
Jan Jansen wrote:You can create an virtual switch (for example named notification). Set on delay of this switch as you wish and off delay at for example 5 sec.
Blockly
if ... (trigger device) is on
do set notification on
if notification is on
do sent notification
THX I used this advice.