Closed thomas-lentz closed 4 years ago
There is currently no functionality for this
Hi Stefan, I just need to know, which function is called to enter the deepsleep state, the rest I can program myself (of course I would publish it here). I would be something before or shortly after the
18:10:11 MQT: tele/skybeam/UPTIME_S = {"Time":"2019-08-27T18:10:11", "Uptime_s":0}
message.
I made a small change and you can now place your function in FUNC_SAVE_BEFORE_RESTART. For Example you create you own driver e.g xdrv_50_mydriver.ino and in the bottom under.
bool Xdrv50(uint8_t function)
{
bool result = false;
switch (function) {
case FUNC_SAVE_BEFORE_RESTART:
mypoweroff();
break;
....
Just take a look at the other drivers how they do it. The function will be called for drivers and sensors.
Cool addition with the change is, that you now can also use rules. "System#Save" is the rule event that is triggered just before deepsleep.
Great, thank you - that's what I needed.
ISSUE DESCRIPTION - TROUBLESHOOTING
I need to know the best place to put Pre-DeepSleep function calls. Concrete example: I want to switch off a sensor and a display just prior Tasmota goes to sleep - otherwise these devices consume senselessly power during the deepsleep phase.
REQUESTED INFORMATION
status 0
: