Skip to content

Smart plug or relay

A generic power driver for Shelly and Tasmota smart plugs and relays. It switches an outlet on or off over HTTP and, on metering hardware, reports the power draw.

Talks to the device over HTTP GET requests, with optional authentication, and polls for state. Pick the device family with the flavour setting: shelly (Shelly Plus/Pro and later), shelly1 (the original Shelly 1 / 2.5 / Plug S), or tasmota.

  • flavourshelly (Shelly Plus/Pro and later), shelly1 (the original Shelly 1 / 2.5 / Plug S), or tasmota.
  • host — the device address.
  • channel — which relay channel to control.
  • username / password — optional authentication.
  • pollSeconds — how often to poll for state.
CommandWhat it does
power_on / power_off / power_toggleSwitch the outlet
refreshRe-read state

It carries the power trait. On metering hardware it reports watts, volts, and energy (Wh), emitting energy.changed only when the draw moves by at least 0.5 W.