Command ======= When a device receive this payload, the device has to execute a command related to the capability provided. This payload will be send by the frontend most of the time. .. uml:: hide footbox title Payload direction clients -> devices: command payload Payload ------- .. code-block:: { "action": "command", "timestamp":"[TIMESTAMP]", "uid":"[PAYLOAD_UID]", "modules": [ { "id":"[MODULE_UID]", "device"|"scenario"|"service":{ "bearerId":"[BEARER_DEVICE_UID]", "status":[ { "capability":"[CAPABILITY_NAME]", "value":"[VALUE]" //optional }, ... ] } } ] } See :term:`[TIMESTAMP]`, :term:`[PAYLOAD_UID]`, :term:`[MODULE_UID|NAME|TYPE]`, :term:`[BEARER_DEVICE_UID]`, :term:`[CAPABILITY_NAME]`, :term:`[VALUE]` Some available capabilities --------------------------- start_stream ^^^^^^^^^^^^ The ``start_stream`` capability is sent when a user wants to watch the camera on a device through the ComfortLife application. The ``value`` field of this payload will be:: { "capability":"start_stream", "value": { "devicePeerName": "[DEVICE PEER NAME RANDOM UID]", "peerName": "[USER/LOCAL PEER NAME RANDOM UID]", "videoPort": [VIDEO PORT], "audioPort": [AUDIO PORT] "password": "[RANDOM PASSWORD]", "mediatorHost": "[MEDIATOR HOST]", "mediatorPort": [MEDIATOR PORT], "relayHost": "[RELAY HOST]", "relayPort": [RELAY PORT] } } stop_stream ^^^^^^^^^^^ The ``stop_stream`` capability is sent when a user stops the video stream on the ComfortLife application. The ``value`` field of the payload is:: { "capability":"stop_stream", "value": { "peerName": "[USER/LOCAL PEER NAME RANDOM UID]" } } Future capabilities ------------------- resolution ^^^^^^^^^^ This capability is used to set the video stream resolution. Currently the ``value`` field can take 3 values : ``low``, ``medium`` or ``high`` mirror and flip ^^^^^^^^^^^^^^^ The ``value`` field sets the mirror or flip mode to ``enable`` or ``disable`` bitrate ^^^^^^^ The ``value`` field contains an integer that sets the bitrate of the video stream. ircut ^^^^^ Sets the ircut mode of the device to ``enable``, ``disable`` or ``auto``. speaker_volume ^^^^^^^^^^^^^^ Sets the speaker volume of the device. The value ranges between 0 and 100. detection ^^^^^^^^^ ``enable`` or ``disable`` the pir detection