Im not sure I agree at all about not being able to see the messages because the sensors updated. The gateway is sending its data like so…
things/{BLUR}/shadow/update
Jun 10, 2019 3:47:38 PM -0300ExportHide
{
"state": {
"reported": {
"Gateway_Config": {
"mac": "{BLUR}",
"ip": "{BLUR}",
"xbee_address": "{BLUR}",
"network_id": "{BLUR}",
"preamble": "0",
"tx_power": "4",
"xbee_ready": "1"
}
}
}
}
Which “should” be adding a field “Gateway_Config” to the device shadow with its data. It does not.
Last update: Jun 10, 2019 3:44:42 PM -0300
Shadow state:
"desired": {
"welcome": "aws-iot"
},
"reported": {
"welcome": "aws-iot"
}
}
Metadata:
{
"metadata": {
"desired": {
"welcome": {
"timestamp": 1560192282
}
},
"reported": {
"welcome": {
"timestamp": 1560192282
}
}
},
"timestamp": 1560192659,
"version": 12
}
the sensors are sending info through the gateway to the SAME shadow document of the gateway like so…
things/{blur}/shadow/update
Jun 10, 2019 3:48:34 PM -0300
{
"state": {
"reported": {
"nodes": {
"{blur}": {
"transmission_count": 1,
"battery_level": 3.29406,
"type": 18,
"node_id": 0,
"rssi": 100,
"frequency": 0,
"duty cycle": 0
}
}
}
}
}
and
things/{blur}/shadow/update
Jun 10, 2019 3:48:50 PM -0300
{
"state": {
"reported": {
"nodes": {
"{blur}": {
"transmission_count": 1,
"battery_level": 3.29406,
"type": 1,
"node_id": 1,
"rssi": 100,
"humidity": 40.48,
"temperature": 24.35
}
}
}
}
}
these should be adding new fields to the gateway device shadow under “nodes” and then under their respective XBEE addresses with the sensor data. This is also not happening.
I can subscribe to the ‘update’ and ‘update/accepted’ topic in the IoT console and AWS never fires the ‘update/accepted’… meaning to me that the update was in fact not accepted as is suggested with the shadow not being updated. At the very least from what you are saying the shadow should be getting updated with the packet info the gateway sends, it does not. I dont believe it matters if the gateway is listening for the ‘update/accepted’ topic… AWS still sends it and we can listen for it in AWS IoT Test.
I agree that the messages from the gateway and sensors are received by AWS IoT at ‘things/{id}/shadow/update’ but I dont think AWS does anything with it like update the shadow. I concede I may be misunderstanding the whole process or at least the functionality of the NCD sensors but something isnt quite jiving haha. Happy to continue to track down this issue with you
cheers,
James