Closed njkrmd19 closed 2 years ago
found out in the events I am getting an Invalid Command? anyone know what the valid commands are to open & close blinds?
[ { "command": { "parameters": [ "*p1" ], "command": "open", "execId": "b5fec3d5-1b23-4326-b3f0-949805f25414", "state": "FAILED", "rank": 0, "deviceURL": "rts://xxxx-xxxx-xxxx/xxxxxxxxxxx", "failureType": "INVALID_COMMAND" }, "execId": "a8c9f080-7bca-4f6a-a2c8-2c355718695c", "name": "CommandExecutionStateChangedEvent" }, { "failureType": "INVALID_COMMAND", "oldState": "INITIALIZED", "execId": "a8c9f080-7bca-4f6a-a2c8-2c355718695c", "name": "ExecutionStateChangedEvent", "newState": "FAILED" } ]
With open and close you do not need to send a parameter. It is not clear to me why these paramsSig: *p1
elements are included into the response of the setup/devices
endpoint. As is kind of to be expected because nparams = 0.
Some other screens have this command specified:
{
"nparams": 1,
"commandName": "setClosure",
"paramsSig": "p1"
},
Here, you add a percentage to set the open or close state (so you can send 75% and it will open or close to 75%, manufacturer depended.....)
@njkrmd19 Simply remove the *p1
from the parameters array.
@JanJaapKo a paramsSig
with a *p1
in it means that the p1
parameter is optional.
@BuBuaBu clear, tnx. It would be great if we can get an explanation of the parameters into the OpenAPI documentation. I'll create a separate issue for that. Hopefully Somfy can pick that up.
Created #76
worked fine when I removed the parameters Thanks people, much appreciated
Hi,
using the below to test blind control;
{ "label": "Roller blind warehouse", "actions": [ { "commands": [ { "name": "open", "parameters": [ "*p1" ] } ], "deviceURL": "rts://"
}
]
}
I received 'execId' and all looks fine, same with close, up & down commands however the blind does not move
device output below for reference;
"creationTime": 1667993467463, "deviceURL": "rts://",
"available": true,
"synced": true,
"type": 1,
"states": [],
"label": "Roller blind warehouse",
"definition": {
"states": [],
"widgetName": "UpDownScreen",
"attributes": [],
"uiClass": "Screen",
"commands": [
{
"nparams": 0,
"commandName": "stop",
"paramsSig": "p1"
},
{
"commandName": "test",
"nparams": 0
},
{
"nparams": 0,
"commandName": "open",
"paramsSig": "p1"
},
{
"nparams": 0,
"commandName": "close",
"paramsSig": "p1"
},
{
"commandName": "identify",
"nparams": 0
},
{
"nparams": 0,
"commandName": "up",
"paramsSig": "p1"
},
{
"nparams": 0,
"commandName": "down",
"paramsSig": "p1"
},
{
"nparams": 0,
"commandName": "my",
"paramsSig": "p1"
},
{
"nparams": 0,
"commandName": "openConfiguration",
"paramsSig": "p1"
},
{
"nparams": 0,
"commandName": "rest",
"paramsSig": "p1"
}
],
"type": "ACTUATOR"
},
"attributes": [],
"enabled": true,
"controllableName": "rts:BlindRTSComponent",
"subsystemId": 0