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. .. uml:: hide footbox title Payload direction devices -> cloud: get properties payload Payload ------- .. literalinclude:: ./json/get_properties.json 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. .. uml:: hide footbox title Payload direction cloud -> devices: sync properties payload Payload ------- .. code-block:: { "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 :term:`[TIMESTAMP]`, :term:`[PAYLOAD_UID]`, :term:`[BEARER_DEVICE_UID]`, :term:`[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. .. uml:: hide footbox title Payload direction device -> cloud: set properties payload Payload ------- .. code-block:: { "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, ... } } } ] } See :term:`[TIMESTAMP]`, :term:`[PAYLOAD_UID]`, :term:`[MODULE_UID|NAME|TYPE]` Sync Scenarios ============== The cloud is requesting the devices to synchronize their scenario information. This feature can not be implemented by all devices. .. uml:: hide footbox title Payload direction cloud -> devices: sync scenarios payload .. code-block:: { "action":"syncScenarios", "timestamp":"[TIMESTAMP]", "uid": "[PAYLOAD_UID]" }