TapHome

Shelly Plus Smoke

Packet Parser → MQTT
Submitted by
Last updated: 03. 2026
Shelly Plus Smoke

The Shelly Plus Smoke is a battery-powered (CR123A) Wi-Fi photoelectric smoke alarm certified to DIN EN 14604. TapHome communicates with the device over MQTT using Gen2+ RPC notifications on the events/rpc topic. The device spends most of its time in deep sleep to conserve battery and wakes periodically based on the configured wakeup_period. Smoke alarm events trigger an immediate wake-up and MQTT notification.

The template creates a single Smoke Alarm device (mapped to a Reed Contact) and two module-level Battery service attributes. A connectivity watchdog monitors the wake-up period countdown and raises warnings or errors when the device has not reported for an extended period.

Configuration

MQTT Client ID

Each Shelly Plus Smoke has a unique MQTT Client ID in the format shellyplussmoke-<MAC12>, where <MAC12> is the full 12-character MAC address in uppercase hex (e.g., shellyplussmoke-AABBCCDDEEFF). This ID also serves as the default MQTT topic prefix.

The Client ID can be found:

  • On the device label (MAC address)
  • In the Shelly web UI: SettingsMQTTClient ID
  • Via API: GET http://<device-ip>/rpc/Mqtt.GetConfigclient_id field
Template setup

After importing the template in TapHome:

  1. Open the Shelly Plus Smoke module
  2. Set the MQTT Broker IP to the address of the MQTT broker
  3. Set the Port (default 1883)
  4. Set the MQTT ID import parameter to the device’s Client ID (e.g., shellyplussmoke-AABBCCDDEEFF)

The module subscribes to <device-id>/# and the listener script parses NotifyFullStatus and NotifyStatus JSON-RPC events from the events/rpc topic.

MQTT is disabled by default on the Shelly Plus Smoke. Enable it in the device settings: SettingsMQTTEnable. Ensure rpc_ntf (RPC notifications) is set to true (the default). The template relies on events/rpc notifications, not individual status topics.

Sleep behavior and reporting

The Shelly Plus Smoke operates in deep sleep mode to maximize battery life:

  • Periodic wake-up — the device wakes at intervals defined by sys.wakeup_period and publishes a NotifyFullStatus event containing battery status, smoke alarm state and the current wake-up period
  • Alarm event — a smoke detection event triggers an immediate wake-up and NotifyStatus notification with the alarm state
  • Between wake cycles — the device is unreachable via HTTP and MQTT

The device is powered by a single CR123A battery with an expected lifespan of up to 5 years. Do not use rechargeable batteries — the manufacturer explicitly warns against this.

The device is battery-operated and not permanently connected to the MQTT broker. Between wake-up cycles, no communication is possible. If the sensor location has weak Wi-Fi signal, frequent reconnection attempts on wake-up can significantly reduce battery life.

Device capabilities

Smoke alarm

The template maps the smoke alarm state to a Reed Contact device (DeviceType 1030). The listener script parses NotifyStatus events on the events/rpc topic and reads params['smoke:0'].alarm:

  • ON (alarm active) — smoke detected, the device’s built-in buzzer sounds at >85 dB
  • OFF (alarm clear) — no smoke detected, normal operation

The alarm state is read-only and updates immediately when smoke is detected. The device triggers an immediate MQTT notification on alarm events regardless of the sleep schedule.

Battery monitoring

The module exposes two Battery service attributes that read from NotifyFullStatus events:

  • Battery [%] — battery charge percentage from params['devicepower:0'].battery.percent. A low battery warning is triggered when the level drops below 30%
  • Battery [V] — battery voltage in Volts from params['devicepower:0'].battery.V. Nominal voltage is 3V for the CR123A battery

Both values return NaN before the first measurement is received (i.e., when the cached value is still 0). Battery data updates with every periodic wake-up.

Connectivity watchdog

The template monitors device connectivity using a countdown-based mechanism. On each NotifyFullStatus event, the listener script stores the sys.wakeup_period value in the wakeup_period custom variable. The read script then decrements this counter by 60 every poll cycle (60-second interval):

  • Counter reaches 0 — the device did not wake up as expected. The counter is set to -1 and a WARNING is raised: “Update not received”
  • Counter reaches -86400 — the device has been silent for 48 hours. An ERROR is raised: “Update not received in last 48h”

When the device wakes up and sends a new NotifyFullStatus, the counter is reset to the fresh wakeup_period value, clearing any warnings.

Additional capabilities

The Shelly Plus Smoke also supports a mute function (Smoke.Mute RPC method) to suppress the alarm sound, smoke alarm test events triggered by the physical button, and Wi-Fi RSSI signal strength diagnostics. The device publishes individual component status topics when status_ntf is enabled. These capabilities can be added in a future template update.

Troubleshooting

Smoke alarm not reporting events
  1. Verify the Shelly Plus Smoke is connected to Wi-Fi and MQTT is enabled in the device settings (SettingsMQTTEnable)
  2. Check that rpc_ntf is set to true (default) — the template requires RPC notifications on events/rpc
  3. Confirm the MQTT ID import parameter matches the device’s Client ID exactly (e.g., shellyplussmoke-AABBCCDDEEFF)
  4. Use an MQTT client (e.g., MQTT Explorer) to subscribe to <device-id>/# and verify the device publishes NotifyFullStatus on wake-up
  5. Check the device battery — a depleted CR123A battery prevents the device from connecting to Wi-Fi
Connectivity watchdog shows false warnings
  1. The watchdog compares the countdown against the expected wake-up period. If the TapHome Core clock is significantly off, false warnings may appear
  2. On battery power, the device wakes only at the configured wakeup_period interval — gaps between reports are expected
  3. If the sensor is in a location with intermittent Wi-Fi, it may fail to connect on some wake-up cycles. Verify Wi-Fi signal strength at the sensor location
  4. After a fresh battery replacement, the device may take one full wake-up cycle before the watchdog counter is properly initialized
Device shows as Reed Contact instead of smoke alarm

The TapHome template uses the PacketParserReedContact device type (DeviceType 1030) to represent the smoke alarm. This is the correct mapping — ON state means “Emergency Alarm” (smoke detected) and OFF state means “OK” (no smoke). The device name in TapHome is “Shelly Plus Smoke” to clearly indicate its function.

How to install in TapHome

Prerequisites

  • Shelly device connected to Wi-Fi (see HTTP connection guide if not done yet)
  • MQTT broker running on your local network (e.g., Mosquitto, Home Assistant, or TapHome built-in broker)
  • TapHome CCU on the same network as the broker

On Gen1 devices, enabling MQTT disables Shelly Cloud. Both cannot run simultaneously. On Gen2/Plus devices this limitation does not apply.

Step 1 — Enable MQTT on the Shelly device

Gen1 devices (Shelly 1, 1PM, 2.5, EM, 3EM, Plug S, RGBW2, Dimmer, TRV…)

  1. Open the Shelly web UI: http://<device-ip>/
  2. Navigate to Internet & SecurityAdvanced — MQTT
  3. Enable MQTT
  4. Set MQTT Server: <broker-ip>:<port> (e.g., 192.168.1.10:1883)
  5. Optionally set MQTT User and MQTT Password if your broker requires authentication
  6. Click Save — the device will reboot and connect to the broker

Gen2 / Plus devices (Shelly Plus 1, Plus 1PM, Plus 2PM, Plus Plug S, Plus H&T, Pro 3EM…)

  1. Open the Shelly web UI: http://<device-ip>/
  2. Navigate to SettingsMQTT
  3. Enable MQTT
  4. Set Server: <broker-ip>:<port> (e.g., 192.168.1.10:1883)
  5. The Client ID is pre-filled with the device ID (e.g., shellyplus1pm-AABBCCDDEE) — leave as-is unless you have a specific reason to change it
  6. Click Save and reboot the device

To verify MQTT is working, use an MQTT client (e.g., MQTT Explorer) and subscribe to shellies/# (Gen1) or <device-id>/# (Gen2). You should see status messages from the device.

Step 2 — Find the Device ID / MQTT Client ID

Some templates require a Device ID or MQTT Client ID parameter. This is the unique identifier used in MQTT topics.

  • Gen1: found on the label as MAC address (e.g., AABBCCDDEE). Device ID = shelly<model>-<mac>, e.g., shelly1pm-AABBCCDDEE
  • Gen2/Plus: found in the Shelly web UI under SettingsDevice InfoDevice ID, or on the device label

Step 3 — Configure in TapHome

  1. In TapHome, add a new Packet Parser (MQTT) module
  2. IP Address: enter the MQTT broker IP (e.g., 192.168.1.10)
  3. Port: 1883 (default; use 8883 for TLS)
  4. Device ID / MQTT Client ID: enter the value from Step 2 (if required by the template)
  5. Import the template — TapHome will subscribe to the device topics automatically

Available devices

Shelly Plus Smoke Module
Custom Variables
deviceid (string)MQTT device ID used as topic prefix — format: shellyplussmoke-{MACADDRESS} (find in Shelly web UI → Settings → MQTT → Client ID)
Smoke Alarm Reed Contact Read-only

Photoelectric smoke alarm state — ON = Emergency Alarm (smoke detected), OFF = OK (no smoke). Alarm triggers immediate MQTT notification with >85 dB buzzer.

boolean JSON-RPC (NotifyStatus → params.smoke:0.alarm)
Service Attributes
Battery [%]Battery charge percentage — low battery warning at <30%. CR123A battery, up to 5-year lifespan.
Battery [V]Battery voltage in Volts — nominal 3V for CR123A battery

Smoke Alarm

Read (module)
if wakeup_period = 0
	# after init
else
	wakeup_period := wakeup_period - 60;
	if wakeup_period = 0
		wakeup_period := -1;
	end
end

if wakeup_period < 0
	ADDWARNING("Update not received");
end

if wakeup_period < -86400
	ADDERROR("Update not received in last 48h");
end
Listener
if RECEIVEDMSG.TOPIC = deviceid + "/events/rpc"
	var method := parsejson(RECEIVEDMSG.PAYLOAD, "method", true); 
	var params := parsejson(RECEIVEDMSG.PAYLOAD, "params", true);
	if method = "NotifyFullStatus"
		wakeup_period := parsejson(params, "sys.wakeup_period");
		battery_V := parsejson(params, "devicepower:0.battery.V");
		battery_percent := parsejson(params, "devicepower:0.battery.percent");
	end
	if method = "NotifyStatus" and !ISNULL(parsejson(params, "smoke:0", true))
		var alarm := parsejson(params, "smoke:0.alarm", true);
		if !ISNULL(alarm)
			Rc := alarm;
		end
	end
end

if battery_percent < 30
	ADDWARNING("Low battery");
end
Service Attributes
Battery [%]
if battery_percent != 0
	return(battery_percent);
else
	return(NaN);
end
Battery [V]
if battery_V != 0
	return(battery_V);
else
	return(NaN);
end
Connection: Packet Parser → MQTT
Possible improvements (4)
  • Smoke Mute State — smoke:0.mute — true when alarm sound is suppressed via Smoke.Mute RPC. Could show muted status in TapHome.
  • External Power Status — devicepower:0.external.present — always false for Plus Smoke (battery-only device), but available in API.
  • WiFi RSSI — sys.wifi.rssi — signal strength in dBm. Could be used for placement diagnostics.
  • Smoke Alarm Test Event — smoke.alarm_test webhook event — triggered when user presses test button. Not captured by current template.

Sources