TapHome

Shelly 1PM

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

The Shelly 1PM is a compact 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). TapHome communicates with the device over HTTP on the local network — no cloud connection is required.

The template provides relay control and an energy meter that reads real-time power consumption and cumulative energy usage.

Configuration

The Shelly 1PM connects over Wi-Fi. During TapHome template import, enter the device’s IP address (default placeholder 192.168.0.1).

This device supports mDNS discovery. You can use the hostname shelly1pm-{MAC}.local instead of an IP address when configuring TapHome. Replace {MAC} with the device’s MAC address (uppercase hex, no colons). Using a hostname prevents connectivity issues when the device’s IP address changes.

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 (e.g., shelly1pm-AABBCCDDEE.local). Use the hostname instead of the IP address for a more reliable connection.

Device capabilities

Relay control

The template exposes the relay as a switch device. The relay state is read from the /status response (relays[0].ison) and controlled via the /relay/0 endpoint with turn=on or turn=off.

Power metering

The built-in energy meter reads two values from the /status response:

  • Real-time powermeters[0].power reported in watts, converted to kW by the template
  • Total consumptionmeters[0].total reported in watt-minutes, converted to kWh by the template

The meter is read-only — it updates automatically with every poll cycle.

Service diagnostics

The template exposes 13 service attributes for device monitoring:

  • Device info — hostname, MAC address, device time, uptime, RAM usage
  • Thermal protection — internal temperature (°C), temperature status (Normal / High / Very High), overtemperature flag
  • Connectivity — cloud enabled/connected, MQTT connected, firmware update available
  • Power protection — current max power limit (reads from /settings)
Service actions

Three service actions are available:

  • Set power protection — sets the maximum power limit (1–3500 W). The relay automatically turns off if consumption exceeds this value.
  • Enable cloud — enables or disables Shelly Cloud connectivity
  • Reboot — triggers a device reboot
Additional capabilities

The Shelly 1PM also exposes line voltage, reactive power, physical input state, and WiFi signal strength in its /status response. An auto-off timer is available on the relay endpoint. These capabilities can be added in a future template update.

Troubleshooting

Device not responding
  1. Verify the Shelly is connected to Wi-Fi and has a valid IP address
  2. Try using the mDNS hostname (shelly1pm-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal
  3. Open http://{device-ip}/shelly in a browser — if it responds, the device is reachable
  4. Check that TapHome CCU and Shelly are on the same network / VLAN
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 /status manually and verify meters[0].power returns a non-zero value
Overtemperature warning

The Shelly 1PM has internal thermal protection. If the device temperature exceeds safe limits, the temperature_status changes to “High” or “Very High” and overtemperature becomes true. Ensure adequate ventilation around the device, especially when switching high loads.

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. Use a poll interval of 10–30 seconds.

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 1PM Module
Service Attributes
Power protection
Host name
MAC address
Device time
Uptime
RAM
Internal device temperature
Temperature status
FW update
Cloud enabled
Cloud connected
MQTT connected
Overheated
Service Actions
Set power protection
Enable cloud
Reboot

Shelly 1PM Module

Read (module)
VAR response := SENDHTTPREQUEST("/status", "GET");
StatusJson := response.Content;
Service Attributes
Power protection
VAR response := SENDHTTPREQUEST("/settings", "GET");
SettingsJson := response.Content;

response := SENDHTTPREQUEST("/status", "GET");
StatusJson := response.Content;

PARSEJSON(SettingsJson, "max_power") + "W";
Host name
PARSEJSON(SettingsJson, "device.hostname");
Mac address
PARSEJSON(StatusJson, "mac");
Device time
PARSEJSON(StatusJson, "time")
Uptime
VAR upTimeSeconds := PARSEJSON(StatusJson, "uptime");
VAR days := FLOOR(upTimeSeconds/86400, 1);
uptimeSeconds := MOD(upTimeSeconds, 86400);
var hours := FLOOR(upTimeSeconds/3600, 1);
uptimeSeconds := MOD(upTimeSeconds, 3600);
var minutes := FLOOR(upTimeSeconds/60, 1);
days + "day(s) " + hours + "h " + minutes + "m"
RAM
var ramTotal := PARSEJSON(StatusJson, "ram_total");
var ramFree := PARSEJSON(StatusJson, "ram_free");
ramFree + " bytes free of " + ramTotal
Internal device temperature
PARSEJSON(StatusJson, "temperature") + "°C"
Temperature status
PARSEJSON(StatusJson, "temperature_status");
FW update
PARSEJSON(StatusJson, "has_update");
Cloud enabled
PARSEJSON(StatusJson, "cloud.enabled");
Cloud connected
PARSEJSON(StatusJson, "cloud.connected");
MQTT connected
PARSEJSON(StatusJson, "mqtt.connected");
Overheated
PARSEJSON(StatusJson, "overtemperature");
Service Actions
Set power protection
Parameters: Maximum power (1–3500 Watts)
VAR response := SENDHTTPREQUEST("settings?max_power=" + Watts);
VAR contentJson := response.Content;
VAR limitSet := PARSEJSON(contentJson, "max_power");

"Power limit set to " + limitSet + "W"
Enable cloud
Parameters: Enable (Enable / Disable)
VAR response := SENDHTTPREQUEST("/settings/cloud?enabled=" + enable);
VAR contentJson := response.Content;
VAR wasEnabled := PARSEJSON(contentJson, "enabled");

IF(wasEnabled, "Cloud enabled", "Cloud disabled");
Reboot
VAR response := SENDHTTPREQUEST("/reboot");
VAR contentJson := response.Content;
VAR wasRebooted := PARSEJSON(contentJson, "ok");

IF(wasRebooted, "Reboot successful", "Error");
Switch Switch
boolean

Switch

Read switch state
VAR value := PARSEJSON(StatusJson, "relays[0].ison", 1);
IF(ISNULL(value), NaN, value);
Write switch state
VAR path := "relay/0?turn=" + SWITCH(St, 0, "off", 1, "on","off");
SENDHTTPREQUEST(path);
Electric Meter Electricity Meter Read-only

Power consumption and energy metering — instantaneous power (kW) and cumulative energy (kWh)

numeric Unit: W / kWh

Electric Meter

Read total consumption
VAR total := PARSEJSON(StatusJson, "meters[0].total", 1);
IF(ISNULL(total), NaN, total / 60000.0);
Read demand
VAR power := PARSEJSON(StatusJson, "meters[0].power", 1);
IF(ISNULL(power), NaN, power / 1000.0);
Connection: Packet Parser → HTTP
Possible improvements (5)
  • Voltage — Line voltage in V, available in /status response
  • Reactive Power — Reactive power in VAR, available in /status response
  • Input State — Physical input state (0/1), available in /status response
  • WiFi Signal Strength — WiFi RSSI in dBm, available in /status response
  • Auto-off Timer — Auto-off timer in seconds, could be added as service action or switch parameter

Sources