It's been 7 months since I last wrote anything here (which is a shame), but my work has continued to progress. In fact, I've been thinking about setting up an automatic watering system that I can manage from my HA or automate altogether. 

So here's the list of components I used to build the system. 

  • 1 esp8266 
  • 1 5V peristaltic pump 
  • 1 transistor 2N2222
  • 1 1Kohm resistor

Here, the transistor acts as an automatic switch that we open and close using the HA application. Here is a diagram of the assembly. 

M = pump 

You need a 5V pump to connect it in parallel with the ESP, otherwise the assembly will not work. If you have a 12V pump, for example, you need to buy a 5V to 12V converter. 

Here's a photo of the final assembly. This system works very well and allows the plants to be watered. 

In blue, it's the transistor under the esp which saves space. (Sorry for cables, the cables are adapted to the location of the system in relation to the electrical supply, I had to dismantle the system to take a photo of the components).

Below is the code required in .yaml (HA language) to enable the system to work properly using the GPIO4 pin. 

esphome:   

name: espompe   

friendly_name: espompe

esp8266:   

board: esp01_1m

# Enable logging logger:

wifi:   ssid: !secret wifi_ssid   

password: !secret wifi_password

captive_portal: 

switch:

   - platform: gpio

     name: "Pompe"

     pin: GPIO4 

    id: pompe_switch

Finally, I was able to use this system for several weeks in a row, automating the watering of my plants. Now you know how to make your own automatic and home automation watering system. 

PS: I've made other more basic protectors using LEDs or a 3D-printed wind turbine that I use to recharge external batteries. If you're interested, contact me as I don't think I'll be developing the projects here as they're simpler and more accessible to others on Youtube. 

Re PS: Sorry for the translation if there are any mistakes or misunderstandings.