I use a cheap 18650 battery directly connected to the Wemos Lolin32 board. Voltage of the battery (connected to an ADC Pin), temperature and Humidity (DHT22) is reported every 30 minutes to MQTT Broker.
If the Voltage drops below a certain value shutdown is triggered by the the ESP itself.
Everything beside the actual sensor is inside and IP67 water and dustproof case.
The HASS package is just for the state card, the mqtt sensors and some templates and a notification automation if the battery is empty (persistent and pushbullet).
Let me know what you think or what I could improve.
Replaced the DHT22 with a BME280. Links and config changed. Old state card replaced by the lovelace config. Increased the deep sleep time to improve battery life.
EDIT2:
See this post for a pretty updated version with OTA Switch, ADC Readings and bme280 setup!
The ESP draws 60mA while running (5 secs every 30 mins) and about 5mA in deepsleep. The datasheet of the battery promises no efficiency loss from -40°C to 60°C.
So I calculate with months rather than days in runtime.
Never used Fritzing before but if it helps you I will try it out.
But nothing really complex.
I soldered a 18650 batteryholder to an M2 cable and a wire from postive to ADC Pin 34 of the ESP.
The DHT Module (DHT22 on aliexpress) is connected to +3V, GND and Data to ESP Pin 15.
thanks - but unfortunately i don’t have a power source, would you mind sharing yours?
and i don’t see a breadboard in your picture, where do you use it?
I got some spare 18650 Batteries lying around (in my case Sony Konion VTC5) . Every batteryholder for 18560 should do (~ 1€). You need a m2 type connector for the board (as described in the first post).
When testting is finished i will glue a breadboard to the bottom of the case
@void Can you help me? I use same configuration, but only receive change when remove battery and connect. I know that deep sleeps works because I debug it, but homeassistant doesnt change last value time.
Regards.