D1 mini and deep sleep

Hello guys,

I tried to use deep sleep on my D1 mini (runnind on battery) and the esp never wake up. I reduced interval to be sure measure is done.

I’m pretty sure I do somethign wrong, but I spend few hours and I didn’t find it.

My configuration :

esphome:
  name: d1-temperature
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: True
  manual_ip:
    static_ip: XXX
    gateway: 192.168.1.1
    subnet: 255.255.255.0
# Enable logging
logger:

api:
  reboot_timeout: 15min
  encryption:
    key: !secret api_key

deep_sleep:
  run_duration: 30s
  sleep_duration: 1min

ota:
  password: !secret ota_password

# DS18B20 Temperature Sensor
dallas:
  - pin: D5
    update_interval: 5s
  
sensor:
  - platform: dallas
    address: 0x85062017e066754
    name: "Temperature"

Some logs :

[18:00:22][C][deep_sleep:049]: Setting up Deep Sleep...
[18:00:22][C][deep_sleep:052]:   Sleep Duration: 60000 ms
[18:00:22][C][deep_sleep:055]:   Run Duration: 30000 ms
[18:00:23][D][dallas.sensor:143]: 'Temperature piscine': Got Temperature=24.2°C
[18:00:23][D][sensor:109]: 'Temperature piscine': Sending state 24.25000 °C with 1 decimals of accuracy
[18:00:28][D][dallas.sensor:143]: 'Temperature piscine': Got Temperature=24.2°C
[18:00:28][D][sensor:109]: 'Temperature piscine': Sending state 24.18750 °C with 1 decimals of accuracy
[18:00:33][D][dallas.sensor:143]: 'Temperature piscine': Got Temperature=24.2°C
[18:00:33][D][sensor:109]: 'Temperature piscine': Sending state 24.18750 °C with 1 decimals of accuracy
[18:00:38][D][dallas.sensor:143]: 'Temperature piscine': Got Temperature=24.1°C
[18:00:38][D][sensor:109]: 'Temperature piscine': Sending state 24.12500 °C with 1 decimals of accuracy
[18:00:43][D][dallas.sensor:143]: 'Temperature piscine': Got Temperature=24.1°C
[18:00:43][D][sensor:109]: 'Temperature piscine': Sending state 24.12500 °C with 1 decimals of accuracy
[18:00:48][D][dallas.sensor:143]: 'Temperature piscine': Got Temperature=24.1°C
[18:00:48][D][sensor:109]: 'Temperature piscine': Sending state 24.06250 °C with 1 decimals of accuracy
[18:00:51][I][deep_sleep:116]: Beginning Deep Sleep
[18:00:51][I][deep_sleep:118]: Sleeping for 60000000us
[18:00:52][W][wifi_esp8266:482]: Event: Disconnected ssid='Vxormrbi-dkXtQ7hhtc' bssid=[redacted] reason='Association Leave'

Did you tie together gpio16 (D0) and RST as per docs?

ESP32s have better deep sleep features and have less hassles.

@Drahas were you able to figure this out? I was going to try something very similar and wondering myself how well this deep sleep mode worked.

I notice the following in the ESPHome documentation on the Deep Sleep Component

Blockquote On the ESP8266, you can only put the node into deep sleep for a duration using sleep_duration , note that on the ESP8266 GPIO16 must be connected to the RST pin so that it will wake up again.

Also wondering how you wired your temp sensor, if you care to share.

Sad that the OP didn’t respond if this worked for them - I wanted to know , hence the search here. I saw the note on ESPHome docs, but it also says “Some ESP8266s have an onboard USB chip (e.g. D1 mini) on the chips’ control line that is connected to the RST pin. This enables the flasher to reboot the ESP when required. This may interfere with deep sleep on some devices and prevent the ESP from waking when it’s powered through its USB connector”. I would bet this is the case with OP - he mentioned using a D1 mini and may in fact be using a USB connector. I am just researching deep sleep but will expect to find this behavior when I try it out on a mini. Of course I will try the USB connector first - to see - and power from the 3.3v terminal if it doesn’t work (which should be easy if there is a battery shield involved).