Timestamp on API Access Project Subscription

Hi all,

I am trying to figure out where the eventTime timestamp is added in a subscription to a devices capabilities.
In my API Access project the capabilities for voltageMeasurement, powerMeter and energyMeter are subscribed to for an electricity meter.
There is some delay on average 5 seconds between the eventTime between readings of voltageMeasurement and powerMeter for the same meter.
I wouldn’t expect the delay from the meter to the hub to be 5 seconds so is the eventTime added at:

  1. In the Z-Wave message sent to the hub. (There is a time sent with Z-Wave messages but it is a time elapsed between readings not a timestamp see Delta time under section 4.56.6 Meter Report Command in Z-Wave spec)
  2. The hub adds the eventTime when the Z-Wave message reaches the hub.
  3. The SmartThings cloud adds the eventTime when the HTTP message reaches the SmartThings cloud from the Hub.
  4. The eventTime is only added when the HTTP POST message with meter data is sent to my third part application.

Below shows an example body of a HTTP POST message sent to my API that is integrated with SmartThings through a API Access Project. The eventTime I am talking about is also shown, in this case it is the time a power reading was recorded associated with a subscription called PowerMeter2.

{
   "messageType":"EVENT",
   "eventData":{
      "installedApp":{
         "installedAppId":"****************",
         "locationId":"********************"
      },
      "events":[
         {
            "eventTime":"2021-04-16T11:10:25Z",
            "eventType":"DEVICE_EVENT",
            "deviceEvent":{
               "eventId":"581ea2e3-9ea4-11eb-99f2-f70f649cc567",
               "locationId":"*****************",
               "ownerId":"********************",
               "ownerType":"LOCATION",
               "deviceId":"221eca3e-8d7b-4de5-a6fa-c3063bdae33b",
               "componentId":"main",
               "capability":"powerMeter",
               "attribute":"power",
               "value":333.6,
               "valueType":"string",
               "stateChange":true,
               "data":{
                  
               },
               "subscriptionName":"PowerMeter2"
            }
         }
      ]
   }
}

@nayelyz would you have any idea on this one or maybe recommend someone who knows?

Hi, @Warren1. I’m already checking this with the engineering team but just to clarify:

  • This delay happens in every event from the Device?
  • Did you compare the timestamps when the Z-Wave event is received in your DTH and when the Subscription is received?
  • Can you give more details on the Use Case and why it is important to get the exact timestamp, please?