Skip to content
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

lastcode broke MQTT JSON structure #228

Closed
firegnom opened this issue Nov 30, 2021 · 7 comments
Closed

lastcode broke MQTT JSON structure #228

firegnom opened this issue Nov 30, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@firegnom
Copy link

Isssue with the lastCode json format

Welcome, all I am very fresh in this community so sorry if this is already reported.
I am running version :

EMS-ESP Version: v3.3.0
Device (Platform / SDK): ESP32 / v3.3.5-1-g85c43024c

My new boiler is Buderus GB212 and i just installed EMS-ESP , after the first configuration all worked with no problem, but then I have started to see that in MQTT Explorer the ems-esp/boiler_data was not parsed correctly by the MQTT server .

it turned out that the issue was:

"lastcode":"� 4/7760 start: 2060.149.11 11:1, end: none"

when I use lint on that message i get the error :

Invalid characters in string. Control characters must be escaped.json(262)

I have attached sample MQTT messages - sample.json.txt
System log, that I have gathered during restart - ALL.log

I would really appreciate the help here.

@firegnom firegnom added the bug Something isn't working label Nov 30, 2021
@firegnom
Copy link
Author

Can confirm the same issue on :

EMS-ESP Version
v3.3.1b0
"lastcode":"��\f/7760 start: 2021.11.19 12:24, end: none"

sample.json.2.txt

@firegnom
Copy link
Author

Switched to :

EMS-ESP Version
v3.2.1

All works correctly but of course last code is not in json

@proddy
Copy link
Contributor

proddy commented Nov 30, 2021 via email

@pswid
Copy link
Contributor

pswid commented Dec 1, 2021

it's because in commit #220 following condition has been removed.

if (telegram->offset > 0 || telegram->message_length < 14) {
return;
}

For decoding last error code, we need 20 bytes starting from offset 0. So, now condition should look e.g. like this. Am I right?
if (telegram->offset > 0 || telegram->message_length < 20) {
return;
}

@proddy
Copy link
Contributor

proddy commented Dec 1, 2021

yes, that's it. We need those extra bytes to accommodate the extra data. Do you want to fix with a PR?

@proddy
Copy link
Contributor

proddy commented Dec 4, 2021

@firegnom can you try the latest dev build so we can close this, if it works

@firegnom
Copy link
Author

firegnom commented Dec 6, 2021

Hi, I can confirm It works now. I was running the latest version over the weekend all works now.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants