Bearer device

A bearer device is a device that can manage other devices. In other words, it can forward payloads to them. In the payloads below, the BEARER_DEVICE_UID value refers to the bearer device uid while the MODULE_UID value refers to the managed device

[DEVICE_IDENTIFIER]

unique identifier for this device on the bearer side

[DEVICE_TYPE]

type of the device on the bearer side

[BRAND_IDENTIFIER]

unique brand identifier in hexadecimal format

[BRAND_NAME]

unique brand name key to identify this brand

[SUBMODEL_IDENTIFIER]

unique submodel identifier in hexadecimal format (among other submodels in the same brand)

[SUBMODEL_NAME]

unique submodel name key to identify this submodel. Most of the time, the submodel name is identical to its model name

Associate

To associate a device to be managed by a bearer, use the following payload. However such association needs to be validated (see “validate” below) :

hide footbox
title Payload direction
clients -> devices: associate payload

Payload

{
 "action": "associate",
 "timestamp":"[TIMESTAMP]",
 "uid":"[PAYLOAD_UID]",
 "modules": [
     {
         "id":"[MODULE_UID]",
         "device":{
             "identifier":"[DEVICE_IDENTIFIER]", // optional
             "type":"[DEVICE_TYPE]", // optional
             "bearerId":"[BEARER_DEVICE_UID]",
             "brandIdentifier":"[BRAND_IDENTIFIER]", // optional
             "brandName":"[BRAND_NAME]", // optional
             "modelIdentifier":[DEVICE_MODEL_ID], // optional
             "modelName":"[DEVICE_MODEL_NAME]", // optional
             "submodelIdentifier":"[SUBMODEL_IDENTIFIER]", // optional
             "submodelName":"[SUBMODEL_NAME]", // optional
             "code":"[YCB_CODE]", // optional
             "[SUBDEVICE_NAME]s":[
                 {same payload found in "modules" above},
                 ...
             ]
         }
     }
 ]
}

See [TIMESTAMP], [PAYLOAD_UID], [BEARER_DEVICE_UID], [DEVICE_MODEL_ID], [DEVICE_MODEL_NAME], [DEVICE_IDENTIFIER], [DEVICE_TYPE], [BRAND_IDENTIFIER], [BRAND_NAME], [SUBMODEL_IDENTIFIER], [SUBMODEL_NAME]

Validate

Once a device is successfully associated to their bearer (see “associate” above), it needs to be validated to be usable

hide footbox
title Payload direction
clients -> devices: validate payload

Payload

{
 "action": "validate",
 "timestamp":"[TIMESTAMP]",
 "uid":"[PAYLOAD_UID]",
 "modules": [
     {
         "id":"[MODULE_UID]",
         "device":{
             "bearerId":"[BEARER_DEVICE_UID]",
             "code":"[YCB_CODE]",
             "[SUBDEVICE_NAME]s":[
                 {same payload found in "modules" above},
                 ...
             ]
         }
     }
 ]
}

See [TIMESTAMP], [PAYLOAD_UID], [BEARER_DEVICE_UID]

Remove

You can remove a managed device from their bearer using such payload

hide footbox
title Payload direction
clients -> devices: validate payload

Payload

{
 "action": "remove",
 "timestamp":"[TIMESTAMP]",
 "uid":"[PAYLOAD_UID]",
 "modules": [
     {
         "id":"[MODULE_UID]",
         "device":{
             "bearerId":"[BEARER_DEVICE_UID]"
         }
     }
 ]
}

See [TIMESTAMP], [PAYLOAD_UID], [BEARER_DEVICE_UID]