How a program esp8266 for Auto Reboot...

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
marceloMiranda
Normal user
Posts: 10
Joined: 12 Dec 2018, 18:01

How a program esp8266 for Auto Reboot...

#1 Post by marceloMiranda » 12 Dec 2018, 18:04

Hi for all!

My name is Marcelo and I'm trying to program the auto reboot.
I tried to create a timer as below.

on Rules#Timer=2 do
SendToHTTP http://192.168.50.2/?cmd=reboot
endon

but it went wrong :o(

Could someone please help me program the auto reboot?

ESP Easy version: mega-20181112
My IP is 192.168.50.2

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How a program esp8266 for Auto Reboot...

#2 Post by grovkillen » 12 Dec 2018, 18:16

First off, is the node gonna reboot itself or another node? And the timer, is it set by another event?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

marceloMiranda
Normal user
Posts: 10
Joined: 12 Dec 2018, 18:01

Re: How a program esp8266 for Auto Reboot...

#3 Post by marceloMiranda » 12 Dec 2018, 18:28

I wish my ESP8266 rebooted at midnight.
I'm automating at the garage door.
Bellow all my code...

On System#Boot do
gpio,5,1 //portaozinho
gpio,4,1 //up door
gpio,0,1 //stop door
gpio,14,1 //down door
timerSet,2,86400 //one day
endon

On Button01#Switch do
if [Button01#Switch]=1
gpio,14,1
else
gpio,14,0
endif
endon

On subir#Switch do
gpio,0,1
gpio,5,1
timerSet,1,2
endon

On parar#Switch do
gpio,5,1
gpio,4,1
timerSet,1,2
endon

On desce#Switch do
gpio,4,1
gpio,0,1
timerSet,1,2
endon

on Rules#Timer=1 do
gpio,5,1
gpio,4,1
gpio,0,1
endon

on Rules#Timer=2 do
SendToHTTP http://192.168.50.2/?cmd=reboot
endon

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How a program esp8266 for Auto Reboot...

#4 Post by grovkillen » 12 Dec 2018, 18:59

Instead of a timer, use the clock event:

Code: Select all

On Clock#Time=All,00:00 Do
 Reboot
EndOn
More is found on the tutorial page: https://www.letscontrolit.com/wiki/inde ... .29_events
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

marceloMiranda
Normal user
Posts: 10
Joined: 12 Dec 2018, 18:01

Re: How a program esp8266 for Auto Reboot...

#5 Post by marceloMiranda » 12 Dec 2018, 19:30

it work! Very nice man...
THANKS SO MUCH!

8-)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How a program esp8266 for Auto Reboot...

#6 Post by grovkillen » 12 Dec 2018, 19:34

Great!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests