[英]export telemetry data of a device in ThingsBoard
im using thingsboard community edition.我正在使用 thingsboard 社区版。
i want to know if there is a way to export all time series data of a device into csv or any other file format.我想知道是否有办法将设备的所有时间序列数据导出为 csv 或任何其他文件格式。 i need all the data to analyse it.
我需要所有数据来分析它。
thingsboard Professional edition has this feature. thingsboard 专业版有这个功能。 but how about Community Edition?
但是社区版呢?
Default csv/xls export is only available in the professional version.默认 csv/xls 导出仅在专业版中可用。
But you could use the REST api to acquire the historical data.但是您可以使用 REST api 来获取历史数据。
My reference below states:我的参考如下:
You can also fetch list of historical values for particular entity type and entity id using GET request to the following URL您还可以使用对以下 URL 的 GET 请求获取特定实体类型和实体 ID 的历史值列表
http(s)://host:port/api/plugins/telemetry/{entityType}/{entityId}/values/timeseries?keys=key1,key2,key3&startTs=1479735870785&endTs=1479735871858&interval=60000&limit=100&agg=AVG
The supported parameters are described below:
支持的参数描述如下:
keys - comma separated list of telemetry keys to fetch.
keys - 要获取的遥测密钥的逗号分隔列表。
startTs - unix timestamp that identifies start of the interval in milliseconds.
startTs - unix 时间戳,以毫秒为单位标识间隔的开始。
endTs - unix timestamp that identifies end of the interval in milliseconds.
endTs - unix 时间戳,以毫秒为单位标识间隔结束。
interval - the aggregation interval, in milliseconds.
interval - 聚合间隔,以毫秒为单位。
agg - the aggregation function.
agg - 聚合 function。 One of MIN, MAX, AVG, SUM, COUNT, NONE.
MIN、MAX、AVG、SUM、COUNT、NONE 之一。
limit - the max amount of data points to return or intervals to process.
limit - 要返回的最大数据点数或要处理的时间间隔。
ThingsBoard will use startTs, endTs and interval to identify aggregation partitions or sub-queries and execute asynchronous queries to DB that leverage built-in aggregation functions."
ThingsBoard 将使用 startTs、endTs 和 interval 来识别聚合分区或子查询,并对利用内置聚合函数的 DB 执行异步查询。”
Reference: Thingsboard docs: ts data values api参考: Thingsboard 文档:ts 数据值 api
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.