Sub-Device Batch Login¶
The Sub-Device Batch Login node batch logs in sub-devices.
Node Type¶
EnOS.
Input and Output Ability¶
This node has multiple entry points and 2 exit points (success/failure).
Samples¶
In the input and output logs, the information contained in the Metadata
is the gateway information. After the gateway logs in successfully, the sub-devices will be logged in in batches according to the sub-device information in the Body
. The output log will return the information for all the sub-devices (includes successful and failed).
Input Sample¶
{
"MetaData": {
"messageType": "SubDeviceLoginBatch",
"assetId": "assetId",
"deviceKey": "deviceKey",
"productKey": "productKey",
"orgId": "yourOrgId",
"ts": "1660103907656"
},
"Body": {
"clientId": "yourClientId",
"subDevices": [
{
"sign": "1ff29fb0058aeaf1f21fd5ede23541a6fbb5ad4f40e7779eac894c39b41cc258",
"deviceKey": "subdeviceKey1",
"productKey": "productKey1",
"secureMode": "2"
},
{
"sign": "8fe3f142dabea8c821ae1d25110b4ab4f48d582b8766c56d155ba33025fed4a7",
"deviceKey": "subdeviceKey2",
"productKey": "productKey2",
"secureMode": "2"
}
],
"signMethod": "sha256",
"timestamp": "1660103907527"
}
}
Output Sample¶
The values of componentResult
indicates whether the devices are logged in successsfully.
Success
: All devices are logged in successfully.Failure
: Failed to log in some or all of the devices.
{
"MetaData": {
"messageType": "SubDeviceLoginBatch",
"assetId": "assetId",
"deviceKey": "deviceKey",
"productKey": "productKey",
"orgId": "yourOrgId",
"componentResult": "Failure",
"ts": "1660103907656",
"ComponentReply[SubDevice-LoginBatch]": {
"loginedSubDevices": [
{
"productKey": "productKey1",
"deviceKey": "subdeviceKey1",
"assetId": "assetId1"
}
],
"failedSubDevices": [
{
"productKey": "productKey2",
"deviceKey": "subdeviceKey2"
}
]
}
},
"Body": {
"clientId": "clientId",
"subDevices": [
{
"sign": "1ff29fb0058aeaf1f21fd5ede23541a6fbb5ad4f40e7779eac894c39b41cc258",
"deviceKey": "productkey1",
"productKey": "subdevicekey1",
"secureMode": "2"
},
{
"sign": "8fe3f142dabea8c821ae1d25110b4ab4f48d582b8766c56d155ba33025fed4a7",
"deviceKey": "productkey2",
"productKey": "subdevicekey2",
"secureMode": "2"
}
],
"signMethod": "sha256",
"timestamp": "1660103907527"
}
}