@Npizza: I am enabling the selenoid valve manually or using the weather forecast from DarkSky via MQTT coming from NodeRED. Do you need help in MQTT-Import this into ESPEasy?
`on System#Boot do
GPIO,12,2 // at first set both to input
GPIO,13,2 // to stay save - later it is an output
GPIO,16,0 // STBY on, do nothing
endon
on Bodenfeuchte#Pflanz1>575 do
if [Wasser#FreigabeHahn1]=1 and [Regensensor#Regen]=0
Pulse,16,1,100
Pulse,12,1,50
Pulse,13,0,50 //start watering (open valve)
Publish aussen/state/WM/Garten01/Wasser/Hahn1,1
timerSet,1,300 //timer 1 set for 5 minutes
else
Pulse,16,1,100
Pulse,12,0,50
Pulse,13,1,50 //stop watering (close valve)
Publish aussen/state/WM/Garten01/Wasser/Hahn1,0
endif
endon
on Rules#Timer=1 do
Pulse,16,1,100
Pulse,12,0,50
Pulse,13,1,50 //stop watering (close valve)
Publish aussen/state/WM/Garten01/Wasser/Hahn1,0
endon`
Pflanz1 is a cheap Capacitive Soil Moisture sensor, FreigabeHahn1 is a MQTT-input and Regen is a simple water sensor. I also attached a simple water flowmeter YF-S201 to detect flow even when there should be no flow. Gives me the possibility to react when receiving an alert on my phone.