TapHome

Shelly Plus 1PM

Packet Parser → HTTP
Submitted by
Last updated: 03. 2026
Shelly Plus 1PM

The Shelly Plus 1PM is a compact Gen2+ Wi-Fi relay switch with built-in power metering. It fits behind a standard wall switch and can control one circuit up to 16 A (3500 W at 230 V AC) or 10 A (30 V DC). The device supports 110-240 VAC or 24-30 VDC power supply, making it suitable for both mains-powered and low-voltage installations. TapHome communicates with the device locally over Wi-Fi — no cloud connection is required.

Two TapHome templates are available: an HTTP template that polls the device’s Gen2+ RPC API, and an MQTT template that receives data via an MQTT broker. Both expose the same two devices — an energy meter and a relay switch.

Configuration

HTTP template

The HTTP template requires only the device’s IP address (default placeholder 192.168.0.1). TapHome polls the /rpc/Switch.GetStatus?id=0 endpoint for both relay state and power metering data. The module caches the JSON response in a status variable so that individual device scripts can parse it without making redundant HTTP calls.

MQTT template

The MQTT template requires three parameters during import:

  • MQTT Broker IP — the IP address of the MQTT broker (not the Shelly device itself)
  • MQTT Broker Port — default 1883
  • Shelly MQTT Client ID — format shellyplus1pm-{deviceid}, found in the Shelly web UI under Settings > MQTT Settings > Client ID

After enabling MQTT on the Shelly Plus 1PM (Settings > MQTT), TapHome subscribes to shellyplus1pm-{deviceid}/status/switch:0 and publishes control commands to shellyplus1pm-{deviceid}/command/switch:0.

Device capabilities

Relay control

The template exposes the relay as a switch device. The relay state is read from the output field (boolean) and controlled via /rpc/Switch.Set?id=0 with on=true or on=false (HTTP) or by publishing on/off to the command topic (MQTT).

The HTTP template polls the relay at a 2.5-second interval, providing near-real-time state feedback. The MQTT template receives updates as they occur via the listener script.

Power metering

The built-in energy meter reads two values from the Switch.GetStatus response:

  • Instantaneous powerapower reported in watts, converted to kW by the template (divided by 1000)
  • Cumulative energyaenergy.total reported in watt-hours, converted to kWh by the template (divided by 1000)

The meter is read-only — it updates automatically with every poll cycle (HTTP) or on each MQTT status message.

The HTTP template also exposes three service attributes on the energy meter:

AttributeUnitDescription
CurrentAInstantaneous current draw
VoltageVRMS line voltage
Temperature°CInternal device temperature

The MQTT template exposes internal temperature, voltage, and current as module-level service attributes with the same data, parsed from the MQTT status payload.

Additional capabilities

The Shelly Plus 1PM also exposes power factor, network frequency, returned energy (for bidirectional metering), physical input state, WiFi signal strength, MAC address, uptime, RAM usage, and device time through its RPC API. A firmware update action, device reboot, auto-off timer, energy counter reset, and overpower protection configuration are also available. These capabilities can be added in a future template update.

Troubleshooting

Device not responding (HTTP)
  1. Verify the Shelly is connected to Wi-Fi and has a valid IP address
  2. Try using the mDNS hostname (shellyplus1pm-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal
  3. Open http://{device-ip}/rpc/Shelly.GetDeviceInfo in a browser — if it responds with JSON, the device is reachable
  4. Check that TapHome CCU and Shelly are on the same network / VLAN
  5. Ensure HTTP Digest Authentication is disabled in the Shelly web UI — TapHome does not support authenticated requests
MQTT messages not arriving
  1. Verify MQTT is enabled in the Shelly web UI (Settings > MQTT)
  2. Confirm the broker address and port are correct in both the Shelly device and TapHome module settings
  3. Check that the plug1topic custom variable matches the Shelly’s MQTT Client ID exactly (e.g., shellyplus1pm-AABBCCDDEE)
  4. Use an MQTT client (e.g., MQTT Explorer) to subscribe to shellyplus1pm-# and verify the device publishes messages
Power readings show zero
  1. Confirm the load is connected through the Shelly relay (not bypassed)
  2. Check that the relay is turned on — the meter only reads when current flows through the relay
  3. Poll /rpc/Switch.GetStatus?id=0 manually and verify apower returns a non-zero value
Slow response or timeouts
  1. Gen2+ devices support up to 6 concurrent HTTP connections (vs. 2 on Gen1) — but avoid excessive polling from multiple systems
  2. Disable ECO mode in the Shelly web UI if enabled — it puts the device to sleep between polls and can cause timeouts with short poll intervals
  3. Use a static IP or DHCP reservation to prevent address changes
  4. Consider switching to the MQTT template for multi-system environments — MQTT avoids the connection limit issue entirely

How to install in TapHome

Prerequisites

  • Shelly device installed and powered on
  • Local Wi-Fi network (2.4 GHz)
  • TapHome CCU on the same network

Step 1 — Connect Shelly to Wi-Fi

Option A — Shelly app (recommended):

  1. Download the Shelly app (iOS / Android)
  2. Tap +Add Device and follow the Bluetooth pairing wizard
  3. Enter your Wi-Fi credentials when prompted

Option B — AP mode (no app):

  1. On first power-up the device creates a hotspot: ShellyXXX-AABBCCDDEE
  2. Connect your phone/PC to that hotspot
  3. Open http://192.168.33.1Internet & SecurityWi-Fi Mode - Client
  4. Enter SSID and password → Save

Shelly only supports 2.4 GHz networks. 5 GHz networks will not appear in the scan.

Step 2 — Find the device address

Shelly Gen1 devices support mDNS (Zeroconf). You can reach the device using a hostname instead of an IP address:

1
shelly<model>-<MAC>.local

For example: shelly1pm-AABBCCDDEE.local (MAC address in uppercase hex, no colons).

Recommended: use the TapHome IP Scanner. Open the TapHome app and use the IP Scanner (Settings → Network → Scan). The scanner will discover devices on your network and show both the IP address and the mDNS hostname. Use the hostname instead of the IP address for a more reliable connection — it stays the same even if the device’s IP changes after a router reboot.

Alternative methods to find the IP address:

  • Shelly app: Device detail → Device info → IP address
  • Shelly web UI: Connect to the device AP before Wi-Fi setup — the IP is shown after saving
  • Router DHCP table: Look for a hostname like shelly1pm-AABBCCDDEE

Step 3 — Configure in TapHome

  1. In TapHome, add a new Packet Parser (HTTP) module
  2. Address: enter the mDNS hostname (e.g., shelly1pm-AABBCCDDEE.local) or IP address from Step 2
  3. Port: 80 (default, no change needed)
  4. Import the template — TapHome will poll /status to read device state

HTTP authentication is disabled by default on Shelly devices. If you have enabled login protection, TapHome does not support HTTP Basic Auth at this time — keep auth disabled for TapHome integration.

Available devices

Shelly Plus 1PM Module
Custom Variables
Electric Meter Electricity Meter Read-only

Instantaneous power (kW) and cumulative energy (kWh) with current, voltage, and temperature diagnostics

numeric Unit: kW / kWh
Service Attributes
Current
Voltage
Temperature

Electric Meter

Read total consumption
return(parsejson(parsejson(status,"aenergy"), "total")/1000);
Read demand
return(parsejson(status,"apower")/1000);
Read (module)
var x := (sendhttprequest("/rpc/Switch.GetStatus?id=0"));
status := x.Content;
Service Attributes
${current} [a]
return(parsejson(status,"current"));
${electric_voltage} [v]
return(parsejson(status,"voltage"));
${temp} [C]
return(parsejson(parsejson(status,"temperature"), "tC"));
Switch Switch
boolean
Values / States: ON · OFF

Switch

Read switch state
var x := (sendhttprequest("/rpc/Switch.GetStatus?id=0"));
status := x.Content;
return(PARSEJSON(status, "$.output", true));
Write switch state
VAR response := SENDHTTPREQUEST("rpc/Switch.Set?id=0&on=" + if(St,"true","false"));
IF response.IsSuccess = false
  ADDERROR(response.StatusCode);
END
Connection: Packet Parser → HTTP
Possible improvements (16)
  • Power Factor — Power factor value, available in Switch.GetStatus response for metered devices
  • Network Frequency — AC network frequency in Hz, available in Switch.GetStatus response
  • Returned Energy — Returned/exported energy in Wh, for bi-directional metering scenarios
  • Input State — Physical switch/button input state, available via /rpc/Input.GetStatus?id=0
  • WiFi SSID — Connected WiFi network name, available via /rpc/WiFi.GetStatus
  • WiFi Signal Strength — WiFi RSSI in dBm, available via /rpc/WiFi.GetStatus
  • IP Address — Device IP address, available via /rpc/WiFi.GetStatus
  • MAC Address — Device MAC address, available via /rpc/Sys.GetStatus
  • Uptime — Seconds since last reboot, available in Sys.GetStatus response
  • RAM Usage — Total and free RAM in bytes, available in Sys.GetStatus response
  • Device Time — Current device time in HH:MM format, available in Sys.GetStatus response
  • Firmware Update — Trigger firmware update to stable channel, available via Shelly.Update RPC method
  • Reboot — Reboot the device, available via Shelly.Reboot RPC method
  • Auto-off Timer — Auto-reset timer in seconds via toggle_after parameter, could be added as switch parameter
  • Reset Energy Counters — Resets energy measurement counters (aenergy, ret_aenergy)
  • Overpower Protection — Configurable power limit threshold in Watts, relay turns off when exceeded

Sources