-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
serialize json data issue #10164
Comments
Hi. I'm having the exact same issue. I'm using Firebeetle 2 ESP32 and no matter which code example I take, once I post anything to the server, I get the response "[TB] Unable to serialize json data". I'm able to use the API via command line using MQTT or CURL with no issues. For reproducing you can use demo.thingsboard.io and just send data, it will answer with the same error. |
I think problem is in Arduino SDK , something with functions that create JSON. Functions that require SDK to create JSON don't work. |
I'm using 2 different boards, https://wiki.dfrobot.com/SKU_DFR0868_Beetle_ESP32_C3 and https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654, both give me the same issue when posting anything to the server. Do you mean this https://github.com/espressif/arduino-esp32 for Arduino SDK? |
Seems like the issue is with ArduinoJSON library, 6.21.5 works, I've opened a bug for this |
No there is SDK from thingsboard https://github.com/thingsboard/thingsboard-client-sdk that is used for ESP32. tb.sendAttributeData and tb.sendTelemetryData are implemented there and it looks that problem is with serialization of data to JSON before sending to thingsboard server. It could be problem and with one of the libraries that are used for json serialization. This is not working and causing "[TB] Unable to serialize json data"
If you serialize data in the code and send josn directly using tb.sendTelemetryJson then it is working.
I just hoped someone already figured out this issue, I will try to debug to see what is going on. |
I confirmed that, I will close this issue. |
Yes, downgrading from ^7~ to 6.21.5 really worked. Thanks A lot. 🥳 |
7.0.4 also works now |
Component
Description
Frist time testing TB with ESP32, I'm getting "[TB] Unable to serialize json data" on any tb.sendTelemetryData or tb.sendAttributeData.
tb.sendTelemetryJson is working.
Environment
The text was updated successfully, but these errors were encountered: