That look like a great start! I would definitely love to see this on the next firmware update 🙂
Having used Home Assistant for a while, I would just keep it very simple: a state subtopic for each station, i.e. opensprinkler/station/4
with the following payload sent with the RETAIN
flag:
{
"state": "on",
"name": "My First Station",
"duration": 10,
"updated_at": 1530394861
}
Then another subtopic for setting station data, i.e. opensprinkler/station/4/set
:
{
"state": "off",
"name": "New Station Name",
"ignore_rain": true,
"sequential": false,
"enabled": true
}
Main controller settings could be updated using the opensprinkler/set
topic, probably on a 2nd phase.