setstate

setstate,<module>:<connector>,<state>[,<delay>]

Sets the state of relay number <connector>. Relay modules are all accessible via module 1.

module : Valid values 1

connector : Valid values 1 - 8 (relay 1 - 8)

state : Valid values 0,1,2

delay : Valid values 0 - 32767 (seconds)

State

Result

0

OFF

1

ON

2

Toggle

When State is 2, the relay will turn on, after <delay> seconds the relay will turn off. Min delay is 0, max is 32,767.

Examples:

Turn on relay 2

setstate,1:2,1

Response

state,1:2,1

Turn on relay 3 for 15 seconds

setstate,1:3,2,15

Response

state,1:3,2,15