英文:
Sending data to thingsboard with a timestamp defined by us
问题
有没有办法发送数据到Thingsboard,并由我们定义时间戳?
项目大致如下...
我想比较在建筑物安装更好的窗户之前和之后的能源消耗,使用一个能源计量器:
-- 安装前的能源消耗 --> 我有来自能源账单的数据,我想将其发送到Thingsboard。
类似... 能源消耗和能源账单的时间戳
然后比较这两种类型的数据...
感谢帮助
已尝试CSV、Swagger API Post更新遥测数据。
英文:
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
答案1
得分: 2
你可以这样做,在ThingsBoard客户端API中,当你提交数据时,可以定义数据的时间戳(https://thingsboard.io/docs/reference/http-api/#telemetry-upload-api):
只需使用以下格式设置你的有效负载的时间戳:
{"ts":1451649600512, "values":{"key1":"value1", "key2":"value2"}}
其中"ts"是你的时间戳,以毫秒为单位。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论