Skip to content

feat: add Shelly EM3 Pro / Pro 3EM 3-phase power meter - #155

Merged
XavierBerger merged 1 commit into
hacf-fr:mainfrom
merryspankersltd:pr/em3-power-meter
Aug 7, 2026
Merged

feat: add Shelly EM3 Pro / Pro 3EM 3-phase power meter#155
XavierBerger merged 1 commit into
hacf-fr:mainfrom
merryspankersltd:pr/em3-power-meter

Conversation

@merryspankersltd

Copy link
Copy Markdown
Contributor

Summary

New power meter package for the Shelly EM3 Pro / Pro 3EM three-phase energy meter (Gen2/Gen3 RPC API).

The meter is polled over HTTP (EM.GetStatus) and the arithmetic sum of the three phase active powers is published as the grid-exchange signal (total_act_power), matching the way a 3-phase contract is billed (net metering): an export on one phase fully offsets an import on another.

What's included

  • solar_router/power_meter_shelly_em3.yaml — polls every 2 s while activated; per-phase active powers exposed as internal sensors (show_phase_power: "True" to unhide); optional HTTP Authorization header (power_meter_auth_header)
  • Docs docs/en/power_meter_shelly_em3.md + docs/fr/
  • Example config esp32-em3-router.yaml (EM3 + triac + 1-dimmer engine)
  • docs/en+fr/installation.md entry + mkdocs nav

Notes

  • Polling every 2 s instead of 1 s: polling every second opens/closes an esp_http_client connection each second, which can trigger a stale-transport use-after-free inside ESP-IDF's tcp_transport over hours (see comment in the package).
  • Validated with esphome config (harness: common + em3 + triac + engine_1dimmer), check_documentation_coverage.sh, check_build_coverage.sh and a strict mkdocs build.

New power meter package for the Shelly EM3 Pro / Pro 3EM (Gen2/Gen3 RPC API).
Polls the meter over HTTP (`EM.GetStatus`) and publishes the arithmetic sum
of the three phase active powers as the grid-exchange signal, matching how a
3-phase contract is billed (net metering).

- adds solar_router/power_meter_shelly_em3.yaml (per-phase internal sensors,
  optional HTTP auth header)
- adds docs (en/fr), install doc entry and mkdocs nav
- adds esp32-em3-router.yaml example (triac + 1-dimmer engine)
@XavierBerger
XavierBerger merged commit 4cde9d5 into hacf-fr:main Aug 7, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants