Skip to content

Still facing JSON truncation issues despite LARGE_JSON_BUFFERS #109

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

Closed
lstwn opened this issue Apr 13, 2020 · 2 comments
Closed

Still facing JSON truncation issues despite LARGE_JSON_BUFFERS #109

lstwn opened this issue Apr 13, 2020 · 2 comments

Comments

@lstwn
Copy link

lstwn commented Apr 13, 2020

Hey,

this is related to #96. I am using an ESP 8266 device and I'm trying to get a simple temperature sensor working as a web thing.

I tried two setups due to the hint mentioned in #96:

  1. one device with three properties (location, temperature, humidity) code
  2. two devices code
    • one with location and temperature
    • one with location and humidity

Both do not work.

The first setup suffers from the truncation issues despite setting #define LARGE_JSON_BUFFERS 1 or #define SMALL_JSON_DOCUMENT_SIZE <something> and
#define LARGE_JSON_DOCUMENT_SIZE <something> with different values, but no luck. The properties itself work because when navigating to https://[...]/properties they show up with the right values from the sensor. But the device view is truncated.

The second setup is even more weird. Could also be an error in my code though. Both devices show the location as specified, but also only the humidity and no temperature although I assigned them correctly I think. This is also true for the https://[...]/properties path: Even on the temperature device there is only location and (falsely) humidity shown despite not calling addProperty on that device..

Let me know if I can help with anything else.

EDIT: I should note that all libraries are up do date:

Updating ArduinoJson                     @ 6.15.1         [Up-to-date]
Updating AsyncTCP                        @ 1.1.1          [Up-to-date]
Updating ESP Async WebServer             @ 1.2.3          [Up-to-date]
Updating ESPAsyncTCP                     @ 1.2.2          [Up-to-date]
Updating HTU21D                          @ 1.2.1          [Up-to-date]
Updating webthing-arduino                @ 0.11.2         [Up-to-date]

UPDATE: Dumb me, thanks a lot!

@LasseRosenow
Copy link

LasseRosenow commented Apr 13, 2020

I think #define LARGE_JSON_BUFFERS 1 has to be set before all your includes... otherwise those libs will ignore it.

@mrstegeman
Copy link
Contributor

I think #define LARGE_JSON_BUFFERS 1 has to set before all your includes... otherwise those libs will ignore it.

Yes, this is exactly right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants