Zigbee2mqtt: show the networkmap in home assistant

You can adjust them by modifing line 14 in maps.html if you like to have another engine.

viz.renderSVGElement(graph, {'engine':'circo'})

I forgot to include “zigbee2mqtt_networkmap:” in configuration.yaml to have it load the component.

1 Like

:man_facepalming:
same here…
thanks for the hint

1 Like

@lubeda Where do these lines go? My scaling is crazy even when I tried the circo engine.

@Robin
FYI. You might want to remove hassio from the topic. There is nothing specific about this that says its only for hassio. It works on any installation.

1 Like

Thanks very much.
This is component working as expected. I just wish I could say the same about my Zigbee network.

Probably better to start another thread :slight_smile: (and add a link to it here so we can follow along!)

1 Like

Just replace:
document.body.appendChild(element);
with
svg=document.body.appendChild(element); svg.style.width = “100%”;

I have added two new features:

  1. Engine can be set via the url parameter:
    For example: ?engine=circo Default: dot
  2. It is now possible to pan and zoom (i use panzoom) with mouse or keyboard

You just have to copy the new map.html and the panzoom folder into your directory. No restart necessary…
Probably you have to clear the browser cache

8 Likes

I guys, i’m on a docker (hassio), i’m a newbie, where is www folder?
flag zigbee map get me 404 not found error :frowning:

The WWW folder should be inside “/config/” and may not exist unless you’ve used it before, in which case you’ll have to make it yourself.

The directory tree should look something like this.

2 Likes

What a good day, I found my zigbee2mqtt snifffer devices which had hidden themselves in the study, set up zigbee2mqtt and now this network map. Thanks!!

Silicon_Avatar thank you so much!

@Robin awesome custom component. Works great, thanks!

@leinich Great idee to use Lovelace. I used an iframe instead of the weblink.

  - type: vertical-stack
    cards:
      - type: entities
        entities:
          - input_boolean.zigbee_permit_join
          - timer.zigbee_permit_join
          - sensor.bridge_status
          - entity: script.1546982522740
            name: Zigbee map update
            icon: 'mdi:graphql'
        show_header_toggle: false
        title: Zigbee
      - type: iframe
        url: https://[MYSITE]/local/zigbee2mqtt_networkmap/map.html?engine=circo
        aspect_ratio: 75%
1 Like

Strange thing here, Not always but most of the time my map looks like this:


Any idea? Only thing I might be off standard a bit… I have groups active. (the new feature to get the lights behave at the same time when they belong to one light source)
Group 1: Schlafen1-3 = Schlafzimmer
Group 2: Wohnen1-4 = Wohnzimmer
Group 3: Kino1-2 = Heimkino
Group 4: Schrank + Kommode = Schränke

The other times it works:

That’s probably caused by a bug in zigbee2mqtt not the this mod. I’ve seen mine do that too.

I think so, too. I would compare a broken and working Response in the zigbee2mqtt log. Maybe it’s just a small bug.

Same here; this network map add-on is a great thing and compliments to @Robin for the development. But the network map information from zigbee2mqtt (at least in my case) is not correct aka my network map is not correct (~10 devices without connections).
But Koenk has mentioned several times that the network map generation from zigbee2mqtt can have faults and that it needs further development (but that it is low on his priorities list). Hopefully the development of this add-on stimulates this.

1 Like

So after installing, I have a card for zigbee2mqtt networkmap last updated, and I have the iframe, but I have no script named zigbee2mqtt_networkmap.update that I am able to execute.
43%20AM

This is the first custom component that I’ve loaded, so not sure if I’m missing something here. Running HA in docker on ubuntu.