Port.N.gate
Open or close specified gate. You should monitor the state of the required gate via cbrx_connection_get(handle, “Gates”) to ensure it completes.
Syntax: see Call Structure
{ "method": "cbrx_connection_set", "params": [ connection-handle, "Port.N.gate", Value ] } |
Parameter | Description |
---|---|
connection-handle | The Connection Handles as an integer |
N | Port number |
Value | The value you wish to set for the key |
Value | Description |
---|---|
open | Open gate |
close | Close gate |
stop | Stop current gate action |
Returns:
{ "result": true } |
Errors
If there is an error in the API method then a JSON-RPC Error Object will be returned.
Example
Copy
{
"id": 0,
"jsonrpc": "2.0",
"method": "cbrx_connection_set",
"params": [
7654,
"Port.1.gate",
"open"
]
}