Page 1 of 1
send update from shadow and shows error in esp32
Posted: Wed May 01, 2019 1:58 am
by wegunterjr
I have setup the shadow, and subscribed to the delta topic, but when i change something in the shadow (a cheap way to send an update), the shadow is update/accepted, the delta shows in AWS, but on the esp32 it shows:
Code: Select all
aws_iot: Failed to parse JSON: -1
Any thoughts?
Re: send update from shadow and shows error in esp32
Posted: Wed May 01, 2019 9:25 am
by chegewara
Maybe there is memory corruption issue and when received message is being parsed then its no longer valid json string? Or most likely there is some issue with aws_iot library. For example when i am using esp-idf to work with aws-iot (before it was splitted to separate repository) im having issues with sending json string in last will topic, so i have to send plain text, which is very inconvenient but works.
Re: send update from shadow and shows error in esp32
Posted: Wed May 01, 2019 1:53 pm
by wegunterjr
Ah...got ya. It looks like I will have to dig into the core. I am using 3.3 (PlatformIO Espressif32 v1.7) library.
Why did they move it out to separate repo? Does it have improvements?
I am finding that I had to increase my MQTT RX buffer to match the size of the MQTT message AWS was sending, and had to adjust the task stack size to 14k to avoid stack overflows. Now it seems I will have to dig in to the core esp idf AWS library and see what is happening.