Hey @wutu,
i just build a switch for watering my garden. I just need a Backup for loss WiFi connection or other worst cases…
I send a event from Pimatic to the esp:
{
"topic": "/poolhaus/cmd",
"onMessage": "event,wasserrechtsan",
"hap": {
"service": "Lightbulb"
},
"id": "gpio3",
"name": "gpio13",
"class": "MqttSwitch",
"offMessage": "event,wasserrechtsaus"
}
on the ESP i have the Rule:
on wasserrechtsan do
gpio,13,0 //Ventil oeffnen
timerSet 1,600 // 10 Minuten
endon
on wasserrechtsaus do
timerSet 1,0 //timer auf null setzen
endon
on Rules#Timer=1 do
gpio,13,1 //Ventil schliessen
endon
This works ok! But - where can i got the status of the device what i switch?
I need this as local backup, if any device broke (Router/Wifi/Pimatic) in the time where the garden is watering, so close the valve after time X.