Hello,
I created an irrigation/sprinkler controller with water valves, that are controlled by relays.
I can open a water valve by setting a dedicated output pin to "1" and close the valve by setting the pin to "0". The ESP (with ESP Easy) is controlled with via MQTT / iobroker.
I would like to implement a "safety measure":
Every time a pin is set to "1" (and the valve opens = water flows) a counter should start and reset that pin (only that one) to 0 again after a specific time (e.g. 30 minutes). Just in case the ESP looses WiFi connection and the "close valve" command from my smart home doesn't arrive.
Is this possible with ESP Easy? If not, is not possible with Tasmota?
Thank you very much.
Reset output pin after a specific time to 0
Moderators: grovkillen, Stuntteam, TD-er
Re: Reset output pin after a specific time to 0
Sure it is possible in ESPEasy
You can monitor the pin and if something is done to it, you can start a timer to disable the pin.
You can monitor the pin and if something is done to it, you can start a timer to disable the pin.
Code: Select all
on System#Boot do
Monitor,GPIO,15 // Monitor GPIO 15
endon
on GPIO#15 do
if %eventvalue1% = 0 // GPIO event sent by monitoring a pin, has an eventvalue reflecting the GPIO state
timerSet,1,0 // Clear timer #1
else
timerSet,1,30 // Set timer #1 to 30 seconds
endif
endon
on Rules#Timer=1 do
GPIO,15,0 // Set GPIO 15 to 0
endon
Who is online
Users browsing this forum: No registered users and 86 guests