[ESP32] DeepSleepSensor

Hi everybody. I have rededeloped my SoilMoisture sensor in my garden within the last days.

Until a few days ago, it was an simple Arduino that sends the data via 433MHz to an ESP32 that converts it to MQTT messages.

But 433MHz wasn’t reliable in my garden, so i’ve decided to replace the arduino with an ESP32. That gives me the advantage of also sending data to the controller.

If anybody is interested, the code can be found here:


  • Wakes up --> publishes/subscribed to MQTT --> Sleeps
  • If WiFi connection wasn’t succesful, it starts an access point
  • If MQTT connection wasn’t succesful, a webserver is started to change the configuration
  • Via MQTT you can define the sleeptime and als set the ESP to AP mode or force it to start the webserver.

It should also run on an ESP8266 but i haven’t tested it.

My hardware is an ESP32 MH-ET Live mini kit which has got a very low power consuming SDO. So I directly can connect a SolarPanel/18650 Battery charging combination to VIN and it runs without any issues for quite some days.
Of course in AP mode or when the webserver is started, you should be quick :slight_smile: