This command will set the values of the output pins. After the controller receives the command, it will set the output values and in response will return the value of all output pins. The default queue for this command is the high priority queue. If the queue parameter is set to 0, then the command will be submitted to the normal priority queue.
Key, value pairs
Key
Value
Required
Description
"cmd"
"output"
Yes
Sets the output values.
"id"
Int (>0)
No
Id can be any positive integer. If id is not provided, status of the command will not be returned from the controller.
"out0", "out1", "out2", …, "out15"
0 / 1
No
If any outi is present as a key, the value of the corresponding output will be set to the given value.
"queue"
0 / 1
No
If the value is 0, the command will be submitted to the normal priority queue. Otherwise, it will be submitted to the high priority queue. The default value 1.
Response
Key
Value
Description
"cmd"
"output"
In response to output command a message is returned with cmd field set to output which includes the value of all output pins.
"id"
Int (>0)
Same id as the original command.
"out0", "out1", …, "out15"
0 / 1
The value of each output pin.
Example
{"cmd":"output", "out0":1, "out2":0, "id":5}
This command will set out0 to 1 and out2 to 0 and will return all output values.