Skip to main content

waitForGpi

Wait until a general purpose input reaches the specified state.

Parameter​

An object with the following keys:

KeyTypeDescription
namestringName of input.
activebooleanThe state to wait for. v6.0
statebooleanDeprecated name of active.
timeoutnumberOptional 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}