get_device_commands_extended_new
To obtain commands from flespi, use the unit/get_device_commands_extended_new command.
svc=unit/get_device_commands_extended_new¶ms={"protocolId":<uint>, "deviceTypeId":<uint>}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
protocolId | Protocol ID |
deviceTypeId | Device type ID |
Example
Below is an example of the unit/get_device_commands_extended_new request.
svc=unit/get_device_commands_extended_new¶ms={"protocolId":1, "deviceTypeId":411}
Response
If the request is completed successfully, commands from flespi are returned.
{
"result": [
{
"settings": [],
"commands": [
{
"address": ["connection"],
"examples": [
{
"description": "Send script remote command",
"properties": {
"output": 13,
"payload": "616E792062696E617279207061796C6F6164"
}
}
],
"name": "custom",
"schema": {
"additionalProperties": false,
"description": "Send custom command to device",
"properties": {
"output": {
"maximum": 14,
"minimum": 0,
"title": "Output ID",
"type": "integer"
},
"payload": {
"maxLength": 2700,
"minLength": 2,
"pattern": "^(?:[0-9A-Fa-f]{2})+$",
"title": "Hex data to be sent to the device",
"type": "string"
},
"ttl": {
"default": 86400,
"maximum": 864000,
"minimum": 10,
"title": "Command time to live in seconds",
"type": "integer"
}
},
"required": ["output", "payload"],
"title": "Custom command",
"type": "object",
"x-view-order": ["output", "ttl", "payload"]
},
"tags": {
"custom": 1
}
}
]
}
]
}
If the request fails, an error code is returned.
Error codes
Error code | Description |
---|---|
4 | One of the following errors:
|
6 | Invalid device type. |