
The Shelly DUO is a Wi-Fi LED bulb with an E27 base that supports brightness dimming and tunable white color temperature (CCT) in the range of 2700 K (warm white) to 6500 K (daylight). TapHome integrates with the bulb locally over Wi-Fi using either the HTTP REST API or MQTT. No cloud connection is required.
Two TapHome templates are available: an HTTP template for a single bulb, and an MQTT template that can control up to 5 DUO bulbs through a single MQTT broker connection. Both templates expose the same device types per bulb — a light device with brightness and CCT control, and an electric meter for power monitoring.
Configuration
HTTP template
The HTTP template requires the bulb’s IP address (or mDNS hostname ShellyBulbDuo-{MAC}.local). TapHome polls the /status endpoint every 2.5 seconds and caches the JSON response into the jsonStatus custom variable. Individual device scripts parse the cached response without making redundant HTTP calls.
The template accepts two import parameters:
- IP Address — the bulb’s local IP (default
192.168.0.1) - Transition time — light transition duration in milliseconds (default 300 ms)
MQTT template
The MQTT template requires the broker IP, port, and the Device ID for each bulb (format: ShellyBulbDuo-DEVICEID). The Device ID can be found in the Shelly web UI under Settings > Device Info, or via GET http://{bulb-ip}/settings in the mqtt.id field.
The template supports up to 5 DUO bulbs through a single module. Each bulb is identified by its own topic variable (bulb1topic through bulb5topic). Unused bulb slots can be left at their default placeholder value.
The template accepts three import parameters:
- MQTT Broker IP — the broker address (default
192.168.0.1) - MQTT Broker port — the broker port (default
1883) - Transition time — light transition duration in milliseconds (default 300 ms)
On Gen1 Shelly devices, enabling MQTT disables Shelly Cloud. Both cannot run simultaneously.
Device capabilities
Light control
The template exposes the DUO as a white light device with two controllable parameters:
- Brightness — read from
lights[0].brightness(0-100, converted to 0.0-1.0 internally) andlights[0].ison; controlled via/light/0?turn=on|off&brightness=N(HTTP) or by publishing JSON to thelight/0/settopic (MQTT) - Color temperature — read from
lights[0].temp(2700-6500 K); controlled via/light/0?temp=K(HTTP) or thetempfield in the JSON payload (MQTT)
Both parameters are sent together in a single write command. The transition time parameter controls the fade duration for all changes.
When the light is turned off (brightness set to 0), the template sends turn=off (HTTP) or publishes off to the light/0/command topic (MQTT).
Debounce mechanism
The HTTP template includes a debounce guard to prevent stale readings during light transitions. After every write command, the template ignores /status reads for the duration of the transition time plus 500 ms. During this period, the read scripts return the last known values instead of polling the device. This prevents the UI from briefly showing intermediate states while the bulb is transitioning.
The MQTT template does not need debounce — it receives state updates directly from the bulb as they occur.
Power metering
The built-in energy meter reads two values:
- Real-time power —
meters[0].powerin watts, converted to kW (divided by 1000) - Total consumption —
meters[0].totalin watt-minutes, converted to kWh (divided by 60 000)
The meter is read-only and updates automatically with every poll cycle (HTTP) or on each MQTT message.
To enable power monitoring, the device model must be configured in the Shelly app or web browser under Settings > Device Model. If the bulb is on but power reads zero, the template displays a warning about this configuration step.
Service diagnostics (HTTP template)
The HTTP template exposes 10 service attributes:
- Network info — IP address, MAC address (formatted with colon separators), WiFi signal strength (dB)
- Connectivity — cloud enabled/connected, MQTT connected
- Device info — device time, uptime (formatted as days/hours/minutes), RAM usage
- Firmware — firmware update available
Service actions (HTTP template)
Two service actions are available:
- Enable cloud — enables or disables Shelly Cloud connectivity
- Reboot — triggers a device reboot
Additional capabilities
The Shelly DUO also exposes a light timer (active flag and remaining seconds), an auto-off timer on the light endpoint, internal device temperature, WiFi signal strength as a standalone sensor device, and an MQTT online/offline LWT topic for connection status detection. These capabilities can be added in a future template update.
Troubleshooting
Bulb not responding (HTTP)
- Verify the DUO is connected to Wi-Fi and has a valid IP address
- Try using the mDNS hostname (
ShellyBulbDuo-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal - Open
http://{bulb-ip}/shellyin a browser — if it responds with a JSON containing"type":"SHBDUO-1", the bulb is reachable - Check that TapHome CCU and the DUO are on the same network / VLAN
Power readings show zero
- Confirm the device model is configured in the Shelly app (Settings > Device Model)
- Check that the bulb is turned on — the meter only reads when current flows
- Poll
/statusmanually and verifymeters[0].powerreturns a non-zero value
MQTT bulb not responding
- Verify MQTT is enabled in the Shelly web UI (Internet & Security > Advanced — MQTT)
- Confirm the broker address and port are correct in both the Shelly device and TapHome module settings
- Check that the
bulbNtopiccustom variable matches the bulb’s Device ID exactly (e.g.,ShellyBulbDuo-B929CC) - Use an MQTT client (e.g., MQTT Explorer) to subscribe to
shellies/#and verify the bulb publishes messages
Light transitions appear jerky
- Increase the transition time parameter — the default 300 ms may be too short for large brightness changes
- If using HTTP, ensure no other system is polling the bulb simultaneously — Gen1 devices support only 2 concurrent connections
Gen1 Shelly devices support only 2 concurrent HTTP connections. If TapHome and another system (e.g., Home Assistant) poll the same device simultaneously, communication may become unreliable. Consider switching to the MQTT template for multi-system environments.