zigbee map - devices work but don't show as connected
My zigbee map (zigbee component) already worked perfectly. Devices always showed the connection.
I recently decided to make my network more secure and add a network key. As you know this means re-pairing all the devices. So I also updated the firmware of my coordinator and of my routers.
I'm using the edge addon right now, but 5 of my 14 devices don't show a connection in the map. But all of them work. It's not an issue of the map component, because the info about the connection isn't present at the code either.
This is a device that doesn't show it's connection: "0xID1" [style="rounded, dashed", label="{Zigbee Button|EndDevice|Xiaomi Aqara wireless switch (WXKG11LM)|online}"];
This is one that shoes the linkqualitiy (50): "0xID2" [style="rounded, dashed", label="{Zigbee Fenster SZ|EndDevice|Xiaomi Aqara door & window contact sensor (MCCGQ11LM)|online}"]; "0xID2" -> "0xID_COORD" [label="50"]
So the second line is missing. Do I have to delte or reset something in the database or state.json to make this work again.
The devices are all at the same place as before. My routers are connected to the coord.
The connection is probably not shown because during the network scan the device was sleeping. If you wakeup the device while scanning, is it shown?
I will test this. The thing is I have an automation to scan the network every 15 minutes (for zigbee map). Those devices stayed disconnected since I opened this issue. I waked them up in the meantime.
I'm seeing the same thing. Half of devices show up (routers and end devices), the other half (sensors - end devices) are hanging in the air, although they do work.
I tried waking up the device during network scan, but it still doesn't show as connected.
I mentioned it before, but I want to point out that it worked for me before, it must be one of those things
- new firmware (the last I had was from oct 2018)
- networkkey
- re-pairing
Those are the things so changed.
So it might not be the same thing as my case...
In my case, I still use the same firmware on the router and configuration wasn't changed. There was also no repairing of devices, but I did add a few devices in that time.
The only thing that changed was zigbee2mqtt upgrade from 1.0.1(I think this was the last working version, not 100%) to 1.1.1.
Forgot to add this to the list, I also updated the zigbee2mqtt addon. So maybe thatβs the reason?
Did it also work for you before updating?
Edit: I missed the last line in your post. It also worked for you. I think we have the same issue.
It did work before, but I'm not sure which version I had...
When I get back home, I'll check if I can load an older docker image with older zigbee2mqtt just to check if network map works there.
Network map asks the coordinator and each router to report their neighbor table which already keep the lqi of each adjacent device. @Koenkk I don't think waking up end devices matters - routers can report their neighbor table including child end devices without the end device being awake.
Is anyone having this missing links issue able to do a network capture? Here is fragment of wireshark capture when I request a network map. Look for 'Link Quality Response' packets with some number of entries (Table Count) in the table.
Note that my setup is standard - v1.1.1 with firmware 20180815, channel 11 and default extended PAN. No Xiaomi routers though.
Frame 1571: 176 bytes on wire (1408 bits), 176 bytes captured (1408 bits) on interface 0
Internet Protocol Version 4, Src: 192.168.1.3, Dst: 192.168.1.3
User Datagram Protocol, Src Port: 17754, Dst Port: 17754
ZigBee Encapsulation Protocol, Channel: 11, Length: 116
IEEE 802.15.4 Data, Dst: 0x680d, Src: 0xfdc4
ZigBee Network Layer Data, Dst: 0x0000, Src: 0xfdc4
ZigBee Application Support Layer Data, Dst Endpt: 0, Src Endpt: 0
ZigBee Device Profile, Link Quality Response, Status: Success
Sequence Number: 241
Status: Success (0)
Table Size: 6
Index: 0
Table Count: 3
Neighbor Table
Table Entry
Table Entry
Table Entry
Extended Pan: dd:dd:dd:dd:dd:dd:dd:dd (dd:dd:dd:dd:dd:dd:dd:dd)
Extended Address: PhilipsL_01:03:56:4b:e9 (00:17:88:01:03:56:4b:e9)
Addr: 0x8441
.... ..01 = Type: Router (1)
.... 01.. = Idle Rx: True (1)
.011 .... = Relationship: None (3)
.... ..10 = Permit Joining: Unknown (2)
Depth: 15
LQI: 254
I can try when I get home...
I've had the issue of unlinked nodes in the network map for some time now.. All items are listed, but the link between node + coordinator isn't there for maybe 30-40% of nodes. Mine started around the same time that the network map started showing friendly names and the border on the nodes became rounded (months ago) - but displayed the links before that. I did a search of issues and saw a post from @Koenkk saying that network map was a little buggy but wasn't a high priority. I figured that at least the nodes are shown, so I could live with it (my network is fairly small).. No change for me since 1.1.1 update (hassio) - still seeing the majority of them linked but some of them showing as isolated and with no link quality on the graph.
For me it looks like the "raw" map includes the linkquality values of alle devices. Could someone prrof that? graphviz doesn't (5 of 14 not linked)
@h4nc how many links are you getting for the "raw" map? If most of your devices are routers you would expect to see close to n*(n-1) links. See https://en.wikipedia.org/wiki/Complete_graph bearing in mind that zigbee router links are bi-directional.
@clockbrain I get 14 links and currently I have 14 devices.
@h4nc that suggests to me that the problem is with the lqi scan in zigbee-shepherd or the devices themselves rather than the graphviz code in zigbee4mqtt. Can you see anything in a debug log?
Can't see something suspicious in the debug los either.
Turn on full zigbee-shepherd debugging as per https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_debug.html
You should see entries like this (slightly redacted to hide serialport messages):
ESC[34m zigbee2mqtt:debugESC[39m 2019-2-3 16:05:52 Received MQTT message on 'zigbee2mqtt/bridge/networkmap' with data 'raw'
ESC[32m zigbee2mqtt:infoESC[39m 2019-2-3 16:05:52 Starting network scan...
2019-02-03T06:05:52.956Z zigbee-shepherd:request REQ --> ZDO:mgmtLqiReq
Sun, 03 Feb 2019 06:05:52 GMT cc-znp:SREQ --> ZDO:mgmtLqiReq, { dstaddr: 0, scanchannels: undefined, scanduration: undefined, startindex: 0 }
Sun, 03 Feb 2019 06:05:52 GMT cc-znp { sof: 254,
len: 1,
type: 'SRSP',
subsys: 'ZDO',
cmd: 'mgmtLqiReq',
payload: { status: 0 },
fcs: 85,
csum: 85 }
Sun, 03 Feb 2019 06:05:52 GMT cc-znp:SRSP <-- ZDO:mgmtLqiReq, { status: 0 }
Sun, 03 Feb 2019 06:05:52 GMT cc-znp { sof: 254,
len: 72,
type: 'AREQ',
subsys: 'ZDO',
cmd: 'mgmtLqiRsp',
payload:
{ srcaddr: 0,
status: 0,
neighbortableentries: 9,
startindex: 0,
neighborlqilistcount: 3,
neighborlqilist: [ [Object], [Object], [Object] ] },
fcs: 93,
csum: 93 }
Sun, 03 Feb 2019 06:05:52 GMT cc-znp:AREQ <-- ZDO:mgmtLqiRsp, { srcaddr: 0, status: 0, neighbortableentries: 9, startindex: 0, neighborlqilistcount: 3, neighborlqilist: [ { extPandId: '0xdddddddddddddddd', extAddr: '0x00137a0000040a80', nwkAddr: 48202, deviceType: 1, rxOnWhenIdle: 1, relationship: 1, permitJoin: 2, depth: 1, lqi: 10 }, { extPandId: '0xdddddddddddddddd', extAddr: '0x00158d0002c3afb8', nwkAddr: 30413, deviceType: 2, rxOnWhenIdle: 0, relationship: 1, permitJoin: 2, depth: 1, lqi: 27 }, { extPandId: '0xdddddddddddddddd', extAddr: '0x00158d0002c3afdf', nwkAddr: 27767, deviceType: 2, rxOnWhenIdle: 0, relationship: 1, permitJoin: 2, depth: 1, lqi: 58 } ] }
2019-02-03T06:05:52.997Z zigbee-shepherd:msgHdlr IND <-- ZDO:mgmtLqiRsp
When zigbee2mqtt receives the MQTT raw request it starts a network scan which will consist of multiple lqi requests (ZDO:mgmtLqiReq) and lqi responses (ZDO:mgmtLqiRsp). Should be one of these request/response pairs for each router. Within the response - look to see that neighborlqilistcount is non-zero and neighborlqilist has some data.
I turned on the debug mode like showed in the link. But still I didnβt see those long messages cc-znp
DEBUG=* npm start 2>&1 | tee debuglog.txt
when I search for neighborlqilistcount in my dubug log (after publishing raw to the right topic) I don't even get one hit.
Ok, can you try increasing the timeout at this line https://github.com/Koenkk/zigbee-shepherd/blob/bff587393e59c351ba15927b2233dbe247a510b7/lib/shepherd.js#L469 to something like 5000 and see what that does.
Just edit the file in node_modules/zigbee-shepherd/lib/shepherd.js , make the change to timeout, and run.
I suspect the current 1 second timeout it too short meaning it only has time to find direct coordinator links and not those from routers. This could be especially significant if you have a busy network or are running nodered admin panel.