Atomated plant watering using esp32

Thanks !

What I was wondering is specifically about the deep sleep.
On a value change, humidity is tested, pump started (if needed) and then going to sleep.

Should I not check 2 humidity setpoints and go to sleep only once ?

I could try figure out a code out of this and test

Hm… maybe you are right :smiley:
Puhhhh but i dont have an idea how to do it in parallel or seriel but without the deep sleep setting. :thinking:

Hm…
maybe during the check of the first sensor delete all the into deep_sleep stuff?
So the esp checks the first sensor, does his thing and continues to the second one. Only in the scond one you make the deep_sleep check.

Hi. Is hard too cut deep sleep switch and switch off this function? Used esp for other things and is important for me to never deep sleep esp32. I worried to switch on this function not intentionaly.

@Grieche could you please explain the switch part in the esp32 code? You use pin 22 for pump1, pin 23 for LED1 and pin 14 for LED2, but as presented in the schematics at the top- there is only one Input to the Relay from the ESP32 (yellow wire).
Which of these pins is the yellow wire one and what are the other ones?
Can they be any PIN/GPIO?

Hi,
its long time a go and only God knows know the code but i try to explain. :smiley:
Regarding Pin22: This is the Yellow wire witch switches/triggers the relay.
Regarding Pin23 (LED1): This is just a status LED that the ESP is running. Just for myself. Its not relevant.
Regarding Pin14 (LED2): This is my visual feedback that a measuring happened and the moisture was over the threshld and so no pumping was triggered. It is also just a feedback, its not necessary for the code.
You have to look in the scematics of your esp32 witch Pins you can use as switches but you can use an switcheable Pin.
Dos this answer your questions?

Yes, thank you for the explanation! The solution works perfectly now. I just want to point out one issue I had, but I found a solution.

deep_sleep:
  run_duration: 30s

deep sleep run duration of 30s was too short for the code to execute and the esp32 would go back to deep sleep before comparing the moisture level to the set threshold and the pump would not run even when the moisture level was below the threshold. With a longer run_duration, the code ran flawlessly.