Following on from PART 3

Now that Home Assistant is aware of the Garden Zones, we can “program” some automations in Node-Red.

For now I’ve only implemented a rudimentary little flow:

  • I have 4 different flows to handle each of the zones separately, but I do make sure (manually) that they’re not conflicting with each other (i.e. 1 zone’s start-time is AFTER the end-time of the previous zone, etc.)
  • As it’s winter at the moment here in South Africa, I’ve opted to only water the garden 2 x a week and for only 10 minutes in each zone.

 

My flows looks like this:

GardenPi_NodeRed

And the schedule is as follows (currently Mondays and Thursdays):

GardenPi_Zone1_Schedule

And to make it easier for me, I used a “switch”-node to split the flow based on some logic (if the payload is “on” or “off” then go route 1 or 2)

GardenPi_Zone1_SwitchNode

For the “ON” payload, I use the “call service”-node to call the switch and switch it ON (Home-Assistant handles the mqtt messaging in the background):

GardenPi_Zone1_SwitchOn

At the end of the flow I have a “msg”-node for debugging purposes, which I will probably remove in future.

GardenPi_Zone1_Debug

So a bit of a long-winded 4-part post, but wanted to capture all the aspects of the process.

Future work will include adding some “intelligence” like checking the probability of rain, possible sensors in the ground to check humidity, etc.

Anyways – it’s been LOTS of fun and a great learning experience.