broker: command/insert
Notifies the user about new device command.
Subscription Topic and Payload
Topic
dh/command/{network-id}/{devicetype-id}/{device-id}/{command-name}
Where:
- network-id - DeviceHive Network ID
- devicetype-id - DeviceHive DeviceType ID
- device-id - DeviceHive Device ID
- command-name - Command name
Payload Representation
{
"action": {string},
"subscriptionId": {guid},
"command": {
"id": {integer},
"timestamp": {datetime},
"userId": {integer},
"deviceId": {string},
"command": {string},
"parameters": {object},
"lifetime": {integer},
"status": {string},
"result": {object}
}
}
Payload Parameters
Property Name | Type | Description |
---|---|---|
action | string | Action name: command/insert |
subscriptionId | guid | Identifier of the associated subscription. |
command | object | A DeviceCommand resource representing the command. |
command.id | integer | Command identifier. |
command.timestamp | datetime | Command timestamp (UTC). |
command.userId | integer | Associated user identifier. |
command.deviceId | string | Device unique identifier. |
command.command | string | Command name. |
command.parameters | object | Command parameters, a JSON object with an arbitrary structure. |
command.lifetime | integer | Command lifetime, a number of seconds until this command expires. |
command.status | string | Command status, as reported by device or related infrastructure. |
command.result | object | Command execution result, an optional value that could be provided by device. |
Updated almost 7 years ago