esp8266-aws_iot icon indicating copy to clipboard operation
esp8266-aws_iot copied to clipboard

AWS IoT shadow not working

Open martin-vl opened this issue 7 years ago • 4 comments

I tested the mqtt_x509_DER example and works really nice. Only I am not receiving the shadow messages. Does someone knows what the reason could be?

Via the AWS IoT test console I send the following to the topic "$aws/things/iotTestDevice3/shadow/update": { "state" : { "desired" : { "light" : 1 } } }

In the AWS IoT console I see messages on .../shadow/update and .../shadow/update/delta. But when I subscribe with my ESP to "$aws/things/iotTestDevice3/shadow/update/delta" or "#" I don't receive any thing.

I also tested with the Python SDK and started the ThingShadowEcho.py and there it works fine, so the policy settings in AWS IoT are fine.

Is this a bug? Or I am doing something wrong?

martin-vl avatar Jun 17 '18 18:06 martin-vl

I am seeing this behavior as well. Also, when I publish directly to $aws/things/<thing-name>/shadow/update/delta through the AWS console, my device does receive the message.

cjessett avatar Jun 21 '18 20:06 cjessett

But you are also not receiving a delta when you do an update?

martin-vl avatar Jun 22 '18 05:06 martin-vl

The issue is solved by increasing the max package size.

Change line 26 in PubSubClient.h file to something like: #define MQTT_MAX_PACKET_SIZE 1000

martin-vl avatar Jul 05 '18 19:07 martin-vl

MQTT_MAX_PACKET_SIZE

Just update via setBufferSize

lucasltv avatar Jun 15 '21 23:06 lucasltv