custom-mygrid

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.

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

Known limitations

Troubleshooting

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.