Metainformationen zur Seite

ShellySwitch

UserGuide: https://shelly.cloud/wp-content/uploads/2018/10/Shelly2_User_Guide_EN_v03_print.pdf


Shelly2 allows control and monitoring over MQTT for both relay and roller modes. Device mode, along with other parameters need to be configured using the mobile application or web interface. Due to popular demand, since v1.4.3 we also report the state of external switch inputs on shellies/shelly2-<deviceid>/input/N.

MQTT in Relay mode

In relay mode, the following topics can be used to read and set output channels 0 and 1:

  • shellies/shellyswitch-<deviceid>/relay/<i> to report status: on, off or overpower
  • shellies/shellyswitch-<deviceid>/relay/<i>/command accepts on and off and applies accordingly

The device measures the total consumption on both channels, which can be seen on:

  • shellies/shellyswitch-<deviceid>/relay/power reports instantaneous power consumption rate in Watts
  • shellies/shellyswitch-<deviceid>/relay/energy reports amount of energy consumed in [10 * Wh]

MQTT in Roller mode

When configured to operate in roller mode, MQTT topics used by Shelly2 are:

  • shellies/shellyswitch-<deviceid>/roller/0 reports the current state: open, close while in motion, stop when not moving.
  • shellies/shellyswitch-<deviceid>/roller/0/command accepts rc (performs roller calibration), open, close and stop.

New in v1.4.0: roller mode position control. For this to work, the device must first be successfully calibrated, so that the time it takes for closing and opening are known.

  • shellies/shellyswitch-<deviceid>/roller/0/pos reports the current position in percent
  • shellies/shellyswitch-<deviceid>/roller/0/command/pos accepts a number between 0 and 100, which is target position in percent.