Julia
Julia

Reputation: 21

Sending data to thingsboard with a timestamp defined by us

is there a way to send data to thingsboard with a timestamp defined by us??

The project is something like this... i want to compare energy consumption before and after putting better windows in the building with an energy meter:

-- energy comsumption before installation --> i have data from the energy bills, and i want to send it to Thingsboard. Something like... energy consumption and timestamp of energy bills

And than compare the 2 type of data...

tks for the help

already tried CSV, swagger API Post update telemetry

Upvotes: 2

Views: 1177

Answers (1)

Sdaia
Sdaia

Reputation: 332

Yes you can to it, in thingsboard client side api you can define your data timestamp when you are posting it (https://thingsboard.io/docs/reference/http-api/#telemetry-upload-api):

Just set your payload with timetamp with this format:

{"ts":1451649600512, "values":{"key1":"value1", "key2":"value2"}}

Where "ts" is your timestamp in miliseconds.

Upvotes: 2

Related Questions