Page 1 of 1

Calling Deepsleep with HTTP not working

Posted: 11 Nov 2021, 10:34
by Andy_C
Hello,

i start working with ESPeasy (actual Version) and d1 mini (ESP12F). For a Project via MQTT i need http://192.168.X.X/?cmd=deepSleep,60 or http://192.168.X.X/control?cmd=deepSleep,60. In the reference it's written like these commands. I try both... on esp i got a Message "command not found". (Bridge between RST and GPIO16 is done)

With rules deepsleep is working and calling GPIO works perfect too.
http://192.168.X.X/control?cmd=GPIO,12,1

Any ideas?

cheers, Andy

Re: Calling Deepsleep with HTTP not working

Posted: 11 Nov 2021, 11:43
by Ath
Deepsleep is an internal command, so not accepted from an external source you are doing right now.
Alternative: implement an event in rules that starts deepsleep:

Code: Select all

on StartDeepSleep do
  deepsleep,%eventvalue1% // First argument provided is the sleep-time in seconds, when 0 device will only wake up by pulling RST to GND!
endon
then call that event like this: http://192.168.x.x/control?cmd=event,StartDeepSleep=60

NB: Event names are not case-sensitive

Re: Calling Deepsleep with HTTP not working

Posted: 13 Nov 2021, 12:54
by Andy_C
Thank's very much for the good Solution for that ;-)

Re: Calling Deepsleep with HTTP not working

Posted: 13 Nov 2021, 14:23
by Ath
Great to hear you got it working, thank you for the feedback :)