getStatisticsConfig
获取统计配置,获取开通智能计量的 dp 点及配置。
请求参数
| 参数 | 数据类型 | 说明 | 是否必填 |
|---|---|---|---|
| devId | string | 设备 ID | 是 |
返回值
Array<{
algorithmType: 'sum' | 'avg' | 'minux' | 'max' | 'min' | 'count';
dpId: number;
productId: string;
statisticInterval: number;
storageDuration: number;
}>
| 参数 | 数据类型 | 说明 |
|---|---|---|
| algorithmType | string | 统计类型,'sum' | 'avg' | 'minux' | 'max' | 'min' | 'count';默认 sum |
| dpId | number | dp id |
| productId | string | 产品 id |
| statisticInterval | number | 统计间隔,数据保存天数,1(天)、2(小时)、4(月)、16(15 分钟) |
| storageDuration | number | 数据保存天数 |
请求示例
// @ray-js/ray^1.2.12
import { getStatisticsConfig } from '@ray-js/ray';
getStatisticsConfig({
devId: 'vdevo166789063330437',
})
.then((respo

文章介绍了如何使用Ray.js库中的getStatisticsConfig和相关函数,如getStatisticsRang15min、getStatisticsRangHour等,来获取设备的统计配置和按不同时间间隔(15分钟、小时、天、月)的统计数据,包括数据类型、dp点ID、统计类型和保存期限。
最低0.47元/天 解锁文章
227

被折叠的 条评论
为什么被折叠?



