How send notification few minutes after events_

Moderator: leecollings

Post Reply
scatman
Posts: 17
Joined: Wednesday 26 August 2015 23:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Location: Poland
Contact:

How send notification few minutes after events_

Post by scatman »

Hi
I need help you!
Can I ask for example events in wicht I send notification in few minutes after events?
THX
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: How send notification few minutes after events_

Post by jannl »

Easiest way (I think) would be start a bash script, wait the desired time and sens the notification via json.
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: How send notification few minutes after events_

Post 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.
scatman
Posts: 17
Joined: Wednesday 26 August 2015 23:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Location: Poland
Contact:

Re: How send notification few minutes after events_

Post 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.
scatman
Posts: 17
Joined: Wednesday 26 August 2015 23:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Location: Poland
Contact:

Re: How send notification few minutes after events_

Post 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?
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: How send notification few minutes after events_

Post 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
Jan Jansen
Posts: 229
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: How send notification few minutes after events_

Post 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
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: How send notification few minutes after events_

Post 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.
scatman
Posts: 17
Joined: Wednesday 26 August 2015 23:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Location: Poland
Contact:

Re: How send notification few minutes after events_

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest