Virtual Meter Home Assistant Add-on Repository
December 25, 2025 · View on GitHub
This repository hosts the Virtual Meter Home Assistant add-on (virtual-meter/).
The add-on provides a Shelly Pro 3EM (Gen2) emulator so that Hoymiles 1920 AC
battery owners can control battery charge and discharge based on grid
consumption data.
Layout
.
├── tests/ # Unit tests
├── virtual-meter/ # Add-on root
│ ├── app/ # Add-on application code
│ │ ├── assembler.py # Payload assembly from provider data
│ │ ├── cache.py # In-memory payload cache
│ │ ├── config.py # Settings loader
│ │ ├── consumer.py # Polling client
│ │ ├── identity.py # Device ID/MAC helpers
│ │ ├── main.py # Entry point
│ │ ├── mdns.py # mDNS/zeroconf broadcaster
│ │ ├── payload_templates.py # Static payload templates
│ │ ├── provider.py # JSON-RPC server
│ │ └── serializer.py # JSON codec helpers
│ ├── translations/ # Localized strings for the HA UI
│ ├── build.yaml # Base image pin per architecture
│ ├── CHANGELOG.md # User-facing release notes rendered in HA
│ ├── config.yaml # Supervisor metadata & schema
│ ├── Dockerfile # Add-on Dockerfile
│ ├── DOCS.md # Documentation tab content
│ ├── icon.png / logo.png # Store badges/icons
│ ├── README.md # Add-on specific developer notes
│ ├── requirements.txt # Add-on runtime dependencies
│ └── run.sh # Entry script
├── README.md # This file
└── repository.yaml # Supervisor store metadata for this repo
Contributing
- Fork/clone this repository.
- Update
repository.yamlwith your GitHub URL if you plan to publish under a different namespace. - Push changes to
main. - (Optional) Add the repository URL to Settings → Add-ons → Repositories inside Home Assistant for local testing.
For full configuration, upgrade, and troubleshooting guidance refer to virtual-meter/DOCS.md.
CI / QA
dependency-review.yml: dependency change auditing on PRs.megalinter.yml: linting + SBOM generation on PRs and main.scorecard.yml: OpenSSF Scorecard analysis on main.tests.yml: unit test execution on PRs and main.dependabot.ymlandrenovate.json: automated dependency updates.