Mutliple events
Posted: Saturday 30 March 2024 13:00
Hi Guys,
I am posting this here, as it's switch related.
I am having an issue where a specifi bash script is triggered to run more than once. I know why, but not how to surpress it.
I have several EspEasy devices, with all kinds of sensors and they all work flawlessly except for the one with a doorbell switch.
What happens is this, doorbell button is pushed, this triggers an event on the Esp and then send to the controller (Domoticz).
There it activates a bash script.
This script records a stream from the doorcamera, which is saved and sent to my phone.
All this works wonderfull, only thing is that when the doorbell is pressed seveerl times, the scriupt is triggered several times.
I made sure that if the script runs, it cannot run simultaneously. So it runs one after another for the amounts of the times the doorbell is pressed.
What i would like is to prevent this behaviour on the Esp or on Domoticz. For example do not run when pressed within a minute or so.
My Esp Device looks like this:
GPIO-0 (D3)
Switch Type: Switch
Switch Button Type: Normal Switch
De-bounce (ms): 250
Doubleclick event: Disabled
Doubleclick max. interval (ms): 2000
Longpress event: Disabled
Longpress min. interval (ms): 1000
Interval: 5000 [sec] (Optional for this Device)
In the Domoticz the switch is set-up like this:
Name: Deurbel
Switch Type: On/Off
On Delay: 0 (Seconds) 0 = Disabled
Off Delay: 20 (Seconds) 0 = Disabled
On Action: script:///home/pi/domoticz/scripts/VoordeurBelCam-vid.sh
Under devices:
Esp Switches 0001406C 1 Deurbel Light/Switch Switch Off
I think i am overlooking something easy and am pretty sure this should/can be solved in either the Esp or in Domoticz
I am posting this here, as it's switch related.
I am having an issue where a specifi bash script is triggered to run more than once. I know why, but not how to surpress it.
I have several EspEasy devices, with all kinds of sensors and they all work flawlessly except for the one with a doorbell switch.
What happens is this, doorbell button is pushed, this triggers an event on the Esp and then send to the controller (Domoticz).
There it activates a bash script.
This script records a stream from the doorcamera, which is saved and sent to my phone.
All this works wonderfull, only thing is that when the doorbell is pressed seveerl times, the scriupt is triggered several times.
I made sure that if the script runs, it cannot run simultaneously. So it runs one after another for the amounts of the times the doorbell is pressed.
What i would like is to prevent this behaviour on the Esp or on Domoticz. For example do not run when pressed within a minute or so.
My Esp Device looks like this:
GPIO-0 (D3)
Switch Type: Switch
Switch Button Type: Normal Switch
De-bounce (ms): 250
Doubleclick event: Disabled
Doubleclick max. interval (ms): 2000
Longpress event: Disabled
Longpress min. interval (ms): 1000
Interval: 5000 [sec] (Optional for this Device)
In the Domoticz the switch is set-up like this:
Name: Deurbel
Switch Type: On/Off
On Delay: 0 (Seconds) 0 = Disabled
Off Delay: 20 (Seconds) 0 = Disabled
On Action: script:///home/pi/domoticz/scripts/VoordeurBelCam-vid.sh
Under devices:
Esp Switches 0001406C 1 Deurbel Light/Switch Switch Off
I think i am overlooking something easy and am pretty sure this should/can be solved in either the Esp or in Domoticz