Calling Deepsleep with HTTP not working

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Andy_C
New user
Posts: 2
Joined: 11 Nov 2021, 10:17

Calling Deepsleep with HTTP not working

#1 Post by Andy_C » 11 Nov 2021, 10:34

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

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Calling Deepsleep with HTTP not working

#2 Post by Ath » 11 Nov 2021, 11:43

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
/Ton (PayPal.me)

Andy_C
New user
Posts: 2
Joined: 11 Nov 2021, 10:17

Re: Calling Deepsleep with HTTP not working

#3 Post by Andy_C » 13 Nov 2021, 12:54

Thank's very much for the good Solution for that ;-)

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Calling Deepsleep with HTTP not working

#4 Post by Ath » 13 Nov 2021, 14:23

Great to hear you got it working, thank you for the feedback :)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests