-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Sleep command #949
Comments
Running esp8266 in deep sleep needs a different software. All the code must be run in setup section, not in loop. In few words you must write your own code. |
No, @ionciubotaru esp8266 can enter deep sleep at any time you like. Just the simple examples provided with the sdk/core use that pattern to not leave setup. As for tasmota: I dont know how or if it works. For deep sleep you definitely need gpio16 to connect to reset. |
Deep Sleep is not supported by Tasmota. |
@Gary202 I have a fork of the TASMOTO that I keep up to date and have some additional features, that matters if you want to get beyond SONOFF devices. Take a look at my user here and you should find the fork. It has currently 5.8.0b version. I also introduce an ULTRADEEPSLEEP, because the ESP cannot sleep much longer than one hour. You don't have to configure something. You can just use deepsleep 7200 or higher for example. The trick is to use rtcMem and wake up for less than 0.2 seconds every hour. Works like a charme. I have many battery driven WEMOS or pure ESP8266. In general I prefer to use standalone ESP8266, because they need much less battery than the board versions like WEMOS. |
On Sat, 7 Oct 2017, stefanbode wrote:
@Gary202 I have a fork of the TASMOTO that I keep up to date and have some additional features, that matters if you want to get beyond SONOFF devices. Take a look at my user here and you should find the fork. It has currently 5.8.0b version. I also introduce and ULTRADEEPSLEEP, because the ESP cannot sleep much longer than one hour. You don't have to configure something. You can just use deepsleep 7200 or higher for example. The trick is to use rtcMem and wake up for less than 0.2 seconds every hour. Works like a charme. I have many battery driven WEMOS or pure ESP8266. In general I prefer to use standalone ESP8266, because they need much less battery than the board versions like WEMOS.
so what is the link to the fork? and what are the additional features (besides
the long sleep)?
how do you respond to button presses and mqtt messages that are sent while you
are asleep?
|
Hi @davidelang, the link is here: https://github.com/stefanbode/Sonoff-Tasmota/tree/master/sonoff Additional features are
Regarding button presses, there is no chance to capture this during deepsleep. This functionality comes with the ESP32 but is not available with the ESP8266. MQTT messages (Power switch) are partly working. As long as there is only ONE relay and the message is retained after wakeup the status is updated. It seem a limitation of ESP8266 and/or PubSubClient to transmit only the first retained message on a wildcard subscribe. I have checked several libraries but did not get it working at least. A little bit pain-in-the-... , because there where much more ideas possible if you can work on ALL topics that came from retained messages after a wildcard subscribe. |
Good improvement. |
Support for "ultradeep" and Ultrasonic distance measurement HC-SR04 are great improvements, maybe you can pull this on Tasmota? |
hi @PeggyFree , I have made so many changes that I struggle how to create a pull into Tasmoto for ONE specific feature. Additionally, I'm not that experiences with the github stuff. |
Hi,stefanbode Can you Help me in OpenHab2, to send the deepsleep in a different number. I read the DeepSlepp out with JSONPATH { mqtt="<[broker:tele/wemos1/STATE:state:JSONPATH($.DeepSleep)]"} But what do I have to do to change this number via openhab? My problem is that it's in a JSONPATH, I do not know how to change it then. Thanks for the help |
you would need to create a command to send to the device, see the commands page.
JSONPATH is just a tool to extract one JSON field out of a JSON message that is
in a variable, it's a function, not a variable.
|
Davidlang is correct I assume in your case you have to send for example to cmnd/wemos1/deepsleep the value 3600 to get it updated to 1h deepsleep. You can send any command that you can find here in the wiki .let me know if you need more support. Also using openHAB with TASMOTO. |
Thank you all. That was the missing thought. It works now. |
:) |
Heap is the current free memory and anything beyond 5000 is a bit critical and some webpages do not function anymore. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem. |
Is there now a command for deepsleep? |
yes, download this tasmota at |
Hi all, maybe somebody can help me - I'm not that experienced so far using Sonoff-Tasmota. |
Hi @stefanbode , |
@arnaldob You need to address this question to @stefanbode's forked repository - https://github.com/stefanbode/Sonoff-Tasmota/issues As a suggestion, you could try a rule triggered on mqtt#connected to send a Please, address any further questions to Stefan. If you have questions about Tasmota rules, please refer to the Tasmota Rules wiki or to the Tasmota Support Discord Chat. The chat is a better and more dynamic channel for helping you. Github issues are best used for Tasmota software feature requests and bug reporting. Troubleshooting is more effective using an interactive forum. Please check the Contributing Guideline and Policy and the Support Guide. Thanks. Support InformationSee Wiki for more information. |
Hi @arnaldob , I will take a look on Monday to this. There is already a check that it go not into deepsleep before sensor data published. Anyhow I got a similar report from another user. There seems to be situation, where the firmware think is has no sensor and go into deepsleep without sending data. I assume I have to fine tune the detect method. I use it on several sensors in my garden and do not see an issue, but I must admit I do not care if one value is missing, if the next is reported. |
Hello @stefanbode which board is supported with your feature deepsleep. I'm testing it on pure ESP-01 and it's not working (board do not wake up). I found also this: so I guess soldering is necessary ? What about sonoff basic did you test? Which board you are using in your garden ? Thanks for answer |
Hello it's me again I done soldering (was relay hard :-)) as mentioned in the link of my last post and deepSleep finally working for me :-D. I wonder which ESP chip version have deepSleep from the beginning I mean without board soldering... |
basically all except esp-01 :)
to check yourself before you buy: you need Gpio16
|
Hello Is it somehow possible to define time between deep sleeps ? I mean wake up time ? Thanks for answer Best Regards |
Hi, the main branch does not support deepsleep. You have to go to a fork like mine. Search tasmota stefanbode to get there. |
Hello @stefanbode I'm using your branch but I had problems with analog sensor because it wasn't able to send data because of short wake up time so I was wandering if it's possible to define it? My sensor is working now but I change AdcRead to take only one sample. |
It is all defines by teleperiod. The minimum is 10sek, but you can increase it. Normally there should be no issue because adc read is very fast and do not need extra time. |
@stefanbode thanks for hint. I change teleperiod from 10s to 20s and it helps me as it is shown on the plot (I using default AdcRead factor which is 5 ). As we can see on the beginning we have some measurements for teleperiod = 10s but later there is no measurements at all. When I change teleperiod for 20s it looks better but still we have some gaps. I'm using deepsleep 60 in this example. |
If it happens at 10sek so often you should connect serial and see what the log is telling. I have implemented several checks that only send the device to deelspleep again if there is no connection possible to the network or mqtt server. If all these devices are ok, it is in my view very unlikely it will not publish the data. Please set seriallog 5 to get most info. |
You may want to set up a syslog server so you can trap all log messages. Especially with higher logging levels, unless you are interactively monitoring the Console, some log messages may scroll off. |
Syslog if fine but only wOrks if WiFi is connected. Because with 10sec it is very easy to reproduce in this case my idea was to use seriallog. Here you get all information. Please share at least 3 unsuccessful starts after deepsleep. Just ensure they look all the same. |
|
I'm using a standard ESP12 running Tasmota that's battery powered and the sleep is not sleeping. I have it set too 100 the battery will only last around 1 or 2 days. I'm using a 9v battery but soon going to be upgrading to a 1500mah lithium battery. should gpio 16 be tied to reset for the sleep to work like deepsleep?
The text was updated successfully, but these errors were encountered: