waitForGpi
Wait until a general purpose input reaches the specified state.
Parameter
An object with the following keys:
| Key | Type | Description |
|---|---|---|
| name | string | Name of input. |
| active | boolean | The state to wait for. v6.0 |
| state | boolean | Deprecated name of active. |
| timeout | number | Optional timeout in seconds. If omitted, waits forever. |
Either active or state is required. Both may be given, as long as they
agree, so that the same request also works with versions before v6.0.
Return value
true if the input reached the desired state; false if the timeout elapsed before the state was reached.
Example
waitForGpi {"name": "MASTER.IN1", "active": true, "timeout": 5.0}