ESP-01 Deep Sleep Settings

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
trevorjdaniel
New user
Posts: 8
Joined: 22 Apr 2018, 11:28

ESP-01 Deep Sleep Settings

#1 Post by trevorjdaniel » 22 Apr 2018, 16:10

Hi,

I have built my first project, a weather station, and I want to convert it to battery power.

It's based on an ESP-01 and uses a BME280 and a BH1750. I have everything working just fine. All the data i need is being sent back to my MQTT server.

I have followed the instructions on this page to enable deep-sleep:

http://www.instructables.com/id/Enable- ... SP8266-01/

I am confused on how to configure the deep-sleep functionality as the Wiki instructions don't reflect what I am seeing in ESP-Easy.

I am tempted to just make some "guesses" at the right configuration but scared it might never wake up! :D

What I am aiming to do is for it to wake up every minute, check the sensor readings, and send the data to my MQTT server.

On the main config screen shown below I am unsure what to set the "Sleep awake time" to? I am guessing that this means how long it stays awake before going back to sleep. But, how do i know how long it takes to read the sensors? I don't want to set this value too low as it might switch off before the sensors are read and the data sent to the MQTT server.

Config.PNG
Config.PNG (9.48 KiB) Viewed 13891 times
Then, on the 2 device pages, there is a setting called "Interval" - I think, if I am reading the Wiki correctly this is ignored when deep-sleep is enabled?

Config.PNG
Config.PNG (9.48 KiB) Viewed 13891 times

And then, to add to my confusion, on the device page for the BH1750 device page there is an additional setting called "Send sensor to sleep"...

Config.PNG
Config.PNG (9.48 KiB) Viewed 13891 times
Is anybody able to clarify what I need to do to get my ESP to go into deep-sleep, waking every 60 seconds, reading the 2 sensors, send the data to my MQTT server and go back to sleep please?
Attachments
send to sleep.PNG
send to sleep.PNG (3.36 KiB) Viewed 13890 times
data aquisition bme280.PNG
data aquisition bme280.PNG (3.82 KiB) Viewed 13890 times

bobbybeans
Normal user
Posts: 119
Joined: 26 Feb 2017, 17:30

Re: ESP-01 Deep Sleep Settings

#2 Post by bobbybeans » 25 Apr 2018, 18:13

I am not 100% sure by this but the way i interpreted the sleep awake time was. On first boot it is awake for X amount of seconds. Say i wanted to flash or upgrade it, I would reset it then for X seconds it will be up which would allow me enough time to open up the webpage and then turn off deep sleep. Then allow me to do w/e else I want before I put it into deep sleep again. That is my interpretation though, which may or may not be correct

trevorjdaniel
New user
Posts: 8
Joined: 22 Apr 2018, 11:28

Re: ESP-01 Deep Sleep Settings

#3 Post by trevorjdaniel » 30 Apr 2018, 15:50

Thanks for the reply.

What is confusing me is what to set the values to on the devices and controller...

Ideally, what I want is for it to sleep for 120 seconds, wake up, read the devices, post the value to my MQTT server and go back to sleep.

At the moment I have the devices set to 60 seconds. Which, while it is not yet configured for deep-sleep, means it sends readings every 60 seconds.

When i configure the system for deep-sleep are these values ignored? Do i need to set them to zero so they act immediately?

If anyone has any ideas it would be greatly appreciated!

Trev

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESP-01 Deep Sleep Settings

#4 Post by grovkillen » 30 Apr 2018, 17:27

All devices send right away, the setting is referring to the time BETWEEN broadcasts.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

trevorjdaniel
New user
Posts: 8
Joined: 22 Apr 2018, 11:28

Re: ESP-01 Deep Sleep Settings

#5 Post by trevorjdaniel » 01 May 2018, 09:30

Well, I took the dive.

I changed the settings so it sleeps for 300 seconds and is awake for 30.

And now it won't wake up :(

The red light is constantly on but the blue light never flickers, which it normally does when booting up.

I left the device delays at 60 seconds.

What have i done wrong? Any ideas?

Trev

trevorjdaniel
New user
Posts: 8
Joined: 22 Apr 2018, 11:28

Re: ESP-01 Deep Sleep Settings

#6 Post by trevorjdaniel » 01 May 2018, 17:22

Is it possible that i have to change one of the "GPIO Boot States" to make sure it wakes back up?

They are all set to "Default" at the moment.

Trev

osoon
Normal user
Posts: 15
Joined: 22 Mar 2018, 21:07

Re: ESP-01 Deep Sleep Settings

#7 Post by osoon » 17 May 2018, 02:46

i have same issue with wemos: it won't wake up. ive set sleep to 70 sec, wemos blinks led ONCE after 70 sec, sending no data over mqtt and after that nothing. no blinks, no data - nothing.
have no clue what to do or what to try.... any help?

cyberclwn
Normal user
Posts: 21
Joined: 25 Aug 2017, 21:19

Re: ESP-01 Deep Sleep Settings

#8 Post by cyberclwn » 17 May 2018, 15:32

osoon wrote: 17 May 2018, 02:46 i have same issue with wemos: it won't wake up. ive set sleep to 70 sec, wemos blinks led ONCE after 70 sec, sending no data over mqtt and after that nothing. no blinks, no data - nothing.
have no clue what to do or what to try.... any help?
Hi,

What are your settings in the "Sleep Mode" part of the "Config"tab ?
Can you add a screenshot maybe?

Some more information is needed to help in a good way.

dannybloe
Normal user
Posts: 36
Joined: 16 Dec 2015, 16:29

Re: ESP-01 Deep Sleep Settings

#9 Post by dannybloe » 15 Jun 2018, 20:46

I find this deep-sleep settings confusing as well. The wiki clearly states that it will take readings on all sensors and then go back to sleep. As travorjdaniel is saying as well, I just want the esp to go back to sleep as soon as it has broadcasted all sensors. Isn't it better then to have a setting to do just that. So instead of setting an awake time just set it to 'go back to sleep after all readings are done' .

I also noticed some other weird thing. I have one analog (soil) sensor connected. When the awake time is set to 20 seconds it is bursting values to Domoticz for the entire awake period. Sometimes it sends about 40 readings in one burst as soon as it is awake. Seems like a bug to me. Both Domoticz' log and the ESP log show this burst.

(using ESP_Easy_mega-20180615_normal_ESP8266_4096)

Cheers

Danny

Vic20
Normal user
Posts: 18
Joined: 29 May 2018, 11:51

Re: ESP-01 Deep Sleep Settings

#10 Post by Vic20 » 16 Jun 2018, 13:31

I have had numerous problems with Deep Sleep and seemingly failure to wake up. In my instances it's waking but not being able to connect to WiFi, even when manually resetting the ESP.

By connecting to the ESP through serial and using serial commands I can either reset the device or enter the WiFi SSID and Password parameters and get back to a device that I can communicate with over wifi.

I think I have discovered that, when changing the sleep awake time from zero in the config page, either my browser (Chrome) or the ESP is changing the Wifi Passwords!

If I reenter the wifi passwords after changing the sleep awake time, the device connects normally on wakeup from sleep.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 Deep Sleep Settings

#11 Post by TD-er » 16 Jun 2018, 20:56

Vic20 wrote: 16 Jun 2018, 13:31 [...]
I think I have discovered that, when changing the sleep awake time from zero in the config page, either my browser (Chrome) or the ESP is changing the Wifi Passwords!

If I reenter the wifi passwords after changing the sleep awake time, the device connects normally on wakeup from sleep.
What version of ESPeasy is this?

Vic20
Normal user
Posts: 18
Joined: 29 May 2018, 11:51

Re: ESP-01 Deep Sleep Settings

#12 Post by Vic20 » 17 Jun 2018, 19:00

I've experienced this on MEGA and V2.0 versions.

In investigating a bit further "Google smart lock" in Chrome is possibly trying to be too clever.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests