relays()
relays(ch) → object
Get the current relay state
Returns an object with the current relay information in the form of an object {"lvd":false,"hvd":false,"fuse":false,"state":false}
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| channel | label | number | string | yes | — | Relay channel # or label |
Returns
object
{"lvd":false,"hvd":false,"fuse":false,"state":false}
Example
let loadSwitch = relays(1).state;