Get timestamp from the JSON payload

BERNARD Thomas 166 Reputation points
2022-02-01T09:13:50.957+00:00

Is it possible the override the timestamp of the telemetry payload ?

When I check raw data from my device in IOT Central application, I see 2 timestamp:

  • The first (timestamp) is provided by my device on its telemetry payload, but it is not used by the application
  • The second (_timestamp) is automatically added by the IOT Central application (I think this is the data reception timestamp)

170107-image.png

I want to use only my device's timestamp in the application, because this is the only real accurate value.

Is there anybody who know how to do that ?

Thanks in advance for the help !

Thomas

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
265 questions
{count} votes

Accepted answer
  1. Roman Kiss 2,021 Reputation points
    2022-02-07T11:04:12.57+00:00

    Hi Thomas,

    The following is my example for sending a telemetry data (using the current protocol MQTT version 3.1.1) to the IoT Central App:

    device3, modelId=dtmi:com:example:TemperatureController;2
    topic:

    devices/device3/messages/events/$.ct=application%2Fjson&$.ce=utf-8&iothub-creation-time-utc=2022-02-07T09:29:05.681Z  
    

    payload:

    {  
      "workingSet":38.36  
    }  
    

    IoT Central App, Raw data:

    171901-image.png

    Thanks
    Roman

    4 people found this answer helpful.

0 additional answers

Sort by: Most helpful