Get Properties¶
Request for a sync properties from the cloud. Like the sync timezone the device has to send a getProperties payload and wait for syncProperties payload.
Payload¶
{
"event": "getProperties",
"uid": "[PAYLOAD_UID]",
"timestamp": "[TIMESTAMP]",
"modules": [
{
"id": "[MODULE_UID]",
"device": null
}
]
}
Sync properties¶
The cloud is requesting target devices to update their properties information. A property is a configuration of the device. For any gateway device (ie a device managing others), you should expect to get the bearerId and the associatedDevices keys. The latter is listing all devices managed by this gateway as well as their own properties.
Payload¶
{
"action":"syncProperties",
"timestamp":"[TIMESTAMP]",
"uid": "[PAYLOAD_UID]",
"modules": [
{
"id":"[MODULE_UID]",
"device":{
"properties": {
"parentLocationId":"[LOCATION_UID]",
"key1":"value1",
"key2":"value2",
...
},
"bearerId":"[BEARER_DEVICE_UID]",
"associatedDevices":[
{
"id":"[MODULE_UID]",
"device":{
"properties":{
"parentLocationId":"[LOCATION_UID]",
"key1":"value1",
"key2":"value2",
...
}
}
}
]
}
}
]
}
See [TIMESTAMP], [PAYLOAD_UID], [BEARER_DEVICE_UID], [MODULE_UID|NAME|TYPE]
Set properties¶
The device sets its properties to the cloud. Use this if you want to store unique information about your device to be retrieved later from a syncProperties payload. When this command is successful, the device should expect an incoming syncProperties payload to validate the change.
Payload¶
{
"action":"setProperties",
"timestamp":"[TIMESTAMP]",
"uid": "[PAYLOAD_UID]",
"modules": [
{
"id":"[MODULE_UID]",
"device":{
"properties": {
"foo":"bar",
"my-custom-property-key":"associated-value",
"property-to-remove":null,
...
}
}
}
]
}
Sync Scenarios¶
The cloud is requesting the devices to synchronize their scenario information. This feature can not be implemented by all devices.
{
"action":"syncScenarios",
"timestamp":"[TIMESTAMP]",
"uid": "[PAYLOAD_UID]"
}