Every year, I return back from my hols to find plants in my greenhouse dead or on life support due to lack of water (despite promises by family to look after them!!!), so this year I thought I’d get node-red to sort it for me.
I purchased a Wemos D1 Mini esp board, relay board, a capacitive humidity sensor, DS18B20 temperature sensor and a Mains powered water pump. All courtesy of AliExpress and costing less than £10 for the lot.
Wired the lot together, and used Nick @knolleary 's MQTT PubSubClient library to communicate with node-red which I have running on a Pi about 15 metres away.
Basically, every 10 minutes via MQTT, the device tells node-red what the soil humidity & soil temperature is, and in turn node-red tells the device how much water to pump to the plants.
The amount of water is automatically determined via node-red-contrib-pid (thanks @Colin Law), to ensure that the watering does not overshoot the target humidity and drown the plants.
I’ve just returned back home after a week away, and everything worked well!!! Tomatoes still have green leaves, and the soil humidity was within 1% of the target humidity level of 62%.
As I would be accessing the dashboard whilst away from home, I built a phone friendly dashboard so I can keep an eye on things.
The space to the right of the 5ml/100/ml/start/stop buttons accommodates information icons which are visible when a certain condition applies.
Click on the image to see it all!!