Skip to content

Calculation of ArduinoJson buffer size and memory consumption required for AutoConnectElements #595

Answered by ghmpi
ghmpi asked this question in Q&A
Discussion options

You must be logged in to vote

@Hieromon

I got it working! It was indeed running out of memory.

Adding the following to AutoConnectDefs.h fixed it!

#define AUTOCONNECT_JSONDOCUMENT_SIZE (16 * 1024)

The devkitc board was working because AUTOCONNECT_JSONPSRAM_SIZE is defined larger then the regular AUTOCONNECT_JSONDOCUMENT_SIZE. (8 * 1024) on a regular board vs (16 * 1024) on boards with PSRAM.

A suggestion.. if you can have the "[AC] Deserialize:NoMemory" text/error appear on the page that the error occurred.. /alarm in my case.. instead of just dropping the page, it would help the next poor soul a few hours of troubleshooting! Not sure how easy it would be to do.

Thank you again @Hieromon , you have a neat project.

Reg…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Hieromon
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #592 on April 07, 2023 15:28.