TapHome

Shelly 3EM Gen3

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

The Shelly 3EM Gen3 is a DIN-rail three-phase energy meter with integrated current transformers (up to 63 A per phase). It connects to the local network over Wi-Fi and exposes real-time measurements via the Gen2+/Gen3 HTTP RPC API. TapHome polls the device over HTTP on port 80 — no cloud connection is required.

The template provides four energy meter devices: one combined total meter and three individual phase meters (A, B, C). Each meter reports instantaneous active power and cumulative energy consumption, with per-phase meters also exposing voltage, current, power factor, and grid frequency as service attributes.

Hardware connection

The Shelly 3EM Gen3 is available in two variants — the 3EM-63W (wire model) and the 3EM-63T (flat terminal model). Both mount above or below DIN-rail circuit breakers.

The device requires a Y (star) 4-wire connection:

  • LA, LB, LC — three live inputs, one per phase
  • N — neutral input
  • Power supply is drawn between phase LA and neutral (220-240 V~ 50/60 Hz)

External protection should be rated at 63 A with characteristic B or C and a 6 kA rating.

The maximum safe operating voltage is 280 V per phase. The current range is 0-63 A with 130 A saturation. Exceeding these limits may damage the device.

Configuration

The Shelly 3EM Gen3 connects over Wi-Fi. 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.

Profile selection

The Shelly 3EM Gen3 supports two profiles — Triphase (default) and Monophase. The TapHome template is designed for the Triphase profile, which exposes a single EM component (em:0) with per-phase and total readings. Ensure the device is set to the Triphase profile (factory default).

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

Total energy metering

The Total Energy Meter device provides a combined view of all three phases:

  • Active powertotal_act_power from EM.GetStatus, converted from W to kW (divided by 1000)
  • Cumulative energytotal_act from EMData.GetStatus, converted from Wh to kWh (divided by 1000)
  • Total current (service attribute) — sum of current across all three phases
Per-phase energy metering

Three individual phase meters (Phase A, Phase B, Phase C) provide detailed per-phase measurements. Each phase meter reports:

  • Active power — instantaneous power in kW (converted from W)
  • Cumulative energy — total energy consumption in kWh (converted from Wh)

Each phase meter also exposes four service attributes:

  • Electric Current — phase current in A
  • Electric Voltage — phase voltage in V
  • Power Factor — dimensionless ratio of real to apparent power
  • Grid Frequency — network frequency in Hz

The per-phase meters use a 15-second poll interval (compared to the 3-second module poll interval), which is sufficient for energy monitoring purposes.

Module diagnostics

The template exposes four module-level service attributes:

  • Wifi — connected Wi-Fi network SSID
  • IP Address — device IP address on the local network
  • Signal Strength — Wi-Fi RSSI in dBm
  • MAC — device MAC address

Two service actions are available:

  • Update FW — triggers a firmware update to the latest stable release
  • Reboot — triggers a device reboot

The module read script also checks for available firmware updates and pending restart requirements, displaying warnings in TapHome when either condition is detected.

Additional capabilities

The Shelly 3EM Gen3 also exposes apparent power per phase and total, neutral current, and returned (feed-in) energy counters per phase and total. Phase sequence error detection and historical data storage with 1-minute resolution are available natively. 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 (Shelly3EM63G3-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 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.

Gen2+/Gen3 Shelly devices support up to 6 concurrent HTTP connections. This is more than Gen1 devices (2 connections), but keep in mind that 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 3EM Gen3 Module
Service Attributes
Wifi
IP Address
Signal Strength
MAC
Service Actions
Update FWTriggers firmware update to the latest stable release
Reboot
Custom Variables

Shelly 3EM Gen3

Read (module)
VAR response := SENDHTTPREQUEST("/rpc/Sys.GetStatus");
IF response.IsSuccess
    Sys.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/Sys.GetConfig");
IF response.IsSuccess
    Sys.GetConfig := response.Content;
END

response := SENDHTTPREQUEST("/rpc/WiFi.GetStatus");
IF response.IsSuccess
    WiFi.GetStatus := response.Content;
END

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

response := SENDHTTPREQUEST("/rpc/EMData.GetStatus?id=0");
IF response.IsSuccess
    EMData.GetStatus := response.Content;
END

if ! ISNULL(parsejson(Sys.GetStatus, "available_updates.stable", true))
    addwarning("New firmware update is available");
end

if parsejson(Sys.GetStatus, "restart_required", true)
    addwarning("Restart required");
end
Service Attributes
Wifi
PARSEJSON(WiFi.GetStatus, "ssid")
${ipAddress}
PARSEJSON(WiFi.GetStatus, "sta_ip")
${xml_signal_strength} [dB]
PARSEJSON(WiFi.GetStatus, "rssi")
MAC
PARSEJSON(Sys.GetStatus, "mac")
Service Actions
${xml_update_fw}
VAR response := SENDHTTPREQUEST("/rpc/Shelly.Update?stage=\"stable\"");
IF response.IsSuccess
    return("OK");
else
    return("Error");
END

Reboot
VAR response := SENDHTTPREQUEST("/rpc/Shelly.Reboot");
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
Total Energy Meter Electricity Meter Read-only

Combined 3-phase active power (kW) and total cumulative energy consumption (kWh)

numeric Unit: kW / kWh json_path
Service Attributes
Electric CurrentSum of current across all three phases
Variable: EM.GetStatus

Total Energy Meter

Read total consumption
return(parsejson(EMData.GetStatus,"total_act")/1000);
Read demand
return(parsejson(EM.GetStatus,"total_act_power")/1000);
Service Attributes
${electric_current} [A]
return(parsejson(EM.GetStatus,"total_current"));
Phase A Energy Meter Electricity Meter Read-only

Phase A active power (kW), cumulative energy (kWh), voltage, current, power factor, and frequency

numeric Unit: kW / kWh json_path
Service Attributes
Electric Current
Electric Voltage
Power Factor
Grid Frequency

Phase A Energy Meter

Read total consumption
return(parsejson(EMData.GetStatus,"a_total_act_energy")/1000);
Read demand
return(parsejson(EM.GetStatus,"a_act_power")/1000);
Service Attributes
${electric_current} [A]
return(parsejson(EM.GetStatus,"a_current"));
${electric_voltage} [V]
return(parsejson(EM.GetStatus,"a_voltage"));
${power_factor}
return(parsejson(EM.GetStatus,"a_pf"));
${grid_frequency} [Hz]
return(parsejson(EM.GetStatus,"a_freq"));
Phase B Energy Meter Electricity Meter Read-only

Phase B active power (kW), cumulative energy (kWh), voltage, current, power factor, and frequency

numeric Unit: kW / kWh json_path
Service Attributes
Electric Current
Electric Voltage
Power Factor
Grid Frequency

Phase B Energy Meter

Read total consumption
return(parsejson(EMData.GetStatus,"b_total_act_energy")/1000);
Read demand
return(parsejson(EM.GetStatus,"b_act_power")/1000);
Service Attributes
${electric_current} [A]
return(parsejson(EM.GetStatus,"b_current"));
${electric_voltage} [V]
return(parsejson(EM.GetStatus,"b_voltage"));
${power_factor}
return(parsejson(EM.GetStatus,"b_pf"));
${grid_frequency} [Hz]
return(parsejson(EM.GetStatus,"b_freq"));
Phase C Energy Meter Electricity Meter Read-only

Phase C active power (kW), cumulative energy (kWh), voltage, current, power factor, and frequency

numeric Unit: kW / kWh json_path
Service Attributes
Electric Current
Electric Voltage
Power Factor
Grid Frequency

Phase C Energy Meter

Read total consumption
return(parsejson(EMData.GetStatus,"c_total_act_energy")/1000);
Read demand
return(parsejson(EM.GetStatus,"c_act_power")/1000);
Service Attributes
${electric_current} [A]
return(parsejson(EM.GetStatus,"c_current"));
${electric_voltage} [V]
return(parsejson(EM.GetStatus,"c_voltage"));
${power_factor}
return(parsejson(EM.GetStatus,"c_pf"));
${grid_frequency} [Hz]
return(parsejson(EM.GetStatus,"c_freq"));
Connection: Packet Parser → HTTP
Possible improvements (8)
  • 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]
  • Total Returned Energy — Total active returned energy [Wh] — relevant for solar/grid feed-in
  • Phase A Returned Energy — Per-phase returned energy [Wh] — same available for B and C
  • Uptime — Seconds since last reboot, available in Sys.GetStatus
  • Free RAM — Available RAM in bytes
  • Phase Sequence Monitoring — Enable/disable phase sequence error detection via EM.SetConfig

Sources