Add Sub-Device


The Add Sub-Device node adds one or more sub-devices to a logged in gateway.

Node Type

EnOS.

Input and Output Ability

This node has multiple entry points and 2 exit points (success/failure).

Node Properties

../../../_images/add_sub_device.png


Name

The name for this node.


Description

The description for this node.

Samples

Input Sample

The devices to be added will be displayed in ComponentRequest[Topo-Add].

{
    "MetaData": {
        "messageType": "TopoDelete",
        "assetId": "assetId",
        "deviceKey": "deviceKey",
        "productKey": "productKey",
        "orgId": "yourOrgId",
        "ts": "1660634424249"
    },
    "Body": {
        "ComponentRequest[Topo-Add]": [
            {
                "clientId": "clientId",
                "sign": "971d1ae85824b444ac185ee48fe8580ab2d3d6ef43ed37e6ef1c40d0cc8971c1",
                "deviceKey": "deviceKey1",
                "productKey": "productKey1",
                "signMethod": "sha256",
                "timestamp": "1660634424154"
            }
        ]
    }
}

Output Sample

  • The values of componentResult indicates whether the devices are added successsfully.
    • Success: All devices are added successfully.
    • Failure: Failed to add some or all of the devices.
  • The information for all the devices (includes successful and failed) will be displayed in ComponentRequest[Topo-Add] in the Body.


{
    "MetaData": {
        "messageType": "TopoAdd",
        "assetId": "assetId",
        "deviceKey": "deviceKey",
        "productKey": "productKey",
        "orgId": "yourOrgId",
        "componentResult": "Success",
        "ts": "1660634424249"
    },
    "Body": {
        "ComponentRequest[Topo-Add]": [
            {
                "clientId": "clientId",
                "sign": "971d1ae85824b444ac185ee48fe8580ab2d3d6ef43ed37e6ef1c40d0cc8971c1",
                "deviceKey": "deviceKey",
                "productKey": "productKey",
                "signMethod": "sha256",
                "timestamp": "1660634424154"
            }
        ]
    }
}