I currently have a bunch or things registered in the AWS IOT console. i am building a web-page that will list things and display attributes from each things shadow. i am struggling to understand how do i know if a thing is currently online in (near) real time. I am retrieving the things using the PHP SDK
IotClient->listThings()
I am displaying their attributes using
IotDataPlaneClient->getThingShadow()
and
IotDataPlaneClient->updateThingShadow()
to update the shadow and this is all working fine.
But i have no way of knowing Whether or not a thing is online at a the moment.
Advertisement
Answer
Use Fleet Indexing to track status of connectivity.
The information indexed per Thing:
{name:connectivity.timestamp, type:Number},
{name:connectivity.version, type:Number},
{name:connectivity.connected, type:Boolean}
*Remember the clientId used to connect must also exist as a Thing in the Thing registry.