I was looking for a simple solution to display the network map of zigbee2mqtt in hassio without the need of graphviz.
I found the great project viz.js and decided to write a simple custom_component with a service that updates and creates the corresponding files in my www folder.
Important: you have to clear the browsercache after each update
Download or clone https://github.com/rgruebel/ha_zigbee2mqtt_networkmap
Copy “custom_components/zigbee2mqtt_networkmap” and content to your “custom_components” folder.
Add the following to your configuration.yaml. It is possible to update the map directly via button. If you want to use this functionality you also have to activate the webhook component
webhook: zigbee2mqtt_networkmap: panel_iframe: networkmap: title: 'Zigbee Map' url: '/local/community/zigbee2mqtt_networkmap/map.html' icon: 'mdi:graphql'
You can set the graphviz engine via URL Parameter:
map.html?engine=circo (Default: dot, Supported Engines)
Call the service “zigbee2mqtt_networkmap.update”
Test if everything is working
Now you should create an automation which calls the service “zigbee2mqtt_networkmap.update” for example every 10 minutes:
- id: update_networkmap alias: 'Zigbee Map aktualisieren' hide_entity: true trigger: platform: time_pattern minutes: '/10' seconds: 00 action: service: zigbee2mqtt_networkmap.update