-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Unescaped control character in JSON string in 2.3.9 #867
Comments
Indeed, your JSON string gives a parse error due to that character. It could look like your meter is providing unexpected input to the fields "id" and "type". On my Kamstrup meter, I receive:
In order to see what your meter is sending, please run a Telnet debug and post the output here for decoding / verification. |
Do I need to do anything special to enable configuration of debug mode? I can't see it in my config page... (using 2.3.9) |
Seems to be an ESP32-C3 |
In that case: Try to run debug with an older firmware, I think v2.3.4 might work. |
Version 2.2.28 is working for me. |
No, it's an "original" ESP32, Info page says "Chip: esp32 (240MHz)". The last tile on the config screen is "Hardware"
|
Using this tool to decode the DLMS frame gives:
We find these fields:
I see no data from the meter that could be used in the "id:" or "type:" fields in the MQTT payload. So this seems to be a bug that @gskjold will take care of when he finds time. |
I notice the "SAGY..." string at the start (offset 2) of the GCM frame, whatever that may be... |
My guess is that it is from a random memory location due to a bug - but I'm just guessing. |
Describe the bug
2.3.9 produces invalid JSON for the "power" MQTT topic:
Specifically, the 0x05 at offset 0x13. In previous versions, the "id" key was empty.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'm not a JSON expert, but "jq" says "control characters from U+0000 through U+001F must be escaped".
Screenshots
If applicable, add screenshots to help explain your problem.
Hardware information:
Relevant firmware information:
Additional context
Here's the complete JSON string from the power topic attached so nothing gets lost in markdown:
ams.json
The text was updated successfully, but these errors were encountered: