Device settings
Relay settings
What's specific to devices that switch a load on and off - which input drives which relay, locking out physical control, and measurement direction.
Relay devices (the Switch component in the Gen2+ documentation) share most of their settings with Common settings: initial_state, in_mode, auto-on/off timers and power/voltage/current protection all apply directly. This chapter covers what's specific to relays.
Linking input to output on multi-channel devices
On devices with several relays and several inputs - a Shelly Pro 4PM, for example - input_id decides which physical input controls which relay. That's not always an obvious 1-to-1 mapping, especially if the device is set up so several channels are driven from a single button.
Locking the physical input
in_locked makes presses on the physical input (the switch) stop affecting the relay - it can then only be controlled from the app, the web interface, or automations. Useful if you want an installation controlled purely digitally, or if a physical switch could otherwise accidentally interfere with an automation.
Measurement direction
reverse flips which direction active power and energy are counted in - relevant if the device is wired with line and load reversed compared to what the firmware expects. The change requires a device restart to take effect.
Cycle counter
counts.enable turns on a counter for how many times the relay has switched, with counts.power_thr as the threshold (default 100 W) for what counts as a "real" cycle rather than noise. Useful for tracking wear on something like a pump or motor driven through the relay.
Other things specific to relays
- Relays without power metering naturally lack
power_limit/voltage_limit/current_limitand other measurement-related fields - which devices measure power is listed in the device database. - On single-channel devices with no separate physical input wired in (some in-wall relays without a button connected, for example),
in_mode/input_idaren't relevant - they're only controlled digitally.