Automatic Plant Watering

Here’s a thing I build over the last weeks. An automatic system to water the plants on my balcony. It uses a NodeMCU to control a little pump and to read the current water level in my tank. Everything’s controlled (and automated) via MQTT from HomeAssistant.

Blog post with detailled description, circuit, HASS configuration and pictures

For now I just configured a simple timer based automation. But I would like to integrate the weather (eg. not run the pump on rainy days). I’m currently using the Yahoo weather provider, but this and this seem to suggest that Dark Sky is the better platform.

15 Likes

Nice project :), I’ve wanted to do something similar in my greenhouse but getting power out there is my problem :stuck_out_tongue:

Why not directly use a humidity sensor planted in your flowers soil (instead of yahoo /dark sky)?

2 Likes

Cool - I’m looking to do something like this as well - this will surely help :slight_smile:

Very cool. I’ve been kicking around the idea of having home assistant monitor the weather conditions at the plant’s home biome and replicate those conditions at my house in real time for that plant.

3 Likes

Awesome! Thanks for sharing :+1:

yeah, a humidity sensor would work, too. I wanted to keep the electronics simple for starters.

I bought these sensors for my plants: https://fr.aliexpress.com/item/5PC-86062-Free-Shipping-Soil-Hygrometer-Humidity-Detection-Module-Moisture-Water-Sensor-Soil-moisture-for-Arduino/32656518094.html?spm=2114.13010608.0.0.qO8DJ4 . Would it be usable with the analog output they have ? A way to connect it at the ESP2866 board ? it would give more accure measure of water conditions in each pot !

Thanks

Vincèn

Well just check bruh s multisensor and replace lux sensor by this one for exemple. That should work just fine with ESP

@lambtho I connected one to my ESP and values look logical so far (I have multiplied analog value returned by 10 and it looks to be similar to regular % humidity values so far !

1 Like

I’d love to have the skills to do this, so I am going to do something similar but just using my weather station via Wunderground and a zwave plug connected to a spare pump (or 2) in my greenhouse.

nice project.
maybe i will use simular for places where i have no water.
the places where i have water i have now partly automated, but only with an temperary watering computer.
that will be replaced by nodemcu in a short while.

the big advantage from this system is that it is already 5V. so i can easy replace the computer by a nodemcu.

@vincen I’m trying to do the same and want to use this sensor with an ESP to report via MQTT. Any chance you could share your ESP sketch for this. Are you using the sensor on A0?

Thanks for any help

@toomanylogins I don’t know what you mean by ESP sketch but this is what I have done and if I miss some details or something not clear, let me know :wink:

-> flash an ESP with Easy Mega firmware in standard version (no need of dev or test ones, they are pretty unstable).
-> setup wifi, network, and connection to my Mosquitto server on my PI (I selected openHAB MQTT as I got none success with the other MQTT server offered in it !). I decided all my esp should come back on mqtt as /esp followed by room name (Cuisine here)

-> declare the sensor and plug it on ESP:


It can be plugged only on ADC which is the only ADC input on ESP !
-> declare it in HA configuration:

- platform: mqtt
    state_topic: '/esp/lierre/humidite'
    name: 'Lierre Hum.'
    unit_of_measurement: '%'

and that’s it :wink: right now values returned by sensor are not moving much but I didn’t get time to find more details about humidity and how it’s supposed to change during time !

Hope it helps :wink:

Vincèn

Thanks, that’s a great reply with a lot of detail. I wrongly thought you would have programmed this via the Arduino IDE which is why I asked for the sketch(Arduino code). I will look into your way of doing this as it seems easier for a non coder like me!

@toomanylogins I went this way as I’m a programmer but was lost with using Arduino IDE and then pushing file on ESP to modify config makes it very complicated when you need to do modifications ! ESP Easy is a lot easier and I’m going to try it with air sensors as they are now managed by that firmware too :slight_smile:

@vincen Thanks - all up and running now! I need to play with this to understand it as the reading seems to get lower when the sensor is wet - I assumed that would be more humidity so it would go higher.

Anyway - thanks again for the quick help :slight_smile:

@toomanylogins cool you succeeded to build your own so fast :wink: yep for readings not sure yet which scale exactly to apply…

Hi @splitbrain ,
thank you very much for your inspiration for this great project!
I thought it would be a good idea for an ESP Noob like myself to realize the whole project with ESPEasy.
But unfortunately I already fail to find the right configuration for adding the IRF520 MOSFET as a device in ESPEasy. :frowning:
Maybe one of the ESPEasy Pros here, like @vincen , can give me a helpful tip?

Or should I better do without ESPEasy and realize the whole project with the LUA program code instead?

Thanks in advance

Solar is your friend and not as expensive as you think. Simple 12V 10w panel with 12v 5ah battery and cheap mppt charger would be enough to turn on a few 12v solenoids.

1 Like