Zigbee2mqtt: show the networkmap in home assistant

Hi! I am still confused where to copy the files extracted from the zipfile.
Should all folders and files be copied to /config/custom_components/zigbee2mqtt_networkmap included the www folder?

OR

only the 3 files to /config/custom_components/zigbee2mqtt_networkmap and the files and folders in the www folder from zip file to the /config/www ?

Edit: i installed Zigbee2MqttAssistant instead 1 click after add repository url, add username & password then finished :slight_smile:

It is in the first post.

Is it possible to change the line length? Basically spacing - everything is widely spaced and some devices spill beyond the frame. Thanks.

Hi,

  • I have installed ha_zigbee2mqtt_networkmap with HACS.
  • I have modify configuration.yaml with the webhook from tutorial.
  • I have restart HASSIO.
    No errors in log.

But : in development tools services i havenā€™t the new service zigbee2mqtt_networkmap.update (service not found)

Have you an idea ??

Resolved :slight_smile:

How did you resolve this?
-I have installed ha_zigbee2mqtt_networkmap with HACS.
-I have modify configuration.yaml with the webhook from tutorial.
-I have restart HASSIO.
But I donā€™t see zigbee2mqtt_networkmap.update service
and donā€™t see any changes on my UI

Thats helpful!

Hey guys,

Iā€™m having a 404: Not Found when I click on the iframe

this is the config yaml

webhook: 

zigbee2mqtt_networkmap:

panel_iframe:
  networkmap:
    title: 'Zigbee Map'
    url: '/local/zigbee2mqtt_networkmap/map.html'
    icon: 'mdi:graphql'

I run zigbee2mqtt_networkmap.update from services but still nothing

I originally kept the www folder inside the zigbee2mqtt_networkmap custom folder which didnā€™t work.
Then I moved the files inside the www folder to the default config/www folder and still not working

In hassio situation ā€˜localā€™ is ā€˜wwwā€™ folder inside ā€˜configā€™ folder, so the config in this thread assumes your map.html should be located in:
/config/www/zigbee2mqtt_networkmap/map.html

so basically just copy everything from www folder in the zip from github to /config/www/zigbee2mqtt_networkmap/

i canā€™t get it show me the map myself but at least Iā€™m not getting the 404 :slight_smile:

Thank you @highway! Itā€™s now partially working :smiley:

I run the update from services, there are no errors in HA log
but I still get a blank map with just this down the bottom
image

Edit: I donā€™t know if this is related here but itā€™s new to me
ERROR (MainThread) [homeassistant.core] Error doing job: Unclosed connection

Iā€™m using Chrome

Sorry guys, Iā€™ve been really busy the last few months. I just committed some tweaks from codewise-nicolas.Please check if your problems are still present.

I had no problems before but after I installed the update now I get a blank page when opening the map.

HA says this:
image

ā€¦but my config is exactly what the readme file says, even including the comment:

zigbee2mqtt_networkmap:
  #topic: your topic (optional, default zigbee2mqtt)
panel_iframe:
  networkmap:
    title: 'Zigbee Map'
    url: '/local/community/zigbee2mqtt_networkmap/map.html'
    icon: 'mdi:graphql'

I installed it through HACS if that makes any difference.

Edit: Ah, turns out the update script failed because I had already moved a file manually after the addon initially didnā€™t do that by itself:

2020-03-30 18:15:16 ERROR (MainThread) [homeassistant.setup] Error during setup of component zigbee2mqtt_networkmap
Traceback (most recent call last):
File ā€œ/usr/local/lib/python3.7/distutils/dir_util.pyā€, line 70, in mkpath
os.mkdir(head, mode)
FileExistsError: [Errno 17] File exists: ā€˜/config/www/community/zigbee2mqtt_networkmap/viz.jsā€™

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ā€œ/usr/src/homeassistant/homeassistant/setup.pyā€, line 170, in _async_setup_component
hass, processed_config
File ā€œ/config/custom_components/zigbee2mqtt_networkmap/init.pyā€, line 25, in async_setup
copy_tree(fromDirectory, toDirectory)
File ā€œ/usr/local/lib/python3.7/distutils/dir_util.pyā€, line 159, in copy_tree
verbose=verbose, dry_run=dry_run))
File ā€œ/usr/local/lib/python3.7/distutils/dir_util.pyā€, line 135, in copy_tree
mkpath(dst, verbose=verbose)
File ā€œ/usr/local/lib/python3.7/distutils/dir_util.pyā€, line 74, in mkpath
ā€œcould not create ā€˜%sā€™: %sā€ % (head, exc.args[-1]))
distutils.errors.DistutilsFileError: could not create ā€˜/config/www/community/zigbee2mqtt_networkmap/viz.jsā€™: File exists

After removing that file it works again.

Iā€™m sorry, but these installation directions are just terrible. So many steps and details missingā€¦

Iā€™ve FINALLY gotten the iFrame to work and got rid of my 404 error. Now Iā€™m trying to set up the Automation to call the service every 10 minutes. Guess what? The service ā€œzigbee2mqtt_networkmap.updateā€ doesnā€™t appear to exist. What non-existent step did I miss?

1 Like

I take it you are volunteering to document it. Well done.

1 Like

If I could ever get it to work, sureā€¦

Well post a proper request for help then. See How to help us help you - or How to ask a good question

Out of interest, what steps do you think are missing?

The steps on where to extract the files from the zip archive are unclear. Youā€™ll see that several people had the 404 error because of this.

Second, what prerequisites are necessary? When I installed the integration through HACS, made the change to the configuration.yaml file, extracted the zip, and restarted HA I received a notification on startup that mqtt and Zigbee2mqtt were invalid and as I mentioned there was no Zigbee2mqtt service to create an automation for. Am I supposed to install mqtt somehow first?

I apologize if I came off as rude but Iā€™m new to HA and as I dive in Iā€™m finding that a lot of assumptions are made that people know all these things. I understand this is more complicated and involved than say SmartThings, but it is difficult and a little frustrating. Itā€™s kind of a theme across the Linux community in general.

Finally, the code snippets provided for the configuration.yaml wonā€™t work if you simply copy and paste as the indentions are off. At least it threw an error for me until I fixed the spacing.

1 Like

Well quite clearly youā€™ll need zigbee2mqtt before you even begin to show the zigbee2mqtt network map. You cannot see the network map of something you donā€™t have!

And yes zigbee2mqtt needs mqtt.

Perhaps you misunderstood what this custom component does?

Ok, I wanted to give this a try.
TL;DR: in 5 minutes I had this:

HOWTO

This is my system:

arch	x86_64
dev	false
docker	true
hassio	true
os_name	Linux
os_version	5.3.0-28-generic
python_version	3.7.7
version	0.107.6
virtualenv	false

My prerrequisites:

My steps:
1.- Search zigbee2mqtt in the Integrations tab in HACS:

image

2.- Click install (the screenshot shows reinstall because Iā€™m writing this howto after installing it):

image

3.- I added this to my configuration.yaml :

zigbee2mqtt_networkmap:
  topic: zigbee2mqtt
panel_iframe:
  networkmap:
    title: 'Zigbee Map'
    url: '/local/community/zigbee2mqtt_networkmap/map.html'
    icon: 'mdi:graphql'

Itā€™s the same as in the instructions in the add-on but, as @cdef said, the indentations are off.

4.- Restart HA

5.- Go to Developers tools and run the zigbee2mqtt_networkmap.update service:

image

6.- Enjoy the map clicking in the sidebar:

image

Thanks to all the people that make this possible.

See, you mention these things that are ā€œobviousā€ but how is someone new supposed to know what is actually being installed through HACS? I have no idea what zigbee2mqtt or MQTT are until I tried to get this map working to troubleshoot my zigbee mesh.