
The Shelly Pro 4PM is a DIN rail mountable 4-channel smart relay with built-in per-channel power metering. Each of the four independent outputs can switch up to 16 A (total 40 A), making it suitable for controlling lighting circuits, appliances, or distribution board loads with individual energy monitoring per channel. TapHome communicates with the device over HTTP on the local network — no cloud connection is required.
The template uses a mixed API approach: Gen2+ RPC endpoints (/rpc/Switch.GetStatus?id=N) for energy metering reads, and Gen1 endpoints (/relay/N?turn=on|off) for relay control writes. Both API generations are supported by the Pro 4PM for backward compatibility. The device connects via WiFi or Ethernet (RJ45) and features a 1.8-inch color LCD display for local status monitoring.
Configuration
The Shelly Pro 4PM connects over WiFi or Ethernet. During TapHome template import, enter the device’s IP address (default placeholder 192.168.0.1).
Authentication must be disabled on the Shelly device for TapHome integration. TapHome does not support HTTP Digest Auth used by Gen2 devices. Open the Shelly web UI (
http://{device-ip}) → Settings → Authentication and ensure it is turned off.
The LAN cable must only be plugged in or unplugged when the device is powered off. Hot-plugging the Ethernet cable may cause issues.
If ECO mode is enabled on the Shelly device, it may cause communication timeouts due to the fast poll intervals used by the template (2.5–15 seconds). Disable ECO mode in the Shelly web UI if you experience intermittent connectivity issues.
Device capabilities
Energy metering
The template exposes four independent energy meter devices, one per channel. Each meter reads from /rpc/Switch.GetStatus?id=N (where N is 0–3):
- Real-time power —
apowerreported in watts, converted to kW by the template - Total consumption —
aenergy.totalreported in watt-hours, converted to kWh by the template
Channel 1 polls every 2.5 seconds for faster feedback. Channels 2–4 poll every 15 seconds.
The meters are read-only — they update automatically with every poll cycle.
Relay control
The template exposes four relay switch devices, one per channel. Each relay is controlled via the Gen1 /relay/N?turn=on|off endpoint (where N is 0–3).
The relay switches are write-only — the template does not read the relay state back from the device. The current relay state can be inferred from the corresponding energy meter: if the channel reports non-zero power consumption, the relay is on. A future template update could add relay state feedback using the Gen2+
/rpc/Switch.GetStatus?id=N→outputfield.
Power sensor
A standalone power sensor device exposes the raw active power in watts for channel 1 (read from /rpc/Switch.GetStatus?id=0 → apower). Unlike the energy meter which converts to kW, this sensor reports the value in watts without conversion, useful for automations that need watt-level precision.
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 Pro 4PM also exposes per-channel voltage, current, power factor, frequency, and internal temperature in its /rpc/Switch.GetStatus response. Physical switch/button input states (S1–S4), Ethernet status, WiFi RSSI, and native Gen2+ relay control with auto-off timer are available via the RPC API. These capabilities can be added in a future template update.
Troubleshooting
Device not responding
- Verify the Shelly is connected to WiFi or Ethernet and has a valid IP address
- Try using the mDNS hostname (
shellypro4pm-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal - Open
http://{device-ip}/rpc/Shelly.GetDeviceInfoin a browser — if it responds with JSON, the device is reachable - Check that TapHome Core and Shelly are on the same network / VLAN
- Confirm authentication is disabled on the Shelly device
Power readings show zero
- Confirm the load is connected through the Shelly relay output (O1–O4), not bypassed
- Check that the relay is turned on — the meter only reads when current flows through the relay
- Poll
/rpc/Switch.GetStatus?id=0manually and verifyapowerreturns a non-zero value - Verify the correct channel ID (id=0 for Output 1, id=1 for Output 2, etc.)
Relay state unknown
The relay switches in this template are write-only — they send on/off commands but do not read the relay state back. To verify the actual relay state:
- Check the corresponding energy meter — non-zero power means the relay is on
- Look at the relay LED indicators on the device front panel
- Test manually via browser:
http://{device-ip}/relay/0returns the current relay state in JSON
Overtemperature warning
The Shelly Pro 4PM 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 in the distribution board, especially when switching high loads across multiple channels simultaneously.
V1 vs V2 hardware
Both versions use the same firmware and API. V2 (SPSW-104PE16EU) has improved connectors — five individual screw terminals instead of four 2-terminal blocks — and better LAN electrical isolation. No template changes are needed between versions.
Gen2 Shelly devices support up to 6 concurrent HTTP connections. The Shelly Pro 4PM template uses up to 5 concurrent endpoints per poll cycle (4 energy meters + module status), leaving limited headroom. Avoid polling from too many systems simultaneously.