$gateway/operation/${productid}/${devicename}
$gateway/operation/result/${productid}/${devicename}
{"type": "online","payload": {"devices": [{"product_id": "CFCSQ5EAG7","device_name": "onlinedev00"}]}}
{"type": "online","payload": {"devices": [{"product_id": "CFCSQ5EAG7","device_name": "onlinedev00","result":0}]}}
Parameter | Type | Description |
type | String | Gateway message type. For proxied subdevice connection, the value is online |
payload.devices | Array | List of subdevices to be connected |
product_id | String | Subdevice product ID |
device_name | String | Subdevice name |
Parameter | Type | Description |
type | String | Gateway message type. For proxied subdevice connection, the value is online |
payload.devices | Array | List of subdevices to be connected |
product_id | String | Subdevice product ID |
device_name | String | Subdevice name |
result | Int | Subdevice connection result. For specific error codes, please see the table below |
{"type": "offline","payload": {"devices": [{"product_id": "CFCSQ5EAG7","device_name": "offlinedev00"}]}}
{"type": "offline","payload": {"devices": [{"product_id": "CFCSQ5EAG7","device_name": "offlinedev00","result":-1}]}}
Parameter | Type | Description |
type | String | Gateway message type. For proxied subdevice disconnection, the value is offline |
payload.devices | Array | List of proxied subdevices to be disconnected |
product_id | String | Subdevice product ID |
device_name | String | Subdevice name |
Parameter | Type | Description |
type | String | Gateway message type. For proxied subdevice disconnection, the value is offline |
payload.devices | Array | List of proxied subdevices to be disconnected |
product_id | String | Subdevice product ID |
device_name | String | Subdevice name |
result | Int | Subdevice disconnection result. For specific error codes, please see the table below |
Error Code | Description |
0 | Success |
-1 | The gateway device is not bound to the subdevice |
-2 | System error. Subdevice connection or disconnection failed |
801 | Request parameter error |
802 | The device name is invalid, or the device does not exist |
810 | Unsupported subdevice |