0
votes

I'm new to AWS IoT and want to know how to get my things connectivity status.

I've read about managing indexes and believe that this is what i'm looking for.

However in my architecture, i've IoT Greengrass core which is an Edge device that is physically linked to AWS Cloud, and Greengrass devices that are connected to this edge device with bluetooth and that i'm creating in AWS IoT as IoT Things too. (IoT Thing for both Greengrass core and Greengrass devices)

I believe that once the Edge device is connected to AWS, its connectivity status in the AWS_Things index will be updated to "true". But how about the IoT Devices that are not directly connected to AWS but through the edge device ? are their connectivity states is going to be updated too ? how does it work ?

Or should i make use of shadow attributes for connectivity states when it comes to these IoT Things that don't connect directly to AWS IoT Cloud Platform ?

2

2 Answers

1
votes

So I would do this in one of two ways:

One is with attributes, probably the best and "proper" way if only for the connected/disconnected status.

The other way is via having the Greengrass device query the BT attached device in the background locally, perhaps by bt-device -l (from the bluez-tools apt package). Upon detected it is no longer attached, you could publish an alert on a separate topic. The benefit of this method is that you could potentially query battery status or other properties periodically and publish under this specific topic i.e.:

IoTDevice1/BTDevice1/running True

IoTDevice1/BTDevice1/battery 80%

etc.

0
votes

About getting the state of GG* Devices, I suggest the following :

  • The physical GG Devices communicate with the GG Core via local Lambda functions once the Core get the state from a given Device, a Lambda function (which runs from the Core) set the status of the IoT Thing in the AWS Cloud Platform.

*GG : Greengrass