
The Shelly 3EM is a Wi-Fi 3-phase energy meter with three 120 A CT (current transformer) clamps and a built-in 10 A contactor relay. It monitors active power, voltage, current, power factor, and cumulative energy for each phase independently. TapHome communicates with the device over the local network — no cloud connection is required.
Two TapHome templates are available for this device: an HTTP template (default, uses REST API polling) and an MQTT template (uses broker-based message subscription). Both templates provide the same set of devices — 3 energy meters (one per phase) and 1 contactor switch. Choose one protocol based on the installation requirements.
Hardware connection
The Shelly 3EM requires mains power (110–230 V AC) connected to the L and N terminals. Each of the three included CT clamps connects to the CT1, CT2, and CT3 terminals respectively. The contactor relay output is on the O terminal (10 A max).
CT clamp installation
- Each CT clamp clips around the live wire of the circuit to monitor — no wire cutting required
- The arrow on the CT clamp must point in the direction of current flow (from source to load)
- CT clamps can monitor a 3-phase system (L1, L2, L3) or three independent mono-phase circuits
Do NOT connect a CT clamp to the live wire before wiring it to the Shelly 3EM. High voltage may be present across the transformer’s connection cables even if only the transformer is connected.
Contactor control
The relay output (O terminal) is rated for 10 A and can directly switch small loads or drive an external contactor coil for switching higher loads.
Configuration
HTTP template setup
During template import, enter the device’s IP address. The template polls three separate endpoints (/emeter/0, /emeter/1, /emeter/2) for per-phase energy data and /relay/0 for contactor state. Each phase response is cached in a custom variable (emeter0, emeter1, emeter2) to minimize HTTP calls per poll cycle.
MQTT template setup
The MQTT template requires three import parameters:
| Parameter | Description | Example |
|---|---|---|
| MQTT Broker IP | Address of the MQTT broker | 192.168.1.10 |
| MQTT Broker Port | Broker port (default 1883) | 1883 |
| Device ID | MAC address suffix used in MQTT topics | B929CC |
The Device ID (dID) is the last 6 characters of the MAC address in uppercase hex. It can be found in the Shelly web UI under Settings → Device Info, or via GET http://{ip}/settings → mqtt.id field.
The module subscribes to shellies/shellyem3-{dID}/# and listener scripts route per-phase emeter and relay messages to the corresponding devices.
The MQTT template uses the topic prefix
shellyem3-{dID}while official API documentation referencesshelly3em-{id}. Both formats work — thedIDvariable is user-configurable. Verify the actual topic prefix by subscribing toshellies/#with an MQTT client.
On Gen1 Shelly devices, enabling MQTT disables Shelly Cloud. Both cannot run simultaneously. This is a firmware limitation.
Device capabilities
Per-phase energy metering
The template creates three electric meter devices — one for each phase. Each meter reads:
- Active power — instantaneous power in W, converted to kW by the template (÷ 1000)
- Total energy consumed — cumulative energy in Wh, converted to kWh by the template (÷ 1000)
In the HTTP template, each phase is read from its /emeter/{i} endpoint. In the MQTT template, the values arrive on shellies/shellyem3-{dID}/emeter/{i}/power and .../total topics.
Per-phase electrical parameters
Each energy meter exposes four service attributes:
- Voltage — RMS voltage (V)
- Current — RMS current (A)
- Power factor — ratio of active to apparent power (0.00–1.00)
- Total returned energy — energy returned to the grid in Wh, useful for solar/PV installations with bidirectional metering
Energy counter reset
Each phase has a Reset total service action that clears the energy counters for that specific phase. In HTTP mode this calls /emeter/{i}?reset_totals; in MQTT mode it publishes reset_totals to the shellies/shellyem3-{dID}/emeter/{i}/command topic.
Contactor switch
The template exposes the contactor relay as a switch device. The relay state is read from /relay/0 → ison (HTTP) or the shellies/shellyem3-{dID}/relay/0 topic (MQTT), and controlled via /relay/0?turn=on|off (HTTP) or the .../relay/0/command topic (MQTT).
Additional capabilities
The Shelly 3EM also provides reactive power (VAR), a measurement validity flag per phase (is_valid), total 3-phase power sum (total_power from /status), WiFi signal strength, device uptime, firmware update status, per-phase overpower thresholds, and historical energy data export (CSV). An auto-off timer is available on the contactor relay. These capabilities can be added in a future template update.
Troubleshooting
Device not responding (HTTP)
- Verify the Shelly 3EM is connected to Wi-Fi and has a valid IP address
- Open
http://{device-ip}/shellyin a browser — if it responds, the device is reachable - Check that TapHome Core and the Shelly 3EM are on the same network / VLAN
No MQTT messages received
- Confirm MQTT is enabled in the Shelly web UI (Internet & Security → Advanced — MQTT)
- Verify the broker address and port are correct in both the Shelly device and TapHome template
- Check the
dIDcustom variable matches the actual device ID — subscribe toshellies/#with an MQTT client to verify the topic prefix the device uses - Ensure the MQTT broker is running and accessible from both the Shelly and TapHome Core
Energy readings show zero or NaN
- Confirm CT clamps are properly connected to the Shelly 3EM terminals (CT1, CT2, CT3) and clamped around live wires
- Verify the CT clamp arrow points in the correct direction (source to load)
- Poll
/emeter/0manually and check theis_validfield —falseindicates a disconnected or faulty CT clamp - Check
powerandtotalvalues — if both are 0, there may be no load on that circuit
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. Consider using the MQTT template if multiple systems need to monitor the device.