
The Shelly DUO RGBW (model SHCB-1) is a Gen1 Wi-Fi smart LED bulb available in E27 and GU10 form factors. It supports full RGB color and tunable white (CCT 3000–6500 K) with smooth transition effects. This is the MQTT variant of the TapHome integration — the template communicates with bulbs through a shared MQTT broker on the local network. An HTTP variant is also available for single-bulb setups.
The template supports up to 5 Shelly DUO RGBW bulbs per module. Each bulb instance is distinguished by a bulbNtopic custom variable pointing to the bulb’s MQTT Device ID. Each bulb exposes an RGBW light device and an electric meter — 10 devices total.
Configuration
Device ID
Each Shelly DUO RGBW bulb has a unique MQTT Device ID in the format shellycolorbulb-<DEVICEID>, where <DEVICEID> is derived from the MAC address (e.g., shellycolorbulb-B929CC).
The Device ID can be found:
- On the device packaging or label (MAC address)
- In the Shelly web UI: Settings → Device Info
- Via API:
GET http://<device-ip>/settings→mqtt.idfield
Module variables
After importing the template in TapHome, configure the bulb topic variables:
| Variable | Default | Description |
|---|---|---|
bulb1topic | shellycolorbulb-deviceid1 | MQTT Device ID for bulb 1 |
bulb2topic | shellycolorbulb-deviceid2 | MQTT Device ID for bulb 2 |
bulb3topic | shellycolorbulb-deviceid3 | MQTT Device ID for bulb 3 |
bulb4topic | shellycolorbulb-deviceid4 | MQTT Device ID for bulb 4 |
bulb5topic | shellycolorbulb-deviceid5 | MQTT Device ID for bulb 5 |
Replace the default placeholder with the actual Device ID of each bulb (e.g., shellycolorbulb-B929CC). Only configure the slots you actually use — unused slots with the default placeholder will display an error prompting you to set the correct topic.
The module subscribes to shellies/# (QoS 0, port 1883) and the listener scripts filter messages by the configured topic prefix for each bulb.
On Gen1 Shelly devices, enabling MQTT disables Shelly Cloud. Both cannot run simultaneously.
Device capabilities
Light control
Each bulb is mapped as an HSB Light device in TapHome. The bulb operates in two mutually exclusive modes:
- Color mode — full RGB control via red, green, and blue channels (0–255 each) plus gain (0–100%). TapHome converts RGB to HSV internally — hue (0–360°), saturation, and brightness are available as control properties. Setting hue or saturation sends a
color/0/setJSON payload with"mode":"color". - White mode — tunable white via color temperature (3000–6500 K) and brightness (0–100%). Setting a CCT value in TapHome automatically switches the bulb to white mode by publishing
"mode":"white"with the temperature and brightness.
All write commands include a configurable transition time (default 300 ms) for smooth fading between states. A debounce mechanism prevents stale reads during transitions — the template ignores incoming MQTT status messages for transitionTime + 3000 ms after each write command.
Power metering
Each bulb instance includes an electric meter that reads two values:
- Real-time power — from
shellies/{id}/light/0/power, reported in watts, converted to kW (payload / 1000) - Total consumption — from
shellies/{id}/light/0/energy, reported in watt-minutes, converted to kWh (payload / 60 000)
Power monitoring requires the device model to be configured in the Shelly app or web UI under Settings > Device Model. Without this configuration, power readings remain at zero.
Additional capabilities
The Shelly DUO RGBW also supports light effects (meteor shower, gradual change, breath, flash, on/off gradual, red/green change), a dedicated white LED channel (0–255) in color mode, MQTT connection status via LWT topic, and a full JSON status report (firmware ≥1.8.0) with Wi-Fi RSSI, uptime, and temperature data. These capabilities can be added in a future template update.
Troubleshooting
Bulbs not responding
- Verify MQTT is enabled in each bulb’s web UI (Internet & Security > Advanced — MQTT)
- Confirm the broker address and port are correct in both the Shelly device settings and TapHome module configuration
- Check that each
bulbNtopiccustom variable matches the bulb’s Device ID exactly (e.g.,shellycolorbulb-B929CC) - Use an MQTT client (e.g., MQTT Explorer) to subscribe to
shellies/#and verify each bulb publishes messages
Colors appear incorrect
- Verify the bulb is in color mode — RGB colors only work in color mode, not white mode
- Ensure saturation is greater than zero — a saturation of 0 produces white light regardless of hue
- Check that gain (brightness in color mode) is not set to zero
Power readings show zero
- Confirm the device model is configured in the Shelly app or web UI (Settings > Device Model)
- Verify the bulb is turned on — the meter only reads when the bulb draws power
Gen1 Shelly devices do not support MQTT over TLS. Communication between the bulbs and the MQTT broker is unencrypted (plain MQTT, port 1883). Ensure the MQTT broker is on a trusted local network.