Zigbee2mqtt: Lovelace custom card to show zigbee2mqtt network map

Please try v0.3.0, all dead links are filtered, there should be no more Error: missing: 0x.... error.

1 Like

Zigbee2mqtt v1.5.1 should be fine.

As I said, it does have problem in Firefox, please try Google Chrome first to make sure configs are correct.

In your case, configs should be:

sensor:
  - platform: mqtt
    name: Zigbee2mqtt Networkmap
    state_topic: home/zigbee2mqtt/bridge/networkmap/raw
    value_template: >-
      {{ now().strftime('%Y-%m-%d %H:%M:%S') }}
    json_attributes_topic: home/zigbee2mqtt/bridge/networkmap/raw
views:
  - title: Zigbee Network
    panel: yes
    cards:
      - type: custom:zigbee2mqtt-networkmap
        entity: sensor.zigbee2mqtt_networkmap
        mqtt_base_topic: home/zigbee2mqtt

Filtering seems to do the job, very nice!

This is a really nice feature :slight_smile: Thanks for making and sharing this!

New release.

[0.5.0] - 2019-08-27

  • Recalculate width/height on window resize
  • Make the arrows sharper
  • Use css variables to allow theming
  • Allow config extra css styles
1 Like

Looks great, great job!

ps. I referenced this tread from here: https://community.home-assistant.io/t/zigbee2mqtt-show-the-networkmap-in-home-assistant

Why are there devices not connected to anything
should there not be a route?

Really nice stuff!!! :+1:

I would like to know, if there a way to put some text onto the same tab?

My sensors have generic names like XiaomiAqara-1, because with this, it’s easier to move them around and just give them a new name in the cards instead of changing that in several configuration files. Therefore the option to have some text fields beside the map would be great - within the map card itself or the option to have i.e. a markdown card beside the map. All I got to run is disable panel mode and add a card below the map. (I assume, the last would be something to ask in the lovelace area?)

The information is given by Zigbee2mqtt, It seems it’s not always correct. Here is another example:

Good news by Koenkk:

I will investigate this further as I need to refactor the networkmap code anyway (due to zigbee-herdsman refactor).

I’m not fully understand your question, is this what you want?

Argh. Sometimes it’s so easy…
Yes, that works.

I really like this custom card component, but somehow it does not work for me. The sensor state is unknown and I cannot figure out the reason.
Could you please help me?
Networkmap version: 0.5.0
HA version: 0.100.2
Host system : ubuntu 18.04.3
I followed the instructions here: https://github.com/azuwis/zigbee2mqtt-networkmap/
Side note: The Network Map custom component works perfectly, I have problems with the custom card only. Can I use both in the same time?

What is your Zigbee2mqtt version?

Anything interesting in <config-directory>/home-assistant.log?

Please create an issue here https://github.com/azuwis/zigbee2mqtt-networkmap/issues and fill the issue template. I can not help with current information, my best guest is old Zigbee2mqtt version.

Thanks for your reply azuwis.
I use version 1.6 from zigbee2mqtt and there is absolutely nothing about zigbee2mqtt-networkmap on the log out of this: DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to zigbee2mqtt/bridge/networkmap/raw
I have created an issue as you suggested: https://github.com/azuwis/zigbee2mqtt-networkmap/issues/10

I have responded on the issue, but you haven’t added the resources section.

hello guys i used the config mentioned here :slight_smile:

sensores are creted but the map don’t show on the card, just a blanc card.

Did you install via hacs?

hello Yes? i did

Does the entity sensor.zigbee2mqtt_networkmap appear on the states tab in developer tools? If so, what are its state and attributes?

yes

sensor.zigbee2mqtt_networkmap	2020-06-15 21:55:52	nodes: 
- ieeeAddr: '0x00124b0014d9e483'
  friendlyName: Coordinator
  type: Coordinator
  networkAddress: 0
  failed: []
  lastSeen: null
- ieeeAddr: '0x7cb03eaa00acee41'
  friendlyName: osram_casa
  type: Router
  networkAddress: 2588
  manufacturerName: OSRAM
  modelID: Plug 01
  failed: []
  lastSeen: 1592253635769
- ieeeAddr: '0x00158d000289ebaa'
  friendlyName: front_door
  type: EndDevice
  networkAddress: 18522
  manufacturerName: LUMI
  modelID: lumi.sensor_magnet
  lastSeen: 1592253640391
- ieeeAddr: '0x00158d0002c98bfe'
  friendlyName: Room_Ruven_temp
  type: EndDevice
  networkAddress: 47121
  manufacturerName: LUMI
  modelID: lumi.sens
  lastSeen: 1592253678555
- ieeeAddr: '0x00158d0002c9c78d'
  friendlyName: Hatic
  type: EndDevice
  networkAddress: 49658
  manufacturerName: LUMI
  modelID: lumi.sens
  lastSeen: 1592252451781
- ieeeAddr: '0x00158d0002c98bba'
  friendlyName: Temp_SantI
  type: EndDevice
  networkAddress: 36949
  manufacturerName: LUMI
  modelID: lumi.sens
  lastSeen: 1592253794701
- ieeeAddr: '0x00158d0002c98b70'
  friendlyName: Temp_main
  type: EndDevice
  networkAddress: 58149
  manufacturerName: LUMI
  modelID: lumi.sens
  lastSeen: 1592252367882
- ieeeAddr: '0x00158d000289eb0b'
  friendlyName: kitchen_door
  type: EndDevice
  networkAddress: 7583
  manufacturerName: LUMI
  modelID: lumi.sensor_magnet
  lastSeen: 1592254131894
- ieeeAddr: '0x00158d000289e856'
  friendlyName: Cinema_door
  type: EndDevice
  networkAddress: 8240
  manufacturerName: LUMI
  modelID: lumi.sensor_magnet
  lastSeen: 1592252467285
- ieeeAddr: '0x00158d00020f13a2'
  friendlyName: closet_sensor
  type: EndDevice
  networkAddress: 51634
  manufacturerName: LUMI
  modelID: lumi.sens
  lastSeen: 1592254173952
- ieeeAddr: '0x00158d0001f3e7eb'
  friendlyName: office_door
  type: EndDevice
  networkAddress: 33261
  manufacturerName: LUMI
  modelID: lumi.sensor_magnet
  lastSeen: 1592253889461
- ieeeAddr: '0x00158d000289eddb'
  friendlyName: Workshop_door
  type: EndDevice
  networkAddress: 58825
  manufacturerName: LUMI
  modelID: lumi.sensor_magnet
  lastSeen: 1592252186610
- ieeeAddr: '0x7cb03eaa0a016f35'
  friendlyName: screen
  type: Router
  networkAddress: 14775
  manufacturerName: OSRAM
  modelID: Plug 01
  failed: []
  lastSeen: 1592251986552
- ieeeAddr: '0x84182600000ed912'
  friendlyName: osram_escri
  type: Router
  networkAddress: 37099
  manufacturerName: OSRAM
  modelID: Plug 01
  failed: []
  lastSeen: 1592253502834

links: 
- source:
    ieeeAddr: '0x00158d0002c98bfe'
    networkAddress: 47121
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 69
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00158d0002c98bfe'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 47121
  lqi: 69
  relationship: 1
- source:
    ieeeAddr: '0x7cb03eaa00acee41'
    networkAddress: 2588
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 49
  depth: 1
  routes: []
  sourceIeeeAddr: '0x7cb03eaa00acee41'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 2588
  lqi: 49
  relationship: 1
- source:
    ieeeAddr: '0xffffffffffffffff'
    networkAddress: 52720
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 0
  depth: 1
  routes: []
  sourceIeeeAddr: '0xffffffffffffffff'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 52720
  lqi: 0
  relationship: 1
- source:
    ieeeAddr: '0x00158d000289eb0b'
    networkAddress: 7583
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 45
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00158d000289eb0b'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 7583
  lqi: 45
  relationship: 1
- source:
    ieeeAddr: '0x00158d0002c9c78d'
    networkAddress: 49658
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 170
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00158d0002c9c78d'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 49658
  lqi: 170
  relationship: 1
- source:
    ieeeAddr: '0x00158d0002c98bba'
    networkAddress: 36949
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 23
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00158d0002c98bba'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 36949
  lqi: 23
  relationship: 1
- source:
    ieeeAddr: '0x00158d000289ebaa'
    networkAddress: 18522
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 23
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00158d000289ebaa'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 18522
  lqi: 23
  relationship: 1
- source:
    ieeeAddr: '0x7cb03eaa0a016f35'
    networkAddress: 14775
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 0
  depth: 1
  routes: []
  sourceIeeeAddr: '0x7cb03eaa0a016f35'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 14775
  lqi: 0
  relationship: 1
- source:
    ieeeAddr: '0x00158d0002c98b70'
    networkAddress: 58149
  target:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  linkquality: 24
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00158d0002c98b70'
  targetIeeeAddr: '0x00124b0014d9e483'
  sourceNwkAddr: 58149
  lqi: 24
  relationship: 1
- source:
    ieeeAddr: '0x00124b0014d9e483'
    networkAddress: 0
  target:
    ieeeAddr: '0x7cb03eaa00acee41'
    networkAddress: 2588
  linkquality: 60
  depth: 1
  routes: []
  sourceIeeeAddr: '0x00124b0014d9e483'
  targetIeeeAddr: '0x7cb03eaa00acee41'
  sourceNwkAddr: 0
  lqi: 60
  relationship: 2
- source:
    ieeeAddr: '0x7cb03eaa0a016f35'
    networkAddress: 14775
  target:
    ieeeAddr: '0x7cb03eaa00acee41'
    networkAddress: 2588
  linkquality: 10
  depth: 1
  routes: []
  sourceIeeeAddr: '0x7cb03eaa0a016f35'
  targetIeeeAddr: '0x7cb03eaa00acee41'
  sourceNwkAddr: 14775
  lqi: 10
  relationship: 2
- source:
    ieeeAddr: '0x84182600000ed912'
    networkAddress: 37099
  target:
    ieeeAddr: '0x7cb03eaa00acee41'
    networkAddress: 2588
  linkquality: 32
  depth: 1
  routes: []
  sourceIeeeAddr: '0x84182600000ed912'
  targetIeeeAddr: '0x7cb03eaa00acee41'
  sourceNwkAddr: 37099
  lqi: 32
  relationship: 2
- source:
    ieeeAddr: '0x84182600000ed912'
    networkAddress: 37099
  target:
    ieeeAddr: '0x7cb03eaa0a016f35'
    networkAddress: 14775
  linkquality: 28
  depth: 3
  routes: []
  sourceIeeeAddr: '0x84182600000ed912'
  targetIeeeAddr: '0x7cb03eaa0a016f35'
  sourceNwkAddr: 37099
  lqi: 28
  relationship: 2
- source:
    ieeeAddr: '0x7cb03eaa00acee41'
    networkAddress: 2588
  target:
    ieeeAddr: '0x84182600000ed912'
    networkAddress: 37099
  linkquality: 36
  depth: 2
  routes: []
  sourceIeeeAddr: '0x7cb03eaa00acee41'
  targetIeeeAddr: '0x84182600000ed912'
  sourceNwkAddr: 2588
  lqi: 36
  relationship: 2
- source:
    ieeeAddr: '0x7cb03eaa0a016f35'
    networkAddress: 14775
  target:
    ieeeAddr: '0x84182600000ed912'
    networkAddress: 37099
  linkquality: 30
  depth: 2
  routes: []
  sourceIeeeAddr: '0x7cb03eaa0a016f35'
  targetIeeeAddr: '0x84182600000ed912'
  sourceNwkAddr: 14775
  lqi: 30
  relationship: 2
- source:
    ieeeAddr: '0x00158d0003cffdb6'
    networkAddress: 31953
  target:
    ieeeAddr: '0x84182600000ed912'
    networkAddress: 37099
  linkquality: 94
  depth: 2
  routes: []
  sourceIeeeAddr: '0x00158d0003cffdb6'
  targetIeeeAddr: '0x84182600000ed912'
  sourceNwkAddr: 31953
  lqi: 94
  relationship: 1
- source:
    ieeeAddr: '0x00158d000289e856'
    networkAddress: 8240
  target:
    ieeeAddr: '0x84182600000ed912'
    networkAddress: 37099
  linkquality: 28
  depth: 2
  routes: []
  sourceIeeeAddr: '0x00158d000289e856'
  targetIeeeAddr: '0x84182600000ed912'
  sourceNwkAddr: 8240
  lqi: 28
  relationship: 1

friendly_name: Zigbee2mqtt Networkmap

here you have

OK just set mine up from scratch. I have following tips:

Have you pressed “refresh” - mine didn’t show anything until I did.

Try another these. I had a dark one and it was very hard to see the graph. Try default theme.