send update from shadow and shows error in esp32

wegunterjr
Posts: 37
Joined: Thu Jun 07, 2018 3:05 am

send update from shadow and shows error in esp32

Postby wegunterjr » Wed May 01, 2019 1:58 am

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?

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: send update from shadow and shows error in esp32

Postby chegewara » Wed May 01, 2019 9:25 am

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.

wegunterjr
Posts: 37
Joined: Thu Jun 07, 2018 3:05 am

Re: send update from shadow and shows error in esp32

Postby wegunterjr » Wed May 01, 2019 1:53 pm

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.

Who is online

Users browsing this forum: No registered users and 247 guests