ESP unit - dead, but not quite!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

ESP unit - dead, but not quite!

#1 Post by manjh » 02 Jul 2018, 17:07

I ran into a strange situation this weekend. One of my ESP units had not reported data from three temperature sensors since a while.
Because one of the sensors is in the deepfreeze, another in the beer refrigerator, this became urgent.... nothing worse than a thawing freezer, or warm beer.

First I tried logging on to the unit to see if it had died somehow.
No problem, I could log on and check around. Nothing strange so far. Log looked OK, although I only saw the "uptime" messages, not the usual DS temperature lines.

But still, no data was sent to my Domoticz server.
So I decided to reboot the unit.
Pressed the button on the tools tab, and got the usual "ok".
Yeah, sure, but no reboot was actually executed! The "uptime" value did not change, nor was the data transmitted.
Tried again, just to make sure I did everything OK: same result.

So: the GUI worked fine, but data was not transmitted and reboot did not work.

I then walked over to the unit and unplugged the power supply. Waited a few seconds and plugged it back in.
Since then, the unit has worked OK again...

Anyone else seen this?
I run build 147, core 2_3_1.

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: ESP unit - dead, but not quite!

#2 Post by Domosapiens » 03 Jul 2018, 11:21

I think you hit the 49 day problem:
viewtopic.php?t=3805
A cold start is needed, if you don't reboot within 49 days.
Suggestion: try a more recent version
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#3 Post by manjh » 03 Jul 2018, 13:51

Domosapiens wrote: 03 Jul 2018, 11:21 I think you hit the 49 day problem:
viewtopic.php?t=3805
A cold start is needed, if you don't reboot within 49 days.
Suggestion: try a more recent version
OK, understood. I've stumbled across an old bug. Makes sense, although I don't understand why my other ESP units don't suffer from this. I have about 15 now, of which half would be running this build.

Upgrade to a newer version i one way, rebooting periodically is another.
Is it possible to creat a rule that checks the uptime and reboots on a certain value?

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

Re: ESP unit - dead, but not quite!

#4 Post by grovkillen » 03 Jul 2018, 13:56

You could divide uptime with 70 000 and if the value is 1 or more you reboot.
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:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#5 Post by manjh » 03 Jul 2018, 14:25

grovkillen wrote: 03 Jul 2018, 13:56 You could divide uptime with 70 000 and if the value is 1 or more you reboot.
Someting like this?
On xxx do
if (System#Uptime>3031)
event aaa
else
event bbb
endif
endon

When I trigger event xxx from the command line, it always comes back with event bbb, even though the uptime is definitely higher than 3031!
What am I missing?

edit: just found that uptime is a system variable, so changed the rule into:
On xxx do
if (%uptime%>3031)
event aaa
else
event bbb
endif
endon

Still comes back with event bbb.

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

Re: ESP unit - dead, but not quite!

#6 Post by grovkillen » 03 Jul 2018, 14:38

Code: Select all

On System#Uptime do
if [System#Uptime]>3031
 Reboot
endif
endon
Given that you have a task "System" with a value name "Uptime"
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:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#7 Post by manjh » 03 Jul 2018, 14:47

grovkillen wrote: 03 Jul 2018, 14:38

Code: Select all

On System#Uptime do
if [System#Uptime]>3031
 Reboot
endif
endon
Given that you have a task "System" with a value name "Uptime"
No that was my mistake. Check the second part, where I use system variable %uptime%.

On xxx do
if (%uptime%>3031)
event aaa
else
event bbb
endif
endon

I trigger this from the command field by "event xxx". It always comes back with event bbb.

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

Re: ESP unit - dead, but not quite!

#8 Post by grovkillen » 03 Jul 2018, 14:51

That's because the "if (%uptime%>3031)" is not correct syntax. Please study the wiki on rules
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:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#9 Post by manjh » 03 Jul 2018, 15:12

grovkillen wrote: 03 Jul 2018, 14:51 That's because the "if (%uptime%>3031)" is not correct syntax. Please study the wiki on rules
Hmmm... I did, that is where I found the system variable %uptime%.
Can you give me a hint?

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

Re: ESP unit - dead, but not quite!

#10 Post by grovkillen » 03 Jul 2018, 15:38

The if statement shouldn't be closed with ( )
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:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#11 Post by manjh » 03 Jul 2018, 15:44

grovkillen wrote: 03 Jul 2018, 15:38 The if statement shouldn't be closed with ( )
Ah, got it.
The correct syntax is:

if %uptime%>3114

So now all I need to do is set a safe boudary value to prevent running into the 49-days problem... This will be a good workaround, until the moment I decide to upgrade to a higher build level.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#12 Post by manjh » 03 Jul 2018, 16:21

Changed my approach.
In stead of putting the logic into each and every ESP unit, it is much easier to control it from Domoticz.
The ESP needs a small rule: an extremely simple event that contains the Reboot command. Then trigger that event from Domoticz LUA. :)

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP unit - dead, but not quite!

#13 Post by TD-er » 04 Jul 2018, 22:06

Just as a remark. Make sure you have at least performed one cold reboot, or press the reset button after flashing the firmware.
If you don't, then the ESP will crash when performing a software reboot. (call reboot command)

The 49.7 day bug was fixed somewhere in december 2017.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#14 Post by manjh » 10 Jul 2018, 17:05

Domosapiens wrote: 03 Jul 2018, 11:21 I think you hit the 49 day problem:
viewtopic.php?t=3805
A cold start is needed, if you don't reboot within 49 days.
Suggestion: try a more recent version
I found a second ESP unit with unexplainable behaviour, so I guess it's time to bring the whole flock up to date with a new version.

But: I checked the Wiki and am confused.
The newest Legacy Freeze is build 147, which I have.
The next level is v.2.0.0, but it show release in Q3.

So which version should I be using?

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

Re: ESP unit - dead, but not quite!

#15 Post by grovkillen » 10 Jul 2018, 17:14

Latest mega nightly is the "best" 2.0.0/mega version. We're late when it comes to release the 2.0.0 , sorry about that. We're hoping to get more time to spend on the project in September onwards.
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:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#16 Post by manjh » 11 Jul 2018, 00:02

grovkillen wrote: 10 Jul 2018, 17:14 Latest mega nightly is the "best" 2.0.0/mega version. We're late when it comes to release the 2.0.0 , sorry about that. We're hoping to get more time to spend on the project in September onwards.
Got it, thanks. I downloaded the zip that includes all the pre-compiled versions, which is exactly what I hoped for.
Although I can probably puzzle a bit and work out what's-what, is there a list of the precompiled versions with a short description?

Also, I managed to update my temperature sensor unit (3 DS18B20's, one in the freezer, one in the fridge, one ambient).
Got all the settings done, and the three sensors provide temp OK. Only when I do I2C scan there are no detected devices???

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP unit - dead, but not quite!

#17 Post by TD-er » 14 Jul 2018, 07:09

manjh wrote: 11 Jul 2018, 00:02
grovkillen wrote: 10 Jul 2018, 17:14 Latest mega nightly is the "best" 2.0.0/mega version. We're late when it comes to release the 2.0.0 , sorry about that. We're hoping to get more time to spend on the project in September onwards.
Got it, thanks. I downloaded the zip that includes all the pre-compiled versions, which is exactly what I hoped for.
Although I can probably puzzle a bit and work out what's-what, is there a list of the precompiled versions with a short description?

Also, I managed to update my temperature sensor unit (3 DS18B20's, one in the freezer, one in the fridge, one ambient).
Got all the settings done, and the three sensors provide temp OK. Only when I do I2C scan there are no detected devices???
The DS sensors are using 1-wire, not I2C.
And at the Github introduction page is a short description of the built versions.

https://github.com/letscontrolit/ESPEasy

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#18 Post by manjh » 14 Jul 2018, 17:43

TD-er wrote: 14 Jul 2018, 07:09
manjh wrote: 11 Jul 2018, 00:02
grovkillen wrote: 10 Jul 2018, 17:14 Latest mega nightly is the "best" 2.0.0/mega version. We're late when it comes to release the 2.0.0 , sorry about that. We're hoping to get more time to spend on the project in September onwards.
Got it, thanks. I downloaded the zip that includes all the pre-compiled versions, which is exactly what I hoped for.
Although I can probably puzzle a bit and work out what's-what, is there a list of the precompiled versions with a short description?

Also, I managed to update my temperature sensor unit (3 DS18B20's, one in the freezer, one in the fridge, one ambient).
Got all the settings done, and the three sensors provide temp OK. Only when I do I2C scan there are no detected devices???
The DS sensors are using 1-wire, not I2C.
And at the Github introduction page is a short description of the built versions.

https://github.com/letscontrolit/ESPEasy
Hmmm... thanks.... (blush)

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#19 Post by manjh » 14 Jul 2018, 17:44

grovkillen wrote: 10 Jul 2018, 17:14 Latest mega nightly is the "best" 2.0.0/mega version. We're late when it comes to release the 2.0.0 , sorry about that. We're hoping to get more time to spend on the project in September onwards.
I installed mega-20180710. Looks like timers don't run out in this version.. is there a bug, or is it my mistake?

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

Re: ESP unit - dead, but not quite!

#20 Post by grovkillen » 14 Jul 2018, 18:08

Now that sounds like a serious bug. Are you sure?
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:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: ESP unit - dead, but not quite!

#21 Post by manjh » 14 Jul 2018, 18:19

grovkillen wrote: 14 Jul 2018, 18:08 Now that sounds like a serious bug. Are you sure?
Not sure. I have been changing some wiring, so it may be a problem on my side. Just wanted to know if this is a known bug... apparently not.
Back to checking the wiring...

Post Reply

Who is online

Users browsing this forum: No registered users and 58 guests