调光器
报告端点状态
The integration por MQTT de dimmers y otros dispositivos similares (variadores de velocidad, etc.)使用以下结构:
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"isOn": true,
"dimValue"; 75,
"timestamp": "2021-02-23T14:55:03",
"mqttMethod": "UpdateDimmerStatus",
"mqttRID": "tkrs34"
}参数
| 名称 | 说明 | 数据类型 |
|---|---|---|
| accessToken | 具有更新端点信息权限的访问令牌。更多信息请参见该页面。 | text |
| endpointID | 唯一端点标识符或设备地址与端点地址的组合(格式为 [deviceAddress]:endpointAddress,例如:[device-1234]:1)。这些值可以在端点管理页面找到。 | text |
| isOn | Indica si el artefacto está encendido (true) o apagado (false) | bool |
| dimValue | Indica el nivel de dimerización, como porcentaje entre 1 y 100. | numeric |
| timestamp | 可选值,表示与测量对应的 UTC 日期和时间。日期格式必须与日期格式部分指定的格式之一相匹配。如果省略该字段,平台将假定测量对应于当前日期和时间。 | text |
| mqttMethod | Corresponding method of the service, in this case UpdateDimmerStatus | string |
| mqttRID | Optional identifier for the request, in case you want to get a confirmation response. | string |
报告e de estado en formato "raw"
端点状态可以以 raw 值, 使用 表达式转换器. Esta opción es conveniente cuando el dispositivo no es capaz de realizar conversiones, y emite valores que necesitan ser transformados antes de inyectarse en la plataforma.
下面是 raw 格式请求的示例:
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"rawData": "true/75",
"timestamp": "2021-02-23T14:55:03",
"mqttMethod": "UpdateDimmerStatusRaw",
"mqttRID": "tkrs34"
}参数
| 名称 | 说明 | 数据类型 |
|---|---|---|
| accessToken | 具有更新端点信息权限的访问令牌。更多信息请参见该页面。 | text |
| endpointID | 唯一端点标识符,可以在端点管理页面找到。 | numeric |
| rawData | Valor reportado por el sensor, como texto. Deben indicarse dos expresiones en el 表达式转换器:La primera expresión debe devolver un valor booleano indicando si el artefacto está encendido (true) o apagado (false).La segunda expresión debe devolver un valor numérico indicando el nivel de dimerización del aparato, como porcentaje entre 1 y 100. | text |
| timestamp | 可选值,表示与测量对应的 UTC 日期和时间。日期格式必须与日期格式部分指定的格式之一相匹配。如果省略该字段,平台将假定测量对应于当前日期和时间。 | text |
| mqttMethod | Corresponding method of the service, in this case UpdateDimmerStatusRaw | string |
| mqttRID | Optional identifier for the request, in case you want to get a confirmation response. | string |