ESP Easy restarting every ~2 hours, is this normal ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

ESP Easy restarting every ~2 hours, is this normal ?

#1 Post by sibianul » 30 Jun 2017, 20:57

Hello guys,

I want to setup one D1 mini to control my office light relay, and now when I was setting out the Switch input , after trying to check the ON OFF url, I noticed after the second command I made it responded very slow when I refreshed the devices page, than I checked the main page and noticed the uptime was 0, so it did restartedt itself, I noticed this behavior before a few more times, and the uptime has never passed 2 hours.

If it's restarting like this, wouldn't this cause my lights to go off while booting up ?

Thanks in advance .

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESP Easy restarting every ~2 hours, is this normal ?

#2 Post by Shardan » 30 Jun 2017, 21:13

Hello,

reboots might happen by several reasons.
It's difficult to say what's up without further information.

Would you please provide some more info:
- ESPEasy version (Selfcompiled? Downloaded?)
- Which type of relay (photo or link)
- Which power supply?

Yep, lights will flicker as the state of the relay is lost when rebooting.

Regards
Shardan
Regards
Shardan

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#3 Post by sibianul » 01 Jul 2017, 08:04

I downloaded the latest dev-10 version a few days ago, but until now I haven't hooked up any sensor to it, I just set it up to push some System informations (uptime, CPU load) to a BananaPi that will host a mysql database, and will be my house Dashboard.

It was powered up from my PC USB.

The relay was not yet plugged in, I noticed something strange, and didn't reached that step, the switch input was not changing it's state in the device page, it was always shown as 0, after I was accessing the URL http://192.168.1.41/control?cmd=GPIO,0,1 or ..... =GPIO,0,0, I got the correct response, GPIO 0 was set to 1, or was set to ), but in the device page was always 0. Than I wanted to check the output pin - AND THIS IS WHERE I MADE A BIG MISTAKE (AND IT'S NOT THE FIRST TIME) ... I haven't mounted the D1 mini on a breadboard, just holded on the table and proceed quick with a multimeter on the GND and D3 pin to check the status, it was changing from HIGH to LOW, but after a few checkings I touched the 5v pin that was next to GND .. I heard a spark, didn't seen it , and now the board is almost dead :( When pluging power to it the blue led flicker once and than it's off.
Do you guys think I might be lucky and only burned the regulators ?
If I measure the 3.3v pin it reports 1.3v.
If I measure the 5v pin, it's 1.59v

I will have to google now to see how to check the regulators.

BTW. in this dev version I noticed on the main page the Boot message was removed, before this I had the latest stable version, and on the main page there was a "Last boot reason: Manual reset" can I see this information in the DEV version ?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESP Easy restarting every ~2 hours, is this normal ?

#4 Post by Shardan » 01 Jul 2017, 10:51

Hello,

sounds bad for your module.
You may check the voltage regulator, but the RT9013 on the WeMos board has a current limit so it should survive a short circuit without problems.
More likely a diode on the board might be blown, or the USB's 5V output is dead now.
If you short circuited an ESP pin to 5V the chip might be dead.

See schematic:
https://jpralves.net/img/mcb/wemos_d1_m ... ematic.png

A hint anyways:
I'd prefer another GPIO for relay. GPIO0 must be pulled up to "high" to start the ESP from flash memory so the relay might switch on
as soon as the ESP gets power. Alternatively you may use a relay with negative logic ("ON" if the output is low).

Regars
Shardan
Regards
Shardan

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#5 Post by sibianul » 01 Jul 2017, 11:31

I'm so happy, but still made a mistake, I can't believe, I found 3 D1 mini board and all seemed dead, I tried to measure them all like I did on the one I burned last night, and all measure just 1.4v on the diode output, , but having all boards togheter on my desk (next to way to many other small bags with NEW and UNUSED sensors, I was looking for a tiny S4 diode and get everything out from the "ARDUINO box") .. made me replace the diode on a wrong module, this one was previeously used to turn ON and OFF my office led lights, after replacing the diode , it powered UP, I found the IP and when loading up in the browser I found the OLD interface I made months ago. ... Now I'm looking over to find a new diode, maybe all the modules have exact the same problem, a burned diode, it will be awesome if this will be the only issue.

So, if I power up the board, what should I check or tell you to figure out why it is restarting so often ?
Old interface loaded from the ESP module
Old interface loaded from the ESP module
old interface loaded from ESP module.png (44.98 KiB) Viewed 11810 times

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#6 Post by sibianul » 01 Jul 2017, 12:27

All good today, I have fixed 2 of the 3 D1 mini that I had and seemed dead, all boards measured ~1.4v after the diode, replaced the diode on 2 of them and both are working just fine.

Now after I replaced the diode, the one I burned last night it's on again
alive again, after diode swap.png
alive again, after diode swap.png (26.11 KiB) Viewed 11802 times
What can we check to find out why it's restarting so often?

Here are the devices I have setup, the 4th one is the relay pin, now it seems to change the value of the GPIO 12 after I make the request http://192.168.1.41/control?cmd=GPIO,12,1
devices.png
devices.png (34.97 KiB) Viewed 11802 times
The controller is setup like this http://192.168.1.40/push.php?%vname1%=% ... me3%=%val3%

And It's not returning anything back, I just made a blank push.php file so it's not getting an 404 error.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESP Easy restarting every ~2 hours, is this normal ?

#7 Post by Shardan » 01 Jul 2017, 15:07

wait, what?

Did i understand that right?
You use a

Code: Select all

 http://192.168.1.41/control?cmd=GPIO,12,1
to set the state of GPIO12 as an output
and you're using it as a switch input same time?

Regards
Shardan
Regards
Shardan

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#8 Post by sibianul » 01 Jul 2017, 16:55

It seemed weird for me also that the only option for switches was named "Switch input" and when editing the device was set to output.

I googled first and found this post suggesting the same Switch input option https://forum.pimatic.org/topic/1577/es ... dd-a-relay

So what is the option I need to select for a relay?

I don't need to set a device as a switch like I did, it works if I only make that request to change the state of the pin ? Also can you tell me what is the request I need to make to get the state of a pin ?

Thank you.

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

Re: ESP Easy restarting every ~2 hours, is this normal ?

#9 Post by grovkillen » 01 Jul 2017, 18:01

For relays you don't use any device at all. You just control it on gpio level since no logic is needed. So remove your switch device.

For state I would send the state in a MQTT or HTTP message. I use rules for that.
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:

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#10 Post by sibianul » 01 Jul 2017, 19:03

So the pin will be set automatically as an output. Thanks for letting me know how to use relays with ESPeasy.

And regarding the state of the pin, there is no way to check the state with an request to the ESP?

I won't use MQTT YET, just a simple http request for saving sensor value to my controller or for changing the state of the pins, I used to make websites, all with a backend for easy administration so php and mysql is something I'm familiar with, but in the last 3-4 years I changed my business from webdesign to CAD/CAM... and don't have alot of time for this, I chosed to use tools I'm most familiar, even if I know MQTT is awesome, I don't have time to learn ...

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

Re: ESP Easy restarting every ~2 hours, is this normal ?

#11 Post by grovkillen » 01 Jul 2017, 19:39

It's not that hard. I got a 60 seconds up and running Mosquitto server that is 100% portable.
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:

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#12 Post by sibianul » 02 Jul 2017, 19:40

Today I have deactivated all the devices and it seems it's not restarting anymore, it has a 7 hour uptime so far.

UPDATE
Now I plugged in the ESP near the relay, and it's working, first I have plugged in the relay pin in the GPIO2 and didn't know why I couldn't turn the OFFICE LED LIGHTING off, theat pin is used for the onboard led :D .. I found out a few minutes later.

http://192.168.1.41/control?cmd=GPIO,2,1

The response is correct,

{
"log": "GPIO 2 Set to 1",
"plugin": 1,
"pin": 2,
"mode": "output",
"state": 1
}
d1 mini pinout.jpg
d1 mini pinout.jpg (54.24 KiB) Viewed 11501 times
D1 mini relay wiring.jpg
D1 mini relay wiring.jpg (140.65 KiB) Viewed 11501 times
So there is no way to find out the pin state with an HTTP request ?

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

Re: ESP Easy restarting every ~2 hours, is this normal ?

#13 Post by grovkillen » 02 Jul 2017, 20:05

If you use that HTTP request in browser, do you see a message? That would be the response. I only use MQTT so I can't test right now.
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:

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#14 Post by sibianul » 02 Jul 2017, 22:14

Everything is ok now, except I don't know how to fetch the state of any GPIO, without setting it FIRST with a browser request. And yes, if I load the URL in browser I get the JSON response, it set's the pin just fine, I only want to know the state of the PIN WITHOUT the need to set it first.

https://www.youtube.com/watch?v=N3e2dwnRJ_g

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESP Easy restarting every ~2 hours, is this normal ?

#15 Post by Shardan » 03 Jul 2017, 13:25

sibianul wrote: 02 Jul 2017, 22:14 Everything is ok now, except I don't know how to fetch the state of any GPIO, without setting it FIRST with a browser request. And yes, if I load the URL in browser I get the JSON response, it set's the pin just fine, I only want to know the state of the PIN WITHOUT the need to set it first.

https://www.youtube.com/watch?v=N3e2dwnRJ_g
As far as i know this is a limit of the ESPEasy firmware actually.
At this time it is just not possible.

A bit of a workaround if you have free GPIO's availlable:
You might just connect two GPIO's, one as output for the relay, one as input for reading state of the output.
BEWARE: Do not connect both pins directly, use a resistor of about 500 Ohm...1KOhm!
On bootup pins might give output to eachother. if one is hight and one is low, you get a short circuit
endangering the ESP.

Regards
Shardan
Regards
Shardan

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: ESP Easy restarting every ~2 hours, is this normal ?

#16 Post by sibianul » 04 Jul 2017, 10:13

It's not that critical for me to read the state of the pins, but was something I wanted, to keep things simple I will wait till a newer firmware will be available , maybe this feature will be available.

Now I will install the firmware on a new module, to see if this one will be stable if I set it to push the FREE MEM / UPTIME every 5 minutes, so far the module that is only controlling the relay has an uptime of 1 days 14 hours 51 minutes, the uptime of each device was something I wanted to push to my controller, but if because of this it will restart every few hours, I disabled this function.

If there is anything I should check to find out why it's restarting let me know, I will do any check you guys ask me :)

bobbybeans
Normal user
Posts: 119
Joined: 26 Feb 2017, 17:30

Re: ESP Easy restarting every ~2 hours, is this normal ?

#17 Post by bobbybeans » 10 Jul 2017, 22:37

sorry to but in /highjack the thread but i like the interface. What is it and where can i get it to tinker with it?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESP Easy restarting every ~2 hours, is this normal ?

#18 Post by Shardan » 11 Jul 2017, 11:05

If you're talking about the relay board,
it is a 2 Amprere Solid State Relay.

https://www.aliexpress.com/item/5V-1-Ch ... ade8d44960
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 29 guests