New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version >=2.0.1 is crashing on ESP8266 #174
Comments
To be sure I understand: You can go back to v2.0.0 and it does not crash? |
Yes, v2.0.0 is ok, the newer ones crashes at startup. Maybe related: I cannot set static IP in v2.0.0, when it restarts, it goes into AP mode and all setting are lost. (Haven't looked into this with serial debugging) |
I successfully upgraded to 2.0.1, but now I have lost access to device and a reset doesn't seem to get it back online.. So I guess I might have the same issue with crashing. I did have static ip configured. It doesn't look like it connects to my wifi at all and it doesn't look like it is AP mode |
Strange... I use static IP, and have not seen any issue with the upgrade. (I skipped 2.0.1, went from 2.0.0 to 2.0.2 but cannot see how that should impact this). |
Unable to reproduce this. Considering how many Kamstrup users we have, I think this must be related to configuration. Erase flash, reflash latest version and configure one thing at the time and see when it breaks. |
Everything is working after erasing flash first!
|
@gskjold |
Import("env")
old_uploaderflags = env["UPLOADERFLAGS"]
index_write_flash = old_uploaderflags.index("write_flash")
if index_write_flash != -1:
new_uploaderflags = old_uploaderflags[::]
new_uploaderflags.insert(index_write_flash + 1, "--erase-all")
env.Replace(UPLOADERFLAGS=new_uploaderflags)
env.VerboseAction("$UPLOADCMD", "Uploading `$SOURCE") The full command from platform io is
|
Thank you for that information. Most users will update OTA, so it was important to clarify that your problems were not linked to that. |
I think I have the same issue. My module crashes now and then. It works again for some time if I remove the module from the meter and wait some time before reinserting. Do I have to connect to the serial port to find out why it crashes? I have a POW-K, using 2.0.2 from Github. |
My issue seems to be that it drops of the network, as there are hourly data from the period while it was offline. So maybe not a crash but some wifi issue. Do the ESP have space for logging or will that burn out the flash? |
You can see if it has crashed and restarted by the uptime counter. I can see now that I too have a restart issue: It is not a big problem for me, but @gskjold will surely look into this. The data points for the graphs are calculated from the whole-hour List 3 datagrams when the meter reports accumulated consumption (kWh's) and stored in flash memory. So a reboot will not cause it to lose graph data points unless it happens at that moment when the meter sends List 3. |
My unit was offline the entire night, there are big gaps in my graphs. When I disconnected and reconnected it, it came back online. As the hourly data was recorded one can assume that it was up and running in the period with missing data. |
Mine has also restarted now, I believe it was up for 4 days. Looks like a very short restart, cannot see any gap in my database. (Kamstrup 10 sec interval) |
And now i crashed again, at uptime = 313603 seconds. Logged data: Edit: I'm running 8751b63 |
Very interesting. Are you all on Kamstrup? |
Good observation! In addition to upgrading, I moved from one Kamstrup to an other recently, in parallel with upgrading to v2.x.x. So I cannot say if it is the upgrade or the moving to a different Kamstrup meter that is the reason for this. I never had this issue on my previous location (with earlier firmware versions). So there is a possibility that this could be linked to some issue on individual meters (like Vout dropping out for a short period), causing a restart. If this is the case, it should be visible on the Vcc reading just before the restart, as the supercap in Pow-K will hold the voltage up for a while (but dropping) even if Vout from the meter has dropped to zero. However, the above logging by @Jendem confirms that Vcc is stable during the restart - so this hypothesis seems incorrect. I really don't see any other Pow-K HW related phenomena than loss of input voltage that could explain a reboot. Are there any users on Aidon or Kaifa that have seen this? Ideas on where to look are welcome! |
Could be newly added data parser in v2.x series firmware. Will have a look when I have time. |
Reflashed with the same version as before (220103.7), but with complete erasing of chip. Configured with the same values, and awaiting uptime logging to see if it helps. |
If it doesn't work, try 220105.2: |
I doesn't work, so I am intalling 220105.2 now. |
Still the same with 220105.2 |
Just to recap this tread:
|
I have found a possible problem, attaching new firmware. EDIT: Sorry, constantly attaching wrong file, adding new one! |
I've been using this software with a nodemcu for about a week now. I've had frequent issues with 2.04 and 2.05. So far, fix 220122.2 has been running without hickups. edit |
Would it be possible to include the running version in the MQTT-data? Then it would be easier to see what versions are the most stable. |
Including version in MQTT is not a bad idea, noted. I've fixed a few problems in the following firmware: |
Thank you for the detailed monitoring, love it! |
Thanks, 2.0.9 was removed due to instability on ESP8266 |
General impressions are that v2.0.10 fixed this? |
Thank you, appreciate it! |
Interesting, wonder how it managed to use that much. |
Mine too is usually around 20 kb, this is first time I've seen it that low. |
@ArnieO not currently, but see PR #240 - It's only for mqtt Raw format (so as to avoid fiddling with the json templates and introducing too many changes). |
First of all, apologies for lots going on in the attached graphics. One interesting finding, when troubleshooting uptime-issues (running mqtt raw) is that we actually get a meter-packet timestamp published to "/meter/dlms/timestamp". Next point: Final point: I'm currently (as of a couple of hours ago )running a custom build based on master, with PR #240 applied.
I'd like to leave that custom-build running for a couple of days, or at least until it crashes again, but if any new findings/patches should turn up, I'm definetely ready to perform any necessary testing. Edit: I should probably mention that my Pow-K sits in a Kamstrup meter, it's in Denmark, and using encryption keys (Radius) Another edit: debug-level was set to ERROR, and debug was disabled, since this was the recommendation. |
Not at all! We are all nerds here; the more complex the better! 😁 |
Right, so my local build of (effectively) 2.0.11 have now been running stably on my Pow-K for more than 2 days \o/ Attached some fresh telemetry data, still indicating that a gradual mem-decrease does not seem to be the/an issue. I have several components in my stack that might be the root cause for the lost updates, so I won't blame either the Pow-K or the software for those without further analysis of other moving parts. In short: 2.0.11 way more stable than 2.0.10 on esp8266 (Pow-K) - for me, at least :) Cheers! |
I have no errors on v2.0.10 for 3 days 12 hours so far. |
Considering this fixed |
Crash after flashing using bin file and compiling latest source.
Relevant firmware information:
Same log for both versions:
The text was updated successfully, but these errors were encountered: