-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colors for network map #1666
colors for network map #1666
Conversation
added default color options for network map
- add timestamp node to indicate when the map was created - colorize nodes by device type - colorize edges by activity
make travis happy
Let's fix the textRoute part first, what errors/crashes do you see? (logs please). |
I'd love to help with something meaningful but logs did not show a lot of useful info (at least to me). Not even in debug mode. In order to find the causing line I had to test manually by commenting out lines and without the textRoute line it worked right away. Those are the last lines right before zigbee2mqtt restarted itself and created a new log file (of course without resuming the network scan): https://pastebin.com/7vT0EjrN Checking further it is not lib/zigbee.js and the networkScan method that caused the crash but rather the call to Those errors with rtg scans are always with both my OSRAM Smart+ plugs (...e447 and ...cdf9). |
* Initial inclusion of routes on map * Forgot to include zigbee.js * Hex string for route address * Rebaseline to dev * Cleaner merging of scan arrays * style fixes
If you start z2m manually with npm start then you may see additional error messages from a crash that don't show in the log files. I've just tried a blend of your code and the text routes bit and this works fine here:
Note that the order of line arrow changed to parent->device so the routes make sense. Also, I don't think you need the timestamp node as the last_seen timestamp on the coordinator (now) shows when the map was created. Good work though - colored map looks good. |
I don't know why but now it worked with those blended lines of code. |
I've refactored the code a little bit, @andreasbrett can you verify it is still working? Then it's ready to merge. |
Can confirm it's still working nicely. |
Thanks! |
* Update settings.js added default color options for network map * Update networkMap.js - add timestamp node to indicate when the map was created - colorize nodes by device type - colorize edges by activity * Update networkMap.js make travis happy * Update networkMap.js * Update networkMap.js * Update settings.js * Refactor * Move to graphviz.
I added some colors to the nodes and edges to make the map even clearer. I also added a node containing the creation timestamp. Not sure if this is okay with you but I thought it would be good to know what point in time the map pictures.
Colors can be re-defined in
configuration.yaml
.NOTE: I removed the
textRoutes
labels from a previous commit by @clockbrain as they were somehow crashing my zigbee2mqtt instance. I haven't had the time to investigate why this happened.