state Should be an integer value of 1 or 0.
Sets the state of the relay on (open) or off (closed).
Returns true if the relay is on, false if the relay is off.
Turns the relay on.
Turns the relay off.
Toggles the state of the relay. (If the relay is on, then it will be turned off, if it is off, then it will be turned on.)