Common Payload

Payload

All the other the payloads are based on this common payload.

{
  "action": "[ACTION]",
  "event": "[EVENT]",
  "timestamp":"[TIMESTAMP]",
  "uid":"[PAYLOAD_UID]",
  "authorization": "[AUTHORIZATION]",
  "bearerId":"[BEARER_DEVICE_UID]",
  "plantId": "[PLANT_UID]",
  "clientId": "[CLIENT_ID]",
  "modules": [
      {
          "id":"[MODULE_UID]",
          "name":"[MODULE_NAME]",
          "type":"[MODULE_TYPE]",
          "device":{
              "bearerId":"[BEARER_DEVICE_UID]",
              "associateStatus":"[ASSOCIATE_STATUS]",
              "model":"[DEVICE_MODEL_NAME]",
              "oid":"[DEVICE_OID]",
              "bearerId":"[BEARER_DEVICE_UID]",
              "brandIdentifier":"[BRAND_IDENTIFIER]",
              "modelIdentifier":[DEVICE_MODEL_ID],
              "submodel":"[DEVICE_SUBMODEL_NAME]",
              "brand":"[DEVICE_BRAND]",
              "systems":[
                  "[SYSTEM_NAME]",
                  ...
              ],
              "status":[
                  {
                      "capability":"[CAPABILITY_NAME]",
                      "value":"[VALUE]",
                      "index":[INDEX]
                  },
                  ...
              ],
              "uartFrame":"[UART FRAME]",
              "code":"[YCB_CODE]",
              "[SUBDEVICE_NAME]s":[
                  {same payload found in "modules" above},
                  ...
              ],
              "upgrade":{
                  "file": "[FIRMWARE_NAME]",
                  "size": [FIRMWARE_SIZE],
                  "checksum": "[FIRMWARE_CHECKSUM]"
              },
              "localStream":{
                  "ip": "[CAMERA IP]",
                  "port": [CAMERA VIDEO PORT]
              }
          }
      }
  ],
  "status":[ // You may find this status array if the command is targetting no modules in particular - ie any device receiving this should try to execute it
      {
          "capability":"[CAPABILITY_NAME]",
          "value":"[VALUE]",
          "index":[INDEX]
      },
      ...
  ],
  "topic": "[TOPIC]",
  "mqttTopics":{
      "subscribeTo": [
          "topic/to/subscribe/to"
      ],
      "publishTo": [
          "topic/to/publish/to"
      ]
  }
}

Description

Here you’ll find a description of some of the fields. All the fields described here are optional.

[ACTION]

set to specify informations below should be executed. The value is specifying the action type :

  • command

  • syncScenarios

  • executeScenario

  • newTopics

  • upgrade

  • reboot

  • get_info

[EVENT]

set to specify informations below are the new state of the specified elements. The value is specifying the event type :

  • silent (should not notify the end user visually - the only purpose is to update values)

  • infos

  • alert (should trigger a notification)

[TIMESTAMP]

unix time when the payload was generated (with the Y-m-d H:i:s format)

[PAYLOAD_UID]

uid identifying the payload

[AUTHORIZATION]

uid of the user owning this device

[PLANT_UID]

uid of the plant to which this device belongs

[MODULE_UID|NAME|TYPE]

uid/name/type of the module

[BEARER_DEVICE_UID]

if the device is managed by an other one (a HomePilot for example), here is the uid of the manager

[ASSOCIATE_STATUS]

the associate status of the device seen by the sender of the payload. This value can only be one of the following :

  • DISSOCIATED

  • PENDING

  • LEARNING

  • ASSOCIATED

[DEVICE_MODEL_NAME]

unique name identifying the device model (“ycb”, “prf”, … for example)

[DEVICE_MODEL_ID]

the unique integer identifying the device model

[DEVICE_SUBMODEL_NAME]

the unique name identifying the device submodel (“YC-4000B”, “PRF-100”, … for example)

[DEVICE_BRAND]

the brand name of the device

[SYSTEM_NAME]

the unique name identifying on of the device systems (“energy”, “home”, … for example)

[CAPABILITY_NAME]

name of the capability

[VALUE]

the value associated to the capability

[INDEX]

the index of this capability for this device. It can be useful for devices with hidden subdevices OR indexed identical capabilities

  [TOPIC]

the topic on which this payload has been published to. It may not appear if not relevant

mqttTopics

may not appear

[FIRMWARE_NAME]

url of the firmware (http://ip:port/cw/CW-100_0_3_0_PROD for example)

[FIRMWARE_SIZE]

size of the firmware

[FIRMWARE_CHECKSUM]

checksum of the firmware