
The Shelly DUO (model SHBDUO-1) is a Gen1 Wi-Fi LED smart bulb available in E27 and GU10 form factors. The plain DUO is white-only with tunable color temperature and dimmable brightness — it has no RGB channels (the RGB-capable variant is the DUO RGBW / shellycolorbulb- and uses a separate template). This is the MQTT variant of the TapHome integration; an HTTP variant is also available for single-bulb setups.
The template supports up to 5 DUO bulbs per module through a shared MQTT broker on the local network. Each bulb is identified by a bulbNtopic module variable pointing to the bulb’s MQTT Device ID, and exposes both a white-light device and an electric meter — 10 devices total.
Configuration
MQTT broker
The template needs an MQTT broker reachable on the local network — any standard broker works (Mosquitto, EMQX, or the broker built into Home Assistant). The broker runs on port 1883 with no TLS (Gen1 Shelly hardware does not support MQTT over TLS), so keep it on a trusted segment.
After importing the template, set the broker connection in the module’s import parameters:
| Parameter | Default | Description |
|---|---|---|
MQTT Broker IP (IpAddress) | 192.168.0.1 | Broker address on the local network |
MQTT Broker port (Port) | 1883 | Standard MQTT port (no TLS) |
Transition time (TransitionTime) | 300 | Default per-bulb fade duration in milliseconds |
Enabling MQTT on the bulb
Each Shelly DUO must be pointed at the broker before it will publish or accept commands:
- Open the bulb’s web UI at
http://<bulb-ip>(find the IP in your router’s DHCP table or via the Shelly app) - Go to Internet & Security → Advanced — MQTT and enable MQTT
- Enter the broker’s server (IP and port, e.g.
192.168.0.10:1883) and leave username / password empty (the TapHome template does not surface broker authentication) - Optionally adjust the MQTT prefix if you do not want the default
shellies/ShellyBulbDuo-<MAC6> - Save and reboot the bulb — once it reconnects it starts publishing on
shellies/ShellyBulbDuo-<id>/light/0/status
Device ID (bulbNtopic)
Each Shelly DUO has a unique MQTT Device ID in the format ShellyBulbDuo-<MAC6>, where <MAC6> is the last 6 hex characters of the MAC address (e.g. ShellyBulbDuo-B929CC). This same value is the bulb’s mDNS hostname (ShellyBulbDuo-<MAC6>.local).
The Device ID can be found:
- In the Shelly web UI: Settings → Device Info →
mqtt.idfield - Via HTTP:
GET http://<bulb-ip>/settings→mqtt.id - On the device label / packaging (last 6 chars of the MAC, lowercase hex)
- As the mDNS hostname, e.g.
ShellyBulbDuo-b929cc.local
Open the Shelly DUO MQTT module in TapHome and fill the topic variables for each bulb you want to use:
| Variable | Default | Description |
|---|---|---|
bulb1topic | ShellyBulbDuo-deviceid1 | MQTT Device ID of the first DUO bulb |
bulb2topic | ShellyBulbDuo-deviceid2 | MQTT Device ID of the second DUO bulb |
bulb3topic | ShellyBulbDuo-deviceid3 | MQTT Device ID of the third DUO bulb |
bulb4topic | ShellyBulbDuo-deviceid4 | MQTT Device ID of the fourth DUO bulb |
bulb5topic | ShellyBulbDuo-deviceid5 | MQTT Device ID of the fifth DUO bulb |
Replace the placeholder with the actual Device ID for each bulb you want to control (e.g. ShellyBulbDuo-B929CC). The module subscribes to shellies/# and the per-bulb listener scripts filter messages by topic prefix. Slots that are still left at the placeholder value raise an error in TapHome until they are configured or removed from the template.
Per-bulb transition time
Each Light device exposes a transitionTime custom variable (in milliseconds, range 0-5000 ms) which defaults to the module-level TransitionTime import parameter. Override it on individual bulbs if you want different fade durations — the value is sent on every brightness or CCT change as the transition field in the /light/0/set JSON payload.
Enabling MQTT on a Gen1 Shelly device disables Shelly Cloud — both cannot run simultaneously. HTTP REST and CoIoT remain available, so the bulb stays reachable from the local network.
Device capabilities
The template exposes 10 devices per module — 5 white-tunable lights and 5 electric meters, one pair per physical bulb. All 5 pairs are functionally identical, distinguished only by the bulbNtopic they listen on.
Light control
Each Light device is mapped as a White Light in TapHome with two control properties:
- Brightness — read from the
$.brightnessfield (0-100) of thelight/0/statusJSON, scaled to TapHome’s 0.0-1.0 range; written vialight/0/setwith"turn":"on", "brightness":N, "transition":<ms> - Color temperature — read from
$.temp(3000-6500 K), written vialight/0/setwith"temp":K, "transition":<ms>
Switching the light off uses a separate light/0/command topic with the off payload, which is faster than constructing a JSON set message. Brightness and CCT updates always include the transition field so the bulb fades smoothly instead of jumping.
Power metering
Each Electric Meter device subscribes to two scalar topics published by the bulb roughly once per second:
| TapHome value | Source topic | Source unit | Conversion | Display unit |
|---|---|---|---|---|
| Real-time power | shellies/ShellyBulbDuo-<id>/light/0/power | W | ÷ 1000 | kW |
| Total consumption | shellies/ShellyBulbDuo-<id>/light/0/energy | watt-minutes | ÷ 60000 | kWh |
The watt-minute → kWh conversion is needed because Shelly Gen1 firmware reports cumulative energy in W·min rather than W·h.
Power monitoring is silently zero until Settings → Device Model is configured (E27 or GU10) in the Shelly app or web UI. The TapHome listener emits an info banner reminding you of this on first read. Once the model is set, the bulb starts reporting non-zero
power/energyimmediately.
Troubleshooting
Bulb not responding
- Verify the bulb is connected to Wi-Fi and reachable on the LAN — open
http://<bulb-ip>/shelly. A response containing"type":"SHBDUO-1"confirms the device. - Try the mDNS hostname (
ShellyBulbDuo-<MAC6>.local) instead of the IP address — DHCP renewals or router reboots can change the IP. - Confirm MQTT is enabled under the bulb’s Internet & Security → Advanced — MQTT settings and that the broker IP/port match the TapHome import parameters.
- Use an MQTT client (e.g. MQTT Explorer or
mosquitto_sub -h <broker> -t 'shellies/#' -v) to verify the bulb is publishing onshellies/ShellyBulbDuo-<id>/....
“Set correct ‘bulbNtopic’ value” error
The listener script raises this error when a bulbNtopic is still set to the default placeholder (ShellyBulbDuo-deviceid). Either fill in the real Device ID for that slot, or remove the unused devices from the template if you only have a few bulbs.
Power and energy stay at zero
- Open the Shelly app (or web UI) → Settings → Device Model and select the matching sub-model (Shelly Bulb DUO E27 or Shelly Bulb DUO GU10). The bulb only computes
power/energyonce the model is known. - Confirm the bulb is actually on — the meter only updates while current is flowing.
- Subscribe to
shellies/ShellyBulbDuo-<id>/light/0/powerdirectly with an MQTT client to verify the bulb publishes a non-zero value.
Warmest CCT only goes down to 3000 K
The TapHome XML clamps CCT to 3000-6500 K to match the marketed E27 range. The hardware itself supports 2700-6500 K on the GU10 sub-model and through the raw /light/0/set API, so the warmest 300 K of the GU10’s range is unreachable through the TapHome template.
Light transitions look jerky
Increase the per-bulb transitionTime custom variable (or the module-level TransitionTime default). 300 ms is fine for small dimming steps but can look stepped on large brightness or CCT changes — try 800-1500 ms for a smoother fade.
Gen1 Shelly devices use plain MQTT on port 1883 — there is no TLS support. The TapHome template also does not expose broker
username/password, so use an unauthenticated broker on a trusted local network or VLAN.