能耗传感器
报告ing Accumulated Energy in Wh and VARh
的 HTTP 集成 energy sensors使用以下结构:
POST /services/gear/DeviceIntegrationService.svc/UpdateEnergySensorValueSummation HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"activeEnergySummationWh": 112685.9,
"reactiveEnergySummationVARh": 18973.4,
"timestamp": "2021-02-23T14:55:03"
}参数
| 名称 | 说明 | 数据类型 |
|---|---|---|
| accessToken | 具有更新端点信息权限的访问令牌。更多信息请参见该页面。 | text |
| endpointID | 唯一端点标识符或设备地址与端点地址的组合(格式为 [deviceAddress]:endpointAddress,例如:[device-1234]:1)。这些值可以在端点管理页面找到。 | numeric |
| activeEnergySummationWh | Valor acumulado de energía activa informado por el sensor, expresado en watt-hora (Wh). | numeric |
| reactiveEnergySummationVARh | Valor acumulado de energía reactiva informado por el sensor, expresado en volt-ampere-reactivo-hora (VARh). | numeric |
| timestamp | 可选值,表示与测量对应的 UTC 日期和时间。日期格式必须与日期格式部分指定的格式之一相匹配。如果省略该字段,平台将假定测量对应于当前日期和时间。 | text |
报告ing Accumulated Energy in "raw" Format
Accumulated energy 可以以 raw 值 使用 ex按下ion converter. 当设备无法执行转换并发出需要在注入平台前进行转换的值时,此选项很方便。
下面是 raw 格式请求的示例:
POST /services/gear/DeviceIntegrationService.svc/UpdateFlowSensorValueSummationRaw HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"rawData": "112685.9,18973.4",
"timestamp": "2021-02-23T14:55:03"
}Como puede verse en este ejemplo, el campo RawData combina el acumulado de energía activa y el acumulado de energía reactiva en un único string, en el que ambos valores están separados por una coma.
参数
| 名称 | 说明 | 数据类型 |
|---|---|---|
| accessToken | 具有更新端点信息权限的访问令牌。更多信息请参见该页面。 | text |
| endpointID | 唯一端点标识符,可以在端点管理页面找到。 | numeric |
| rawData | Valor reportado por el sensor, como texto. Deben indicarse dos expresiones en el 表达式转换器. La primera expresión se utiliza para obtener la energía activa acumulada a partir de la variable rawData. La expresión debe devolver un valor numérico indicando expresado en expresado en watt-hora (Wh). En el ejemplo anterior, podría utilizarse la siguiente expresión:ToNumber(StringPart(rawData, 1, ','))La segunda expresión se utiliza para obtener la energía reactiva acumulada a partir de la variable rawData. La expresión debe devolver un valor numérico indicando expresado en expresado volt-ampere-reactivo-hora (VARh). En el ejemplo anterior, podría utilizarse la siguiente expresión:ToNumber(StringPart(rawData, 2, ',')) | text |
| timestamp | 可选值,表示与测量对应的 UTC 日期和时间。日期格式必须与日期格式部分指定的格式之一相匹配。如果省略该字段,平台将假定测量对应于当前日期和时间。 | text |