SleepMode

From Let's Control It
Jump to: navigation, search

The ESP8266 can be set to deep sleep. You need to connect GPIO-16 with the RST pin to make this work.

What Sleep mode does when waking up:

  • Make one connection attempt to SSID, and to SSID2 if its defined.
  • If it cant connect, and you enabled the option Sleep on connection failure, it will go back to sleep immediately.
  • It will send all the sensor-readings at once (delays are ignored, except for Message Delay at the advanced settings page)
  • It will power down and sleep for the amount of seconds thats set in the Sleep Delay setting. Deepsleep uses an internal 32 bit counter in uSecs. That means that it is working up to 4294 seconds, longer delays will not work.

This saves lots of power, allowing you to use the ESP8266 on batteries.

Note that its recommended to set the Message Delay to 0 in the advanced settings page.

Using Deep Sleep Mode for battery-powered devices see here.

Wake up manually

If you specify a Sleep Delay of 0, you will have to wake the device yourself by pulling RST to GND.

Look here for an practical example of waking up manually: https://www.letscontrolit.com/wiki/index.php/EasyNotifications

Getting out of deep sleep

When this state is active, you can't connect to the web interface. In fact, the ESP is turned off and only a dedicated timer circuit is still powered to wake up the main ESP core.

There are three ways to get out of sleep mode:

Cold boot

Power off the ESP and reconnect power. You will have 30 seconds to connect to the Web interface and disable the Sleep Mode function. (You will get feedback in the serial interface)

Temporary disable Deep Sleep via jumper setting

If 30 seconds is too short for you, you can use this method.

Disconnect D0 from RST and connect it to GND. Restart your ESP if neccesary.

Now deep sleep will be disabled and your ESP will function normally, until you connect D0 to RST again.

This requires ESPEasy v2.0.0-dev6 or newer.

Factory reset

If all else fails, just do a factory reset. You will lose all your settings!

Connect the RX and TX pin together while you restart your ESP.