I want to be able to access the timestamp data in the aws IOT shadow in my firmware so I can determine how current the shadow is as compared to my iot device status. Currently I am using the following mgos_event callback in my code to retrieve shadow event data using
mgos_event_add_group_handler(MGOS_SHADOW_BASE, myshadow_callback,NULL);
and in the call back I have
static void myshadow_callback(int ev,void *evd,void *arg)
{
LOG(LL_INFO, ("Inside Shadow Callback "));
LOG(LL_INFO, (“Event: %d,”,ev));
struct mg_str *myeventdata = (struct mg_str *)evd;
…
…
myeventdata only appears to contain the ‘desired’ and ‘reported’ portions of the aws shadow and does not contain the ‘metadata’ portion which actually has the timestamp information. Can someone please guide me how to get this.
Thanks in advance