2020 May 14, 06:36 PM
(2020 May 13, 08:20 AM)takezo Wrote: thinking about your options..you mean HA to send the zones via MQTT? How do you do that?
On the other hand, then how is it possible to control irrigations with APIS?
Sorry, I'm a bit lost in this programming things, do you have any examples to see the steps more clearly?
API's are documented in the wiki From there you can see it is easy to control many things.
In my case I use Domoticz as home automation. I'm not sure if Home Assistant can create custom mqtt messages. If so you could send the zone_list with the zero's and one's on the right place to control the valves.
I am not able to create custom mqtt commands but instead it is possible to execute custom http get commands. So from my ha (=domoticz) I directly call the api to set valves on or off. Also starting a predefined program is likewise easy.
For more complex command conversions or other logic like converting from mqtt to http and reverse I heavily use node-red. Adding node-red which is lightweight and could easily added to the pi, the possibilities are endless but that is likely another topic. :-)
--Gerard