Register Device¶
The Register Device node registers one or more devices.
Node Type¶
EnOS.
Input and Output Ability¶
This node has multiple entry points and 2 exit points (success/failure).
Node Properties¶
Name
The name for this node.
Description
The description for this node.
Limitations¶
When registering multiple devices, the
productKey
must be the same. If not, the registration will fail for all devices.
Samples¶
Input Sample¶
{
"MetaData": {
"messageType": "DeviceRegister",
"assetId": "assetId",
"deviceKey": "deviceKey",
"productKey": "productKey",
"orgId": "yourorgId",
"ts": "1660641920793"
},
"Body": {
"ComponentRequest[Register-Device]": [
{
"timezone": "+08:00",
"deviceKey": "deviceKey1",
"productKey": "productKey1",
"deviceName": {
"defaultValue": "device1",
"i18nValue": {}
},
"deviceDesc": "devDesc"
},
{
"timezone": "+08:00",
"deviceKey": "deviceKey2",
"productKey": "productKey1",
"deviceName": {
"defaultValue": "device2",
"i18nValue": {}
},
"deviceDesc": "devDesc"
}
]
}
}
Output Sample¶
The values of
componentResult
indicates whether the device(s) are registered successfully.Success
: All devices are registered successfully.Failure
: Failed to register some of or all the devices.
The information for all the devices (includes successful and failed) will be displayed in
ComponentRequest[Register-Device]
in theBody
.
{
"MetaData": {
"messageType": "DeviceRegister",
"assetId": "assetId",
"deviceKey": "deviceKey",
"productKey": "productKey",
"orgId": "yourorgId",
"componentResult": "Success",
"ts": "1660641920793"
},
"Body": {
"ComponentRequest[Register-Device]": [
{
"timezone": "+08:00",
"deviceKey": "deviceKey1",
"productKey": "productKey1",
"deviceName": {
"defaultValue": "device1",
"i18nValue": {}
},
"deviceDesc": "devDesc"
},
{
"timezone": "+08:00",
"deviceKey": "deviceKey2",
"productKey": "productKey1",
"deviceName": {
"defaultValue": "device2",
"i18nValue": {}
},
"deviceDesc": "devDesc"
}
]
}
}