TapHome

Shelly Pro 3EM

Packet Parser → HTTP
Submitted by
Last updated: 03. 2026
Shelly Pro 3EM

The Shelly Pro 3EM is a professional DIN-rail three-phase energy meter designed for use with external current transformers. It is available in three variants — the Pro 3EM (120A CTs), Pro 3EM-400 (400A CTs), and Pro 3EM-3CT63 (integrated 63A CTs). The device connects to the local network over Wi-Fi or Ethernet (RJ45) and exposes real-time measurements via the Gen2+ HTTP RPC API. TapHome polls the device over HTTP on port 80 — no cloud connection is required.

The template provides eleven devices organized into bidirectional energy metering: per-phase current sensors (L1, L2, L3), per-phase From Grid and To Grid energy meters, and total From Grid and To Grid energy meters. The From Grid devices track energy consumed from the grid, while the To Grid devices track energy fed back (e.g., from solar panels), with the demand value inverted to show feed-in as a positive number.

Hardware connection

The Shelly Pro 3EM mounts on a standard DIN rail (94 x 19 x 69 mm). It requires four voltage inputs (three phase conductors + neutral) via screw terminals and four external CT inputs (three phase + neutral). The device is powered between any phase and neutral (100-260 V AC, 50/60 Hz).

Key wiring considerations:

  • Voltage inputs: LA, LB, LC (one per phase) + N (neutral)
  • CT inputs: Three phase CTs + one neutral CT, connected to the respective CT input jacks
  • Ethernet: One RJ45 connector for LAN connection (disconnect power before plugging/unplugging the LAN cable)
  • Conductor cross section: 0.5-2.5 mm² (20-14 AWG), stripped length 6-7 mm, max torque 0.4 Nm

External protection should be rated at 16 A max with characteristic B or C and a 6 kA minimum interrupting capacity. The operating voltage range is 100-260 V per phase.

Configuration

The Shelly Pro 3EM connects over Wi-Fi or Ethernet. During TapHome template import, enter the device’s IP address (default placeholder 192.168.0.1).

Authentication

TapHome does not support HTTP Digest Authentication. Make sure authentication is disabled on the Shelly device before adding it to TapHome. This can be configured in the Shelly web UI under Settings → Authentication.

CT type selection

After connecting the current transformers, configure the CT type via the Shelly web UI or by calling EM.SetConfig with the appropriate ct_type value. Use EM.GetCTTypes to list supported types (typically 120A and 400A). If the CT type is not set, the device reports a ct_type_not_set error and measurements will not be available.

Phase-to-phase calibration

The Pro 3EM supports channel-to-channel calibration to improve measurement accuracy between phases. Calibration requires a minimum load of 500 W per channel and takes approximately 5 seconds. Use EM.PhaseToPhaseCalib to calibrate and EM.PhaseToPhaseCalibReset to revert to factory defaults.

ECO mode

If ECO mode is enabled on the Shelly device, it may cause communication timeouts due to the 3-second module poll interval used by TapHome. Disable ECO mode for reliable operation.

Device capabilities

Per-phase current monitoring

Three current sensor devices (L1 Current, L2 Current, L3 Current) report the instantaneous current in Amps for each phase, read directly from EM.GetStatus fields a_current, b_current, and c_current. These are simple sensor values with no unit conversion.

Per-phase bidirectional energy metering

Each phase has two energy meter devices — From Grid and To Grid:

  • L1/L2/L3 From Grid — active power consumed from the grid (W, converted to kW) and cumulative energy consumed (Wh, converted to kWh). Each From Grid device also exposes four service attributes: Power Factor, Current [A], Voltage [V], and Total Returned Energy [kWh].
  • L1/L2/L3 To Grid — active power fed to the grid (W, divided by -1000 to show feed-in as positive kW) and cumulative returned energy (Wh, converted to kWh). The To Grid devices have no service attributes.

The service attributes on From Grid devices provide a complete per-phase picture: real-time current and voltage, power factor for power quality assessment, and a returned energy counter for tracking cumulative feed-in alongside the From Grid consumption counter.

Total bidirectional energy metering

Two aggregate devices summarize all three phases:

  • Total From Grid — combined 3-phase active power (kW) and total cumulative energy consumed from the grid (kWh)
  • Total To Grid — combined 3-phase returned power (kW, inverted) and total cumulative energy fed to the grid (kWh)

All devices use a 3-second poll interval matching the module read cycle.

Additional capabilities

The Shelly Pro 3EM also natively exposes apparent power per phase and total, neutral current measurement (unique to the Pro model — not available on the 3EM Gen3), grid frequency per phase, total current across all phases, and module diagnostics (WiFi SSID, IP address, signal strength, MAC address). Firmware update and reboot actions are also available via the RPC API. Phase sequence error detection and up to 60 days of 1-minute resolution data logging with CSV/JSON export are supported natively. These capabilities can be added in a future template update.

Troubleshooting

Device not responding
  1. Verify the Shelly is connected to Wi-Fi or LAN and has a valid IP address
  2. Try using the mDNS hostname (ShellyPro3EM-XXXXXXXXXXXX.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 Core and Shelly are on the same network / VLAN
ct_type_not_set error

If the EM or EMData component reports a ct_type_not_set error, the current transformer type has not been configured. Set the CT type via the Shelly web UI or by calling EM.SetConfig with the appropriate ct_type value. Use EM.GetCTTypes to list supported types.

Phase sequence error

If the phase_sequence error appears in EM.GetStatus, the phases are connected in reverse order (A-C-B instead of A-B-C). Either rewire the phases in the correct sequence or enable monitor_phase_sequence in the EM configuration to suppress the error if the reversed order is intentional.

Negative or zero values on To Grid devices

The To Grid devices use an inverted conversion (division by -1000) to represent grid feed-in as a positive number. If there is no feed-in (the system is only consuming), the To Grid demand value will show as zero or negative. This is expected behavior — the From Grid device tracks consumption, while To Grid tracks export.

Gen2+/Gen3 Shelly devices support up to 6 concurrent HTTP connections. Each polling system (TapHome, Home Assistant, etc.) consumes connections. Avoid running too many integrations on the same device simultaneously.

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 Pro 3 EM Module
Custom Variables

Shelly Pro 3 EM

Read (module)
VAR response := SENDHTTPREQUEST("/rpc/EM.GetStatus?id=0");
IF response.IsSuccess
    EMStatus := response.Content;
END;

response := SENDHTTPREQUEST("/rpc/EMData.GetStatus?id=0");
IF response.IsSuccess
    EMDataStatus := response.Content;
END
L1 Current Variable Read-only
numeric Unit: A json_path

L1 Current

Read
todouble(PARSEjson(EMStatus, "a_current"))
L1 From Grid Electricity Meter Read-only

Phase A active power (kW) and cumulative energy consumed from grid (kWh), with voltage, current, power factor, and returned energy

numeric Unit: kW / kWh json_path
Service Attributes
Power Factor
Current
Voltage
Total Returned EnergyPhase A cumulative returned (feed-in) energy in kWh

L1 From Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "a_total_act_energy"))/1000
Read demand
todouble(PARSEjson(EMStatus, "a_act_power"))/1000
Service Attributes
power factor
RETURN(todouble(PARSEjson(EMStatus, "a_pf")));
Current [A]
RETURN(todouble(PARSEjson(EMStatus, "a_current")));
voltage [V]
RETURN(todouble(PARSEjson(EMStatus, "a_voltage")));
Total returned energy [kWh]
RETURN(todouble(PARSEjson(EMDataStatus, "a_total_act_ret_energy"))/1000);
L1 To Grid Electricity Meter Read-only

Phase A returned power (kW, inverted) and cumulative energy fed to grid (kWh)

numeric Unit: kW / kWh json_path

L1 To Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "a_total_act_ret_energy"))/1000
Read demand
todouble(PARSEjson(EMStatus, "a_act_power"))/-1000
L2 Current Variable Read-only
numeric Unit: A json_path

L2 Current

Read
todouble(PARSEjson(EMStatus, "b_current"))
L2 From Grid Electricity Meter Read-only

Phase B active power (kW) and cumulative energy consumed from grid (kWh), with voltage, current, power factor, and returned energy

numeric Unit: kW / kWh json_path
Service Attributes
Power Factor
Current
Voltage
Total Returned EnergyPhase B cumulative returned (feed-in) energy in kWh

L2 From Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "b_total_act_energy"))/1000
Read demand
todouble(PARSEjson(EMStatus, "b_act_power"))/1000
Service Attributes
power factor
RETURN(todouble(PARSEjson(EMStatus, "b_pf")));
current [A[
RETURN(todouble(PARSEjson(EMStatus, "b_current")));
voltage [V]
RETURN(todouble(PARSEjson(EMStatus, "b_voltage")));
total returned energy [kWh]
RETURN(todouble(PARSEjson(EMDataStatus, "b_total_act_ret_energy"))/1000);
L2 To Grid Electricity Meter Read-only

Phase B returned power (kW, inverted) and cumulative energy fed to grid (kWh)

numeric Unit: kW / kWh json_path

L2 To Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "b_total_act_ret_energy"))/1000
Read demand
todouble(PARSEjson(EMStatus, "b_act_power"))/-1000
L3 Current Variable Read-only
numeric Unit: A json_path

L3 Current

Read
todouble(PARSEjson(EMStatus, "c_current"))
L3 From Grid Electricity Meter Read-only

Phase C active power (kW) and cumulative energy consumed from grid (kWh), with voltage, current, power factor, and returned energy

numeric Unit: kW / kWh json_path
Service Attributes
Power Factor
Current
Voltage
Total Returned EnergyPhase C cumulative returned (feed-in) energy in kWh

L3 From Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "c_total_act_energy"))/1000
Read demand
todouble(PARSEjson(EMStatus, "c_act_power"))/1000
Service Attributes
power factor
RETURN(todouble(PARSEjson(EMStatus, "c_pf")));
current [A]
RETURN(todouble(PARSEjson(EMStatus, "c_current")));
voltage [V]
RETURN(todouble(PARSEjson(EMStatus, "c_voltage")));
Total returned energy [kWh]
RETURN(todouble(PARSEjson(EMDataStatus, "c_total_act_ret_energy"))/1000);
L3 To Grid Electricity Meter Read-only

Phase C returned power (kW, inverted) and cumulative energy fed to grid (kWh)

numeric Unit: kW / kWh json_path

L3 To Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "c_total_act_ret_energy"))/1000
Read demand
todouble(PARSEjson(EMStatus, "c_act_power"))/-1000
Total From Grid Electricity Meter Read-only

Combined 3-phase active power (kW) and total cumulative energy consumed from grid (kWh)

numeric Unit: kW / kWh json_path

Total From Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "total_act"))/1000
Read demand
todouble(PARSEjson(EMStatus, "total_act_power"))/1000
Total To Grid Electricity Meter Read-only

Combined 3-phase returned power (kW, inverted) and total cumulative energy fed to grid (kWh)

numeric Unit: kW / kWh json_path

Total To Grid

Read total consumption
todouble(PARSEjson(EMDataStatus, "total_act_ret"))/1000
Read demand
todouble(PARSEjson(EMStatus, "total_act_power"))/-1000
Connection: Packet Parser → HTTP
Possible improvements (14)
  • Phase A Apparent Power — Apparent power in VA, available per phase — could complement active power
  • Total Apparent Power — Sum of apparent power on all phases [VA]
  • Neutral Current — Current on neutral conductor [A] — Pro 3EM supports this (unlike 3EM Gen3)
  • Grid Frequency — Network frequency in Hz, available per phase — not exposed as device or SA
  • Total Current — Sum of current on all three phases [A]
  • MAC Address — No module-level service attributes in this template (unlike 3EM Gen3)
  • WiFi SSID — No module-level service attributes in this template (unlike 3EM Gen3)
  • Signal Strength — WiFi RSSI in dBm — not polled by module readscript
  • Firmware Update — No module-level service actions in this template (unlike 3EM Gen3)
  • Reboot — No module-level service actions in this template (unlike 3EM Gen3)
  • Uptime — Seconds since last reboot
  • Free RAM — Available RAM in bytes
  • Total Returned Energy (dedicated) — Already implemented as Total To Grid device (readtotalconsumption), listed for completeness
  • Phase Sequence Monitoring — Enable/disable phase sequence error detection via EM.SetConfig

Sources