- Python 98.5%
- Dockerfile 0.9%
- Shell 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Changing the published port to 81 left the log saying "Shelly API listening on port 80", which reads as if the setting had been ignored. Both numbers are correct but describe different ports: the container always binds 80 because config.yaml declares it, and Supervisor maps the configurable host port onto that. Say which is which instead of printing a bare number. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
| anker_shelly_meter | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| repository.json | ||
| ui_endpoints.png | ||
| ui_endpoints_crop.png | ||
⚡ Anker Shelly Meter
Home Assistant add-on that serves power data you already have as the HTTP API of a Shelly Pro 3EM, so an Anker SOLIX device can use it as its smart meter. The point is to avoid installing a second physical meter next to the one already feeding Home Assistant.
Everything stays on the LAN: no Shelly account, no Shelly Cloud, no Anker cloud.
This project was developed with the assistance of Claude (Anthropic).
🍴 About this fork
Forked from JoergNi/anker-shelly-meter,
which had the idea and the working proof that an Anker SOLIX device accepts an
emulated Shelly Pro 3EM over plain HTTP. That version could only be installed by
copying the folder into /addons by hand.
This fork turns it into a repository Home Assistant can install and update normally, and extends it. In short:
- 🏠 Proper add-on repository layout, official HA base images, icon and logo, changelog, translated options
- 📊 Ingress Web UI with live values, poll age and the served endpoint list
- ⚙️ Configuration from that Web UI, as a form or as raw YAML, written back through the Supervisor API with an optional restart
- 📡 Two data sources: Home Assistant entities, or MQTT straight off the broker for values that are published but never become entities
- 🔌 Wider protocol coverage:
Shelly.GetDeviceInfo,Shelly.GetStatus,EMData.GetStatus,Sys.GetStatus,/settingsand JSON-RPC overPOST /rpc - 🔗 WebSocket RPC on
/rpcwith pushed status updates, so Home Assistant's own Shelly integration accepts the emulator as a Gen2 device - 🔋 Real energy counters, integrated from measured power and persisted across restarts
- ⚙️ Optional per-phase entities, optional voltage entities, stale-data detection, configurable port, MAC and log level
See the changelog for the full list, including two breaking configuration changes.
📦 Installation
Add this repository under Settings → Add-ons → Add-on Store → ⋮ → Repositories, then install Anker Shelly Meter:
https://opencommit.eu/HWE70/anker-shelly-meter
That is the public mirror and works from anywhere. Development happens on
https://git.highwire.de/HWE70/anker-shelly-meter, which resolves to a private
LAN address and is only reachable from inside that network.
Full setup, options and troubleshooting: DOCS.md.
🧭 How it fits together
Home Assistant sensor ──► this add-on ──► Anker SOLIX device
(existing grid meter) Shelly Pro 3EM polls http://<host-ip>/
HTTP API on :80
The add-on polls Home Assistant through the Supervisor API, keeps the latest values in memory, and answers Shelly requests from them. It never talks to the Anker device on its own; the device does the polling.
🚧 Scope
Anker offers two ways to attach a Shelly meter. This add-on serves the local one, where the device polls an IP address you type into the app.
It cannot serve the Shelly Cloud path, where the Anker app asks for a Shelly account login and Anker's backend reads the meter through Shelly's integrator API. That path needs a genuine device in a genuine Shelly account.
Upstream confirmed the local path with a Solarbank 2 (A17C2). Whether a given Anker device and firmware offers it is visible in the app under Settings → Smart Meter → Add Meter.
📄 Licence and attribution
This fork is released under the MIT licence. Note that the upstream repository carries no licence file of its own, so the terms of the original code it started from are undeclared.
Shelly and Allterco, Anker and Anker SOLIX are trademarks of their respective owners. This project is not affiliated with, endorsed by or supported by either company. The emulated device deliberately uses a locally administered MAC address rather than an Allterco one.