Resource Message
{
msgType: "resource",
data: [
{
time: "1503556533",
attr: "load_power",
value: "3.93",
did: "lumi.158d00011c1cee"
}
]
}
| parameter |
description |
| msgType |
message type, the value is resource |
| did |
device ID |
| attr |
resource alias, all resource alias refer to the web page "application management - resource authorization" |
| value |
the latest value of the resource |
| time |
timestamp, in seconds |
Device Message
{
msgType: "device",
data: {
openId: "GoeFrrL7mN9SsGRi8WJn4x4YnQpXTS",
name: "02凝胶净化室",
model: "lumi.acpartner.aq1",
time: 1503560767,
event: "DEV_INFO_CHANGED",
did: "lumi.158d00010b4090",
parentId: ""
}
}
| parameter |
description |
| msgType |
message type, the value is device |
| openId |
user ID |
| did |
device ID |
| name |
device name |
| model |
device type |
| parentId |
the ID of parent device (gateway), if is gateway, this field is empty |
| event |
event type, see the table below |
| time |
timestamp, in seconds |
| event type |
description |
| GW_BIND |
Gateway network |
| GW_UN_BIND |
Gateway unbundled |
| GW_ONLINE |
Gateway online |
| GW_OFFLINE |
Gateway Offline |
| SUB_DEV_BIND |
Sub-device network |
| SUB_DEV_UN_BIND |
Sub-device unbundled |
| SUB_DEV_ONLINE |
Sub device is online |
| SUB_DEV_OFFLINE |
Sub device is offline |
| DEV_INFO_CHANGED |
Device information changes |