Open axiom00 opened 5 years ago
This is my network now with the latest dev z2m with map fix (minus a load of unconnected sensor devices that might show up later after the reported/got used)
I actually cam here to raise an enhancement for z2ma to (optionally if you like) hide all the other relationships other than for the selected node. i.e. if no node is selected then the full crazy rats nest is shown. If I select a node then only relationships to/from that node are shown.
WDYT?
I think that's a great idea to make the route more visible. Maybe instead of completely hiding all the other routes, make them super dimmed.
If it can be configurable then even better (e.g. dim %)
@james-fry I'll be happy to accept your Pull Request ;-) The code for the map page is there: https://github.com/yllibed/Zigbee2MqttAssistant/blob/master/Zigbee2MqttAssistant/Views/Home/Map.cshtml
It's already showing links bolder when you select a node. So what you want is to hide others when it's happening?
@axiom00 For the legend, I'm sorry, It's red and with dashes when relationship > 3
. What does that mean? I don't know. I simply reproduced this logic on Z2M. It's something coming directly from ZStack in Herdsman. I think we should ask @Koenkk for this :-) Maybe I'm wrong to represent them in the graph.
@james-fry I'll be happy to accept your Pull Request ;-) The code for the map page is there: https://github.com/yllibed/Zigbee2MqttAssistant/blob/master/Zigbee2MqttAssistant/Views/Home/Map.cshtml
I'd love to contribute, but Im more of a copy/paste hacker than a coder (and never with c#), but maybe I can get there... The problem is development platform. I am using hassio - is it possible to edit code live in the container? Or all needs to be compiled? I think that setting up new IDE etc is a bit more than I can commit to :(
Taken from https://www.nxp.com/docs/en/user-guide/JN-UG-3101.pdf
So could mean anything :) FWIW many of the red (value 3) relationships have LQI 0 in my map. I interpreted these as former working routes, but that cannot currently be used due to lack of LQ.
Also @carldebilly there is limitation in your code that you dont differentate between value 3 and 4 for coloring - both 3 and 4 will be red. Not sure if this is really a problem or not...
BTW I saw the following in my z2ma log. Does not seem to prevent the map being rendered.
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Error processing MQTT message on topic 'zigbee2mqtt_cc1352p/bridge/networkmap/graphviz'
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: d. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 125
at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 405
at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 341
I have the same question marks and would appreciate map legend integrated at the bottom of the map.
This is what I just found out: Red dashed line means: Relationship is not active, skip it https://github.com/Koenkk/zigbee2mqtt/blob/287f843bbbc5265fcd8382edd772176b5cfd9a97/lib/extension/networkMap.js#L168
Green line means link is going out from coordinator to an router for example. https://github.com/yllibed/Zigbee2MqttAssistant/blob/master/Zigbee2MqttAssistant/Views/Home/Map.cshtml#L106
Until a legend is added to the map, I think it would be useful to add this brief explanation in the project readme.
More of a question then an issue.
What is the significance of blue lines vs red lines in the network map and what does dash vs solid lines mean?
Lastly, any thoughts on why router 1,3, and 4 have a red/dash line going back to the coordinator and not router 2?