I’m thrilled to share my recent success in setting up an automated garden irrigation system using Node-RED. This project has been a fantastic learning experience and has significantly improved how I manage watering in my garden. Here’s a quick overview of what I did and how it’s working out!
The Setup
I decided to automate my garden’s drip irrigation and sprinkler system using a Sonoff Basic module and an electric solenoid valve. The total cost was around $40, which included the Sonoff Basic, a waterproof case, a solenoid valve, and some Sharkbite adapters. The Sonoff was flashed with Tasmota firmware to enable MQTT functionality, making it easy to integrate with Home Assistant.
Integration with Home Assistant
Setting up the Sonoff in Home Assistant was straightforward. I configured it as an MQTT switch with the following settings:
yaml
- platform: mqtt
name: “Back Hose”
state_topic: “stat/backhose/POWER”
command_topic: “cmnd/backhose/POWER”
This allows me to control the solenoid valve directly through Home Assistant, which in turn manages the water flow to my garden.
Automation with Node-RED
To make the system fully automated, I used Node-RED to create a flow that checks the weather forecast and adjusts the irrigation schedule accordingly. If there’s a high chance of rain, the system automatically disables watering for the day. Otherwise, it follows a predefined schedule to ensure my plants get the water they need without overwatering.
Results and Benefits
This setup has been working beautifully! The system has been reliable, and I love the peace of mind knowing that my garden is taken care of even when I’m away. The safety feature of the NC solenoid valve (normally closed) adds an extra layer of security, ensuring the water supply is off by default if power is lost.
Challenges and Solutions
One challenge I faced was ensuring all the plumbing components were correctly connected. The Sharkbite adapters were a lifesaver, making the installation process much easier and leak-free. I also had to adjust the Node-RED flow a few times to optimize the weather checking logic, but with some trial and error, everything now runs smoothly.
Final Thoughts
This project has been a fantastic way to apply what I’ve learned about smart home automation. It’s not only improved the maintenance of my garden but also taught me valuable skills in integrating different technologies. If you’re looking for a cost-effective and efficient way to automate your garden watering, I highly recommend exploring this setup!
Feel free to reach out if you have any questions or need help replicating this project. Happy automating! ![]()
![]()