Maintained in tjorim/ha-mygrid-voltbridge · revision 59e88dfebe3f. Updates are reviewed before publication.
MyGrid VoltBridge for Home Assistant
Documentation
Read the complete VoltBridge setup guide on the MyGrid documentation website, alongside the other device guides.
This README is the authoritative source for this integration’s installation,
configuration, entities, Energy dashboard setup, automation examples and
troubleshooting. Edit those instructions here; the website publishes a reviewed,
commit-pinned snapshot, so it may lag this branch. Integration acceptance and
release instructions belong in this repository’s docs/ directory.
Python usage, device prerequisites and protocol details belong in
python-mygrid-voltbridge. Link to that
source rather than copying its reference tables. Contributor guidance lives in
CONTRIBUTING.md.
Home Assistant custom integration for the MyGrid VoltBridge P1 meter adapter. It talks to the device on your LAN only (no cloud, no MQTT broker needed): live values by the device’s UDP broadcast and the rest over its local HTTP API.
Requires Home Assistant 2026.10.2 or newer (Python 3.14.2+). The integration uses the independent mygrid-voltbridge library from PyPI, which Home Assistant installs automatically. This is a community integration; it has not received an official Home Assistant quality rating (see quality tracking). The device API is reverse-engineered and unofficial, and was checked against one single-phase meter on firmware build 15.6.
The MyGrid ModuleTwo battery has its own repository, ha-mygrid-modbus: HACS allows one integration per repository, so the two devices are separate integrations here.
- Push first: live power, voltage and current arrive by UDP broadcast about once a second.
- Weak Wi-Fi or blocked broadcasts: UDP datagrams are lost on a poor connection. While they are silent for a couple of seconds, or if they never reach Home Assistant (across VLANs, or a container without host networking), live power is read from the device’s
/api/powerabout once a second instead. - Polling: the HTTP snapshot (energy totals, gas) and the raw DSMR telegram (water, breaker, peak history) are read every 30 s by default (5-600 s under Configure).
- Offline: the entities turn unavailable when the device has said nothing for 30 s, and come back by themselves.
- Discovery: found automatically through mDNS (
_mygrid._tcp), followed to a new address through DHCP, or enter its address manually.
Installation
On Home Assistant 2026.11 or newer, open Settings → Marketplace and add
https://github.com/tjorim/ha-mygrid-voltbridge as a custom repository of type
Integration. Install MyGrid VoltBridge and follow any restart prompt.
Catalog listing is separate from custom-repository installation.
On Home Assistant 2026.10.2 or newer in the 2026.10 series, use HACS → Custom repositories, add the same URL as an Integration, download it and restart Home Assistant.
Open this repository in the Marketplace.
For manual installation, copy the entire custom_components/mygrid_voltbridge
directory into <config>/custom_components/mygrid_voltbridge and restart Home Assistant.
Home Assistant installs the Python library from PyPI; network access is required
for its first installation.
See release instructions for manual-install ZIPs and publishing.
Configuration
The VoltBridge is discovered automatically under Settings → Devices & services. Otherwise choose Add integration → MyGrid VoltBridge and enter its hostname or IP address, without a URL scheme.
Connect the P1 cable before adding the device: entities are created from the first snapshot, and setup waits until the meter has delivered a telegram. Each meter is identified by its P1 serial. Discovery follows IP changes; Reconfigure lets you change the address while refusing a different meter.
After installation, start setup in Home Assistant.
Entities
| Entity | Notes |
|---|---|
| Net / import / export power | W; positive net power is import |
| Import / export power (1 min average) | W; a rolling one-minute mean, steadier than the live value for automations |
| Energy imported / exported (day, night) | total_increasing, suitable for the Energy dashboard |
| Energy imported / exported (total) | Day plus night in one sensor each, for the Energy dashboard |
| Voltage and current per phase | One set per phase the meter reports (L1 verified) |
| Import / export power per phase | Disabled by default |
| Current average demand, peak demand, peak demand time | Quarter-hour average and the month’s peak (capacity tariff). The peak sensor carries the monthly peak history as the history attribute |
| Tariff | day / night |
| Gas, water volume | m³; only if those meters are connected to the meter’s M-Bus. Read by polling; not part of the UDP broadcast. The last_reading attribute holds the time of the meter’s own reading |
| Gas and water valve | Diagnostic; open, closed or ready to reconnect, if the M-Bus meter reports a valve |
| Meter model, DSMR version | Diagnostic: what the meter reports in its telegram header |
| Breaker | Diagnostic: open / closed / ready to reconnect |
| Wi-Fi signal | Diagnostic, dBm. Kept fresh by the UDP stream (a poor signal explains missed updates) |
| P1 packet error rate | Diagnostic, %: the share of P1 telegrams that failed their checksum. A rising value points at the P1 cable |
| Free heap, minimum free heap | Diagnostic, bytes, disabled by default. Scraped from the status page and refreshed hourly. A minimum that stays near zero over days is worth reporting |
| Reboot | Button, disabled by default. Restarts the VoltBridge; the entities are unavailable until it answers again |
| Limiter and fuse threshold | Diagnostic, disabled by default; created only when the meter has real limits (999.9 kW / 999 A mean none) |
Each gas or water meter gets a device of its own (Gas meter, Water meter) next to the adapter, identified by the meter’s equipment ID (or its M-Bus channel when it reports none). Its volume, valve and last_reading live there; everything else stays on the adapter. If a meter is replaced or first appears after setup, the entry reloads by itself within one poll interval. A replaced meter leaves its old device behind; delete it from the device page.
The adapter’s device page shows its firmware build (read from its status page and refreshed hourly), its MAC address as serial number, and the hardware revision when the device was discovered over mDNS.
The only thing the integration ever sends to the device is the opt-in Reboot button (never retried). The device has no authentication, so keep it on your trusted LAN.
Examples
- Energy dashboard: add Energy imported as grid consumption, Energy exported as return to grid, and the gas or water meter’s Volume as sources. The day and night sensors are there if you want the two tariffs as separate sources.
- Solar-surplus automation: trigger when Net power stays below
-500W for five minutes, then start the washing machine. Net power is negative while exporting. - Capacity tariff (Belgium): alert when Current average demand (the running quarter-hour average, DSMR
1-0:1.4.0) climbs towards the month’s Peak demand.
Known limitations
- The API is reverse-engineered and unofficial; firmware changes can break it.
- Export power/energy and phases L2/L3 are decoded by pattern, not verified against hardware (the test meter is single-phase with no export). A phase missing from the live snapshot is read from the raw telegram, so its values update at the polling interval instead of about once a second.
- Gas and water meters report every few minutes to an hour, so those sensors change at that pace.
- Entities appear only for what the meter reports when the entry is set up. Reload the entry after adding a phase (a new gas or water meter reloads it by itself).
- A weak Wi-Fi signal (below about -75 dBm) loses UDP datagrams; check Wi-Fi signal first when updates are missed.
- Do not run this integration and the MyGrid MQTT device for the same meter: the meter appears twice (
sensor.voltbridge_*andsensor.mygrid_voltbridge_*). Pick one source, and use only its entities in the Energy dashboard. - One meter per config entry; add the integration again for a second VoltBridge.
Troubleshooting
- Cannot reach the VoltBridge: open
http://<address>/in a browser from the Home Assistant host. The page must load. - No P1 telegram yet / repair “VoltBridge receives no P1 data”: check the P1 cable and that the meter’s P1 port is enabled. The repair clears itself.
- Live power updates about once a second but voltage and current are stale or missing: UDP broadcasts are not arriving, so only the power fallback runs. Check VLAN and firewall rules for UDP 49491 and 49492, or use host networking.
- Download diagnostics from the device page when reporting a problem; the host and meter serial are redacted.
Removal
Delete the entry under Settings → Devices & services; this removes its device, entities and any repair issue. To remove the installed files on Home Assistant 2026.11 or newer, open this repository under Settings → Marketplace, select ⋮ → Uninstall, and follow any restart prompt. On Home Assistant 2026.10.2–2026.10.x, remove the HACS download and restart. For a manual installation, remove the local directory and restart.
Release preparation and catalog prerequisites are covered in the release guide.
Development
This is the community-testing integration for the VoltBridge. HACS allows one integration per repository, so each MyGrid device has its own HACS repository. This repository is the source of truth for its integration code and tests; the device library is a separate PyPI package.
| Repository | Role |
|---|---|
python-mygrid-voltbridge |
Standalone client library (PyPI package mygrid-voltbridge): HTTP API, DSMR telegram, UDP decoder, live smoke tests |
ha-mygrid-voltbridge |
This HACS integration: domain mygrid_voltbridge, depending on the PyPI library |
ha-mygrid-modbus |
The matching HACS integration for the ModuleTwo battery |
ha-mygrid-core |
Dormant umbrella integration (domain mygrid) kept for a possible Home Assistant core contribution; not used or maintained for the HACS packages |
A checkout of this repository is self-contained for tests and installation:
uv sync --frozen
uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run pytest
uv run python scripts/validate_metadata.py
uv run python scripts/build_release.py
Change integration code and tests here. Change device or API behavior in python-mygrid-voltbridge, publish a release to PyPI, then bump the mygrid-voltbridge== pin in custom_components/mygrid_voltbridge/manifest.json and in the dev dependency group of pyproject.toml (run uv lock); scripts/validate_metadata.py fails if the two pins differ. Entries of this package do not migrate to a core integration later; add the device again there. The integration ships the community project’s green lightning icon; HACS checks branding without exemptions. The earlier prototype of this repository used the same domain, so its config entries keep working.
To try the integration in a real Home Assistant, run scripts/develop: it starts Home Assistant with the component importable from this checkout and a configuration in config/ (ignored by git). The first start installs the default integrations’ requirements and needs network access; then open http://localhost:8123.
A live end-to-end test runs the integration inside the Home Assistant test runtime against a real device: VOLTBRIDGE_HOST=192.168.0.45 uv run pytest -m live --no-cov. It is excluded from ordinary runs.