is it possible to put espeasy in deep sleep in a rule?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
guz
Normal user
Posts: 10
Joined: 04 Sep 2016, 21:50

is it possible to put espeasy in deep sleep in a rule?

#1 Post by guz » 06 Sep 2016, 03:12

Hi all,
I'd like to put the espeasy in deep sleep mode from 02am to 05am.
Is it possible to make something like this, in a way that espeasy can understand?

On Clock#Time=All,02:00 do
System.sleep(SLEEP_MODE_DEEP, 10800);
endon

thanks

musti
Normal user
Posts: 10
Joined: 20 Nov 2016, 20:54

Re: is it possible to put espeasy in deep sleep in a rule?

#2 Post by musti » 12 Jun 2017, 19:58

This is also relevant for my implementation: https://www.letscontrolit.com/forum/vie ... 727#p16727

I have tried activating deep sleep from the rules, and checked that the command deepSleep(delay) is actually executed in the https://github.com/letscontrolit/ESPEas ... d.ino#L262 , but that does not activate sleep for some reason, now investigating further.

musti
Normal user
Posts: 10
Joined: 20 Nov 2016, 20:54

Re: is it possible to put espeasy in deep sleep in a rule?

#3 Post by musti » 12 Jun 2017, 21:32

I have tried the following on mega version:

Code: Select all

On gpio#Switch do
  deepSleep,30
endon
and have observe4d such behavior in log, note that I have added the Extra debug - going to sleep serial print on the firmware, just to be sure that piece of code is being executed.

Code: Select all

EVENT: gpio#Switch=0.00
ACT  : deepSleep,30
Extra debug - going to sleep.
SW   : State 1
EVENT: gpio#Switch=1.00
ACT  : deepSleep,30
Extra debug - going to sleep.
SW   : State 0
Now this happens because the command deepSleep is currently implemented in such a way that it can only be used if deepSleep is enabled in settings, which is different from the way we wish to use it. This is the fix: https://github.com/IRNAS/ESPEasy/commit ... 2f5f38a38a

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 11 guests