Skip to content

About

Zigbee2MQTT network map as a Home Assistant sidebar panel: pinnable d3 graph, LQI thresholds, scheduled scans

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

Zigbee2MQTT map

release Marketplace validate tests licence

A Home Assistant integration that puts your Zigbee2MQTT network map in the sidebar, as a force graph you can actually work with: nodes stay where you pin them, links are coloured by the weaker of their two LQI directions, and two numbers tell you at a glance how strong the router mesh is. Installed from the Marketplace, set up from the UI, no YAML.

screenshot

What it does

  • Pinnable layout — drag nodes apart, double-click to pin, and the arrangement survives scans and reloads (kept in the browser). Ctrl-drag rotates the whole map.

  • Weaker-direction colouring — every router link has two LQI readings (what each side hears). The colour and the "Min LQI" filter use the weaker one, so a link that looks fine from one end but not the other shows as what it is.

  • Mesh numbers — connected ≥ C: the highest LQI at which every router still reaches the coordinator; redundant ≥ R: the highest LQI at which no single router is a point of failure. Hover to see which link or router limits each number, click to set the filter there. The integration computes them after every scan, so the panel and the two sensors below always show the same values.

  • Last map, always — the integration asks Zigbee2MQTT for the map on a schedule and keeps the answer, so the panel opens with the latest scan on any device, and a scan that finishes after you close the page is not lost.

  • Scan while viewing — while the panel is open it can re-scan at a second, shorter interval; nothing happens when nobody is looking. Several open panels share one schedule.

  • Entities — the scan intervals, a "Pull routes" switch (the panel's checkbox of the same name; routing tables on every scan, background ones too), a "Scan now" button, a "Last scan" timestamp sensor (with router, end-device and link counts) and three mesh sensors, "Mesh connected at LQI", "Mesh redundant at LQI" and "Mesh routers ignored", belong to a device "Zigbee2MQTT map". The mesh sensors get a value with every scan, so their history is the health of your mesh over time. "Mesh routers ignored" counts the routers that had no two-sided link in the scan, so a router that went dark shows there (the other two are computed over the routers still in the mesh); it reads 0 when all is well, which makes it the one to alert on. Its attributes name them, and not_answering lists the ones that did not answer the scan at all (unreachable or dead) as opposed to answering with a one-sided table. Their attributes name what limits each number (the bottleneck link, the single point of failure, the routers that would be cut off, the routers ignored for having no two-sided link). A history graph of both, for a dashboard:

    type: history-graph
    hours_to_show: 168
    entities:
      - sensor.zigbee2mqtt_map_mesh_connected_at_lqi
      - sensor.zigbee2mqtt_map_mesh_redundant_at_lqi
      - sensor.zigbee2mqtt_map_mesh_routers_ignored
  • Pairing from the map — a "permit join" button opens the network for 254 s with a countdown (click again to close), a router's card offers "permit join here" to join through that router, and a feed next to the scan status follows the newcomer: joined → interviewing → paired. The device appears on the map at once, parked at the edge until the next scan shows its links. Administrators only.

  • Follows Zigbee2MQTT's device list — a rename shows at once, a removed device turns grey with its links until the next scan, no scan needed for either.

  • Device pictures from zigbee2mqtt.io (optional), stale-device rings (not seen for 24 h), one-sided links on request, routes on request, label search, PNG export.

Everything stays local: the integration talks to Zigbee2MQTT over your MQTT broker, the panel talks to the integration over Home Assistant's websocket. The only thing that leaves your network is the optional device pictures.

Requirements

  • Home Assistant 2025.1 or newer with the MQTT integration connected to the broker Zigbee2MQTT uses.
  • Zigbee2MQTT 2.x (tested with 2.14 on an EmberZNet coordinator). Any adapter; the map comes from bridge/request/networkmap.
  • The Marketplace (built into Home Assistant 2026.11 and newer) or, before that, HACS.

Install

  1. Settings → Marketplace, search for Zigbee2MQTT map and Download. Restart Home Assistant when asked. Before Home Assistant 2026.11 the same search is in HACS. This button opens the page in your own Home Assistant:

    Open your Home Assistant instance and open the repository inside the Marketplace.

  2. Add the integration:

    Open your Home Assistant instance and start setting up a new integration.

    or Settings → Devices & services → Add integration → "Zigbee2MQTT map". The dialog shows the Zigbee2MQTT instances found on your broker and pre-fills the base topic; confirm it.

  3. "Zigbee map" appears in the sidebar. Open it, press the ⤓ button (scan now, next to the status text), then set the two intervals in options (2 h background / 10 min while viewing is a sensible start). The devices ▾ list links every device to its Home Assistant device page; for "Z2M" links (the device's page in Zigbee2MQTT, in a drawer over the map), enter the address of the Zigbee2MQTT frontend in the integration's options (Settings → Devices & services → Zigbee2MQTT map → Configure). Home Assistant OS or Supervised: the Zigbee2MQTT app's frontend port, e.g. http://homeassistant:8099, off by default: open the app → Configuration → Network → "Show disabled ports" → 8099 next to the frontend port → Save → restart the app. Core or Container: the address of your Zigbee2MQTT instance's frontend, e.g. http://192.168.1.10:8080. A scan of a 25-router mesh takes about 75 s with Zigbee2MQTT's own sequential scan.

Without the Marketplace: copy custom_components/zigbee2mqtt_map/ from a release into your config/custom_components/ and restart.

The integration finds the base topic through the retained <topic>/bridge/state message Zigbee2MQTT publishes; only an online one counts, stale offline states from old installs are ignored. With several instances, pick one in the dialog. The base topic, the sidebar title and whether the panel is for administrators only can be changed later under Configure on the integration's card.

Update

A new release shows under Settings → Updates, next to Home Assistant's own updates, with the release notes. Install it there, then restart Home Assistant. Browsers pick up the new panel on their own: the module URL carries the file's hash. The Marketplace reads the catalog every 6 hours, so a fresh release can take that long to appear. Before Home Assistant 2026.11: HACS → Zigbee2MQTT map → Update.

Faster scans (optional)

networkmap_fast is a Zigbee2MQTT external extension that scans two routers at a time, puts routers that did not answer last, and reports progress. With it the same 25-router scan takes 16–22 s and the panel shows "n/m routers" while it runs. It lives in the official zigbee2mqtt-user-extensions collection: unstable/networkmap_fast (the file and its README). Load it in Zigbee2MQTT (Settings → Dev console → External extensions, needs advanced.enable_external_js: true); nothing to change on the Home Assistant side, the extension answers the normal map request and the panel shows its progress. Only if you turned the extension's takeover of the normal topic off (replaceBuiltin: false), enable the disabled-by-default switch "Use the networkmap_fast topic" on the Zigbee2MQTT map device. Without the extension the panel works the same, only slower.

Reading the map

  • A link is an entry in a router's neighbour table, not a live route. The tables hold about 16 entries and age in and out, so links come and go between scans; judge a path over several scans.
  • End devices report nothing themselves; their single link is what the parent sees. They are hidden by default.
  • Dashed grey = only one side reported the link (usually stale). Red dashed ring = not seen for more than 24 h.
  • The help menu in the panel explains every control.

Troubleshooting

  • "Zigbee2MQTT: no answer within 10 min" — the base topic is wrong (Configure on the integration's card shows it), Zigbee2MQTT is not connected to the broker Home Assistant uses, or a scan never finishes (a router hanging in table paging: zigbee-herdsman re-asks for the same page until Zigbee2MQTT restarts; networkmap_fast times the router out after 30 s so the scan completes without it).
  • "scan request failed … administrators only" — scans are limited to administrator accounts; the map itself is shown to everyone the panel is visible to.
  • "The MQTT integration is not set up" in the dialog — add the MQTT integration first.
  • Nothing in the sidebar — the panel appears when the integration is set up; check Settings → Devices & services for an error on the card and the Home Assistant log for zigbee2mqtt_map.

Development

  • Tests: pip install pytest-homeassistant-custom-component home-assistant-frontend, then pytest from the repo root.
  • tools/dev_deploy.sh: copies the working copy to a Home Assistant host over SSH (HA_HOST=root@homeassistant) and restarts Core. Do not combine with a Marketplace download of the integration on that host, both write the same folder.
  • tools/release_map.sh 2.1.0: version bump, CHANGELOG section, tests, commit, push, wait for the workflows, GitHub release with the integration zipped as the asset the Marketplace downloads (hacs.json zip_release).
  • tools/render_icon.sh: renders brand/icon.svg to the PNG sizes the Marketplace and Home Assistant use.

Credits

Graph layout by D3.js (ISC licence, shipped unmodified, see THIRD_PARTY.md). Device pictures by zigbee2mqtt.io.

About

Zigbee2MQTT network map as a Home Assistant sidebar panel: pinnable d3 graph, LQI thresholds, scheduled scans

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages