Hi,
I have 2 different blocky programs to send an message when the door is longer open then x time and to send an message when it's closed.
I use for this an extra "marker" that I can set to on and off.
But when the door is closed I get always the message the same time that the door is open and closed.
Somebody an idea what I'm doing wrong.
Blocky program don't work
Moderator: leecollings
- phoenixblue
- Posts: 76
- Joined: Friday 25 November 2016 11:20
- Target OS: Windows
- Domoticz version:
- Contact:
-
- Posts: 14
- Joined: Friday 23 August 2019 10:11
- Target OS: Windows
- Domoticz version: 2020.2
- Location: Belgium
- Contact:
Re: Blocky program don't work
Hi phoenixblue,
I hope I understand you correctly, here's my view.
The 600s timer is still going even if you closed the door.
As soon as the door opens, in any case the marker will go to ON after 600s.
And right after it the door is already close and it will switch back to OFF, giving you the double message in an instant.
Here's what i would do:
IF "Door open" and "Marker OFF"
DO "Marker on after 600"
ELSEIF "Door open" and "Marker ON" - triggered after 600s
DO "send message: door open"
ElSEIF "Door closed" and "Marker ON" - triggered after 600s
DO "Marker off"
ElSEIF "Door closed" and "Marker OFF" - trigger if door closed within 600s
DO "log: closed in time"
Downside, if you try to close the door and it fails, it will not retrigger this event because for Domoticz the door switch did not change state and the event does not get triggered again. That's of course a minor detail as you will double check physically it is closed.
Kind regards
Daan
I hope I understand you correctly, here's my view.
The 600s timer is still going even if you closed the door.
As soon as the door opens, in any case the marker will go to ON after 600s.
And right after it the door is already close and it will switch back to OFF, giving you the double message in an instant.
Here's what i would do:
IF "Door open" and "Marker OFF"
DO "Marker on after 600"
ELSEIF "Door open" and "Marker ON" - triggered after 600s
DO "send message: door open"
ElSEIF "Door closed" and "Marker ON" - triggered after 600s
DO "Marker off"
ElSEIF "Door closed" and "Marker OFF" - trigger if door closed within 600s
DO "log: closed in time"
Downside, if you try to close the door and it fails, it will not retrigger this event because for Domoticz the door switch did not change state and the event does not get triggered again. That's of course a minor detail as you will double check physically it is closed.
Kind regards
Daan
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blocky program don't work
The timer 'After 600 seconds' is still active even though you close the door before that timer ends. So it'll turn on 'Deur marker' after 600 seconds regardless and when it does, the second blockly is triggered because of the condition 'and Deur marker = On'
If you want to do it in Blockly then you should disable the notification on the switch 'Deur marker' (you will need this switch though because Domoticz/Blockly won't trigger on variables correctly) and make it into one blockly to prevent this so you'll get something like this:
I've tested this and it seems to work just fine (you should change the 10 seconds to your desired delay).
I get a notification after the given time that the door is opened too long, I don't get one when I close it before the timer/delay ends and I do get one again after it's closed after being open too long (so not every close of the door as you'd get with a notification on the switch itself)
If you want to do it in Blockly then you should disable the notification on the switch 'Deur marker' (you will need this switch though because Domoticz/Blockly won't trigger on variables correctly) and make it into one blockly to prevent this so you'll get something like this:
I've tested this and it seems to work just fine (you should change the 10 seconds to your desired delay).
I get a notification after the given time that the door is opened too long, I don't get one when I close it before the timer/delay ends and I do get one again after it's closed after being open too long (so not every close of the door as you'd get with a notification on the switch itself)
Who is online
Users browsing this forum: No registered users and 0 guests