Zigbee2mqtt: Visualise ZigBee network

Created on 28 Sep 2018  路  28Comments  路  Source: Koenkk/zigbee2mqtt

Hi everybody,
in order to understand my current Zigbee Network more easily, I would like to use a simple software, that can visualize my network. Which tools are you using?
Thanks in advance
Jens

stale

Most helpful comment

just publish via mqtt

zigbee2mqtt/bridge/networkmap

the value

graphviz

at the same time subscribe to

zigbee2mqtt/bridge/networkmap/graphviz

my next problem is that I do not get all attached devices.

All 28 comments

Does this mean, zigbee2mqtt can output the structure of the Zigbee network as graphviz?
What is the command for it?

just publish via mqtt

zigbee2mqtt/bridge/networkmap

the value

graphviz

at the same time subscribe to

zigbee2mqtt/bridge/networkmap/graphviz

my next problem is that I do not get all attached devices.

I think it'd be easier to read the graphs if the friendly names were used as labels (vs. the numerical code). Does it make sense?

I think it'd be easier to read the graphs if the friendly names were used as labels (vs. the numerical code). Does it make sense?

https://github.com/Koenkk/zigbee2mqtt/commit/845a5cdce89c69dbeb3e1303f7d9496c6e58f295

;)

@kimonm it's already in the dev branch (will be in new zigbee2mqtt release)

Graphviz only shows 11 from 20 devices and the routers are shown as normal devices and not routers.

Hi,
I used this command:

mosquitto_sub -h $MQTT_SRV -C 1 -t zigbee2mqtt/bridge/networkmap/graphviz | sfdp -Tpng > /tmp/map.$(date +%Y%m%d%H%M%S).png

It's created a image file in tmp folder, but nothing in there (0 KB).

just publish via mqtt

zigbee2mqtt/bridge/networkmap

the value

graphviz

at the same time subscribe to

zigbee2mqtt/bridge/networkmap/graphviz

my next problem is that I do not get all attached devices.

tried this, but in logfile i get
zigbee2mqtt:warn 2018-10-5 18:05:50 Cannot handle MQTT message with topic 'zigbee2mqtt/bridge/networkmap' and message 'graphviz

do i need to install anything extra, i am using the latest-dev docker image

@hoangtuit does the command return immediatly ? you don't have to ctrl-c it do you ?
what's the result of mosquitto_sub -h $MQTT_SRV -C 1 -t zigbee2mqtt/bridge/networkmap/graphviz
when you send the graphviz command ?
it should output graphviz text data that you could either use with graphviz commands or
http://www.webgraphviz.com/

@aidbish looks like your not running the latest version (1.0.6 atm) sorry but I'm clueless about docker.

it was the formatting of my publish command that was incorrect
i now can see a scan starting in the logs, but it finishes within 1 second and nothing is shown if i subscribe to the topic

i have tried the following sub commands

mosquitto_sub -h 10.0.0.18 -C 1 -t zigbee2mqtt/bridge/networkmap/graphviz

mosquitto_sub -h 10.0.0.18 -C 1 -t zigbee2mqtt/bridge/networkmap/graphviz | sfdp -Tpng | display -

i have to ctrl-c as they never seem to complete

@lolorc the command don't return. When i run graphviz command

mosquitto_sub -h $MQTT_SRV -C 1 -t zigbee2mqtt/bridge/networkmap/graphviz

Nothing to return. I have 1 coordinator and 10 devices in my network

Are you both using dev with the latest commits ?
if so, a bug has be introduced with the latest network map change (display friendlyname).
You might want to check my PR to see if it fixes it https://github.com/Koenkk/zigbee2mqtt/pull/443
or you can also edit https://github.com/Koenkk/zigbee2mqtt/blob/dev/lib/extension/networkMap.js#L41
and replace

const friendlyName = settings.getDevice(item.ieeeAddr).friendly_name;

by

const friendlyName = settings.getDevice(item.ieeeAddr) ? settings.getDevice(item.ieeeAddr).friendly_name : "";

I did. But nothing happened.

dunno what you did :-) but you might want to join some debug log.

My stupid, It worked. Tks @lolorc

Are you both using dev with the latest commits ?
if so, a bug has be introduced with the latest network map change (display friendlyname).
You might want to check my PR to see if it fixes it #443
or you can also edit https://github.com/Koenkk/zigbee2mqtt/blob/dev/lib/extension/networkMap.js#L41
and replace

const friendlyName = settings.getDevice(item.ieeeAddr).friendly_name;

by

const friendlyName = settings.getDevice(item.ieeeAddr) ? settings.getDevice(item.ieeeAddr).friendly_name : "";

Yes i was using latest dev version, gone back to stable and can now generate network map

@aidbish it should be better with latest dev now

@kaelsaes I also had devices not displayed on the network map, with latest dev they would appear unlinked. I've just repaired my unlinked devices and I can now see them linked on the network map. (the pairing process is kinda picky with cc253x)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

worked great with http://www.webgraphviz.com.

Is there a way to visualize this directly in home assistant. Maybe someone here already did this?

hassio; zigbee2mqtt addon

Hi, I have ZigBee2Mqtt running as a docker container on a RPi that is running the latest DietPie.

If I request the raw map I get an answer with some devices. I do not know if it's correct as I am not aware what are all the devices I have anyway.

If I try the graphviz mode I am not getting any answer. The docker logs are also not showing any reaction to the published topic. After this point there is also no response to a raw request anymore. I must restart the docker container to get raw working again.

I did install graphviz with: sudo apt install graphviz but there is still no response.

Does the docker container has the rights to run the graphviz.

Shall I switch to a normal installation as right now the container doesn't start automatically after a reboot.

Thank you.

Nevermind, I was running the release branch, not the Dev flavour of the docker container. Now it's working and the custom ipanel component in HA too.

Nevermind, I was running the release branch, not the Dev flavour of the docker container. Now it's working and the custom ipanel component in HA too.

HI,Did you also install graphviz as a docker? If so , can you explain how the setup it up to show the zigbee2mqtt network map?

Nevermind, I was running the release branch, not the Dev flavour of the docker container. Now it's working and the custom ipanel component in HA too.

HI,Did you also install graphviz as a docker? If so , can you explain how the setup it up to show the zigbee2mqtt network map?

Try using webgraphviz then you don't have to install anything

Nevermind, I was running the release branch, not the Dev flavour of the docker container. Now it's working and the custom ipanel component in HA too.

HI,Did you also install graphviz as a docker? If so , can you explain how the setup it up to show the zigbee2mqtt network map?

Try using webgraphviz then you don't have to install anything

ok. Then how do you see your own network? what data do you put in that box?

Nevermind, I was running the release branch, not the Dev flavour of the docker container. Now it's working and the custom ipanel component in HA too.

HI,Did you also install graphviz as a docker? If so , can you explain how the setup it up to show the zigbee2mqtt network map?

Try using webgraphviz then you don't have to install anything

ok. Then how do you see your own network? what data do you put in that box?

My suggestion is to read the documentation;
https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html

Sorry, real newbie here.
What exactly should I be looking for in that documentation? Are those mqtt messages for me to publish,, and view in mqtt fx?

Was this page helpful?
0 / 5 - 0 ratings