Blocky One Time Only

Moderator: leecollings

Post Reply
Andree
Posts: 74
Joined: Wednesday 07 June 2017 11:19
Target OS: Windows
Domoticz version:
Contact:

Blocky One Time Only

Post by Andree »

Hi to all,
i want to set an event for notify me when time to work is over 30 minutes.
i have made this blocky and work fine but at every time the script "time to work" run and the result is over 30 minutes i receive a notification!
how can i set "IF time to work > 30" from 7:30 to 8:30 send ONLY ONE TIME a notifications...." ?
Thx!
Traffic.JPG
Traffic.JPG (36.53 KiB) Viewed 2409 times
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Blocky One Time Only

Post by pvm »

Can you use a user variable or dummy switch to monitor whether you've already send the message
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Blocky One Time Only

Post by tozzke »

add a variable (in this case a string variable with the value 'no') in the if-statement as well as in the output.
Something like:

Code: Select all

If [your if now] and [[var time_to_work_notification_sent?] = ["no"]]
Do [Set [var time_to_work_notification_sent?] = ["yes"]]
   [Send notification...]
Else if [Time > 9:00] and [var time_to_work_notification_sent?] = ["yes"]
Do [Set [var time_to_work_notification_sent?] = ["no"]]
This way the notification wil only be sent once because the if-statement is no longer true after it triggers
Andree
Posts: 74
Joined: Wednesday 07 June 2017 11:19
Target OS: Windows
Domoticz version:
Contact:

Blocky One Time Only

Post by Andree »

pvm wrote:Can you use a user variable or dummy switch to monitor whether you've already send the message
Can you explain how can i use user variables for this target?
Andree
Posts: 74
Joined: Wednesday 07 June 2017 11:19
Target OS: Windows
Domoticz version:
Contact:

Re: Blocky One Time Only

Post by Andree »

tozzke wrote:add a variable (in this case a string variable with the value 'no') in the if-statement as well as in the output.
Something like:

Code: Select all

If [your if now] and [[var time_to_work_notification_sent?] = ["no"]]
Do [Set [var time_to_work_notification_sent?] = ["yes"]]
   [Send notification...]
Else if [Time > 9:00] and [var time_to_work_notification_sent?] = ["yes"]
Do [Set [var time_to_work_notification_sent?] = ["no"]]
This way the notification wil only be sent once because the if-statement is no longer true after it triggers

Thx! I can try when arrive at home !
Andree
Posts: 74
Joined: Wednesday 07 June 2017 11:19
Target OS: Windows
Domoticz version:
Contact:

Re: Blocky One Time Only

Post by Andree »

Thx work perfectly!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest