-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Playing around with an ESP32-expansion board and ESPHome, I could notice that sometimes, the firmware does not work in a stable way.
It happened always after a power-down then power-up.
It looks like, during power-up, sporadically, things are not loaded properly and part of the running environment (RAM, ...) is corrupt.
Unfortunately, I cannot describe any clean scenario how to reproduce it.
These problems were combined with some difficulties to get things reset using the web-serial page "https://openenergymonitor.org/serial/".
I had to power-down/power-up multiple times until I finally get the correct UI, with all the parameters, like the default Datalog period of 9.80.
During the unstable phase, the serial output was randomly corrupt, sending parameters multiple times, or non-existing parameters or even broken json. For example:
Received data: {"MSG":3085,"V1":232.89,"V2":232.52,"V3":232.80,"P1":1,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":0,"E2":0,"E3":0,"E4":0,"E:0,"P6":0,"E1":0,"E2":0,"E3":0,"E4":0,"E5":0,"E6":0,"pulse":0}
I could catch such a line in the log...
Not only are some sensors sent multiple time, but the json is broken too.
"E4":0,"E:0,"P6":0
This part.... there's a missing " AND the tag "E" should be indexed!
The very strange thing is that the json was not always corrupt, these wrong duplicated parameters were not always there, some lines were fully okay!
After I got my Emontx4 fixed, it's now running perfectly since the 20th of July 13:30 ! I couldn't find anymore broken lines.