-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeepSleep mode: no I2C data send to MQTT #6890
Comments
Verified. Investigating |
Ah! Nice one too. As the deepsleep wake-up time is sometimes shorter than the fast boot cycle time detection it will reset some or all settings resulting in your and mine issue. As a workaround change the fast boot cycle detection to off using command |
Great ! Thanks in advance |
Fix DeepSleep bootloop disable (#6890)
Try latest commit. It woks for me. |
I have falshed from scratch and I have set up SetOption36 to 0 as you suggested. |
As said. Try latest commit. And yes that means download and recompile. |
I am sorry for misunderstanding ! |
I have some problem with my compiler. As soon as I fix it I will provide a feedback. |
OK. Finally I have solved problem with my compiler ! I have compiled last release, flash from scratch, setoption36 parameter set to 0 and set deepsleep 45. |
Make sure a wire is connected between gpio16 and rst The setoption36 change is not needed anymore. Just leave it set to 1 |
Ok. Connection D0 - RST checked with tester.
Led blinks but no wakeup. I have reset board with button and the result was:
The boot counter was incremented but no sensor MQTT data are present. |
Could you provide the output of command status 2 |
With RST diconnect from GPIO16 and device always on:
|
Ok. I expect an sdk issue. I see you have a sdk commit of 5ab15d1. That is probably the latest stage version. Pls recompile with option core_pre as that was the one I was using too. I'm offline now and will investigate tomorrow. |
Using a wemos it all works perfectly for me:
|
Ok. I am out of home. |
I am frustrated !
I have noticed that my board goes immidiatly off as soon as I set deepsleeptime in console without sending any other infos (like save, reset, status LWt etc...) |
As you execute from a web console it is expected that you will not see the start of the deep sleep messages. Once woken the device will go to sleep as soon as teleperiod is executed. I suggest you change teleperiod to 20 and retry. |
Teleperiod set to 20:
|
Pls check your mqtt broker as I think the same situation happens as I noted before. The time between sending the teleperiod data and the sleep state is too short for updating the webconsole. Just verify using the serial console where you must be able to see the mqtt data sending just before the sleep state. |
Ok. I have to stop my work for today. Tomorrow I will do that. |
Hi Matheus, as you seggested it was a web refresh issue: using serial I can find MQTT messages sent before sleep mode activation:
After wake-up:
I would like to thank you for your valuable support !! Now I can try to delploy my Tasmota devices battery powered project. Umberto |
Great to know that now it is working for you. Closing. |
I'm in the process of adding a 4 seconds delay between sending the teleperiod and deepsleep start message and the actual deepsleep. This will alow the system to update the GUI before communication stops To be released within an hour. BTW. Thx for the donation. |
Great !! I will test it tomorrow on my D1 mini web gui. It is not a big amount but I hope that's help ! |
Refactor deepsleep allowing time to update GUI before going to sleep (#6890)
Hi arendst , I came across this issue trying to solve my own DeepSleep problem. I am using Tasmota 8.5.0.1 I compiled on an ESP8266-12F. Attached is a DHT11 sensor. I have DeepSleep set for 60 seconds and a TelePeriod of 10. It seems the original problem still persists. First, I had the problem of some of my configuration settings being reset after a few DeepSleep cycles. This I solved using the SetOption36 0 workaround. Now my problem is similar to issue #949 where the sensor data is not published. What I noticed is that the module would always go into DeepSleep around 7 seconds after waking, not waiting for telemetry data. This happens regardless at how long I set the TelePeriod; currently it is at 10 but I tried it at 20 and even 300, the results were always the same. The module would always go into DeepSleep after about 7 seconds and then wake when it was supposed to. Sometimes telemetry data was received because the module took longer to go to sleep, but this was few and far between. I guess this was because it was waiting to connect to the MQTT server or NTP. But it appears DeepSleep doesn't wait for the Teleperiod at all. This is the log data when DeepSleep is enabled:
And this is the log data when DeepSleep is diabled:
Any thoughts on this? |
BUG DESCRIPTION
Using DeepSleep Mode on MiniD1 borad with I2C sensor no MQTT sensor data was send at wake-up.
I have a Mini D1 board with I2C temperature sensor connected. When I setup my device in order to use deepsleep function (in this test I have used 30 secs) the board goes to sleep, but at wake-up no MQTT sensor data was send.
The system send only INFO1-2-3 MQTT messages but no sensor data was sent.
When I disconnect GPIO16 and I stop deepsleep function I found the GPIO configuration resetted with default values (No config about I2C sensor).
I have already tryed to flash device from scratch and setup device with dynamic sleep set to 0 but the results is the same.
Backlog Template; Module; GPIO
:Status 0
:(Please use
weblog 4
for more debug information)There are 3 screenshot:
after_reboot.jpg shows GPIO config after deepsleep funtion was disable.
sensor.jpg shows "normal function" status device

config.jpg shows GPIO configuration at setup

The text was updated successfully, but these errors were encountered: