zha-ng / zha-map

Build ZHA network topology map.
MIT License
57 stars 17 forks source link

zha-map only finds my coordinator, but no neighbours #42

Closed ezcGman closed 3 years ago

ezcGman commented 3 years ago

Hey there,

I was looking to use this component to get an idea how my Zigbee network looks like. Especially, because I have two sensors that are barely responding, so I wanted to see their path. Plus, I want to install a "mains device", so a non-battery powered Zigbee device to get the signal repeated. And I wanted to then check that the Mesh network updates as I want it to, so the two sensors are not out of reach anymore.

However, when running the scan, it only finds my coordinator, but not a single Zigbee device / neighbour. I also don't see any logs, not even after manually executing the "zha_map.scan_now" service. The file under /config/neighbours/neighbours_00212effff05c2b1.txt still looks like this:

{
    "ieee": "00:21:2e:ff:ff:05:c2:b1",
    "nwk": "0x0000",
    "lqi": null,
    "device_type": "Coordinator",
    "manufacturer": "dresden elektronik",
    "model": "RaspBee II",
    "offline": false,
    "neighbours": []
}

It's also the only file in this folder.

Am I doing something wrong? Am I missing something?

Some environment infos:

Hope somebody has an idea, thanks! Greetings,

Andy!

Adminiuga commented 3 years ago

To see the debug, enable debug logging for zigpy and custom_clomponents.zha_map

ezcGman commented 3 years ago

So it seems it finds a lot of devices, but all listed as with "0 neighbours" and not saving them to a file:

2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map] Building topology
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:21:2e:ff:ff:05:c2:b1]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map] Saving /config/neighbours/neighbours_00212effff05c2b1.txt
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:04:85:59:e9]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:04:85:cc:80]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:04:91:0a:83]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:04:88:dc:50]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:03:9c:83:1a]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:03:9c:6f:22]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:03:9c:83:b6]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:04:23:2f:98]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:04:4d:50:4d]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:02:a6:23:f5]: Done scanning. Total 0 neighbours
2020-11-02 08:12:59 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:15:8d:00:02:a6:1f:5a]: Done scanning. Total 0 neighbours

The count also matches up: I do have 12 Zigbee devices, incl the coordinator

ezcGman commented 3 years ago

Any idea on this? :(

ezcGman commented 3 years ago

Some additions to this: I have recently bought one of the IKEA power outlets, that also work as a repeater, as they are a mains powered device. The IKEA power outlet and the coordinator now both have one child, which is the other device respectively. Plus: I then went ahead and re-paired two of my Xiaomi Door/Window sensors with the IKEA power outlet (instead of directly with my coordinator, because the Xiaomi thingies are known to not actively choose the nearest coordinator/repeater but stick to their originally paired one. And these also show up now, but nothing that is "directly connected" to the coordinator!? Is that maybe a known issue with the RaspBee II / deCONZ? Or a setting that needs to be activated to see / show the neighbors?

The IKEA power outlet:

{
    "ieee": "00:0d:6f:ff:fe:f5:0e:c5",
    "nwk": "0x7385",
    "lqi": null,
    "device_type": "Router",
    "manufacturer": "IKEA of Sweden",
    "model": "TRADFRI control outlet",
    "offline": false,
    "neighbours": [
        {
            "ieee": "00:15:8d:00:02:a6:1f:5a",
            "nwk": "0xbbf4",
            "lqi": 136,
            "pan_id": "00:21:2e:ff:ff:05:c2:b1",
            "device_type": "EndDevice",
            "rx_on_when_idle": "Off",
            "relation": "Child",
            "new_joins_accepted": "NotAccepting",
            "depth": 2,
            "model": "lumi.sensor_magnet",
            "manufacturer": "LUMI",
            "offline": false,
            "supported": true
        },
        {
            "ieee": "00:21:2e:ff:ff:05:c2:b1",
            "nwk": "0x0000",
            "lqi": 89,
            "pan_id": "00:21:2e:ff:ff:05:c2:b1",
            "device_type": "Coordinator",
            "rx_on_when_idle": "On",
            "relation": "Parent",
            "new_joins_accepted": "Unknown",
            "depth": 0,
            "model": "RaspBee II",
            "manufacturer": "dresden elektronik",
            "offline": false,
            "supported": true
        },
        {
            "ieee": "00:15:8d:00:02:a6:23:f5",
            "nwk": "0xc8ad",
            "lqi": 117,
            "pan_id": "00:21:2e:ff:ff:05:c2:b1",
            "device_type": "EndDevice",
            "rx_on_when_idle": "Off",
            "relation": "Child",
            "new_joins_accepted": "NotAccepting",
            "depth": 2,
            "model": "lumi.sensor_magnet",
            "manufacturer": "LUMI",
            "offline": false,
            "supported": true
        }
    ]
}

And the RaspBee II:

{
    "ieee": "00:21:2e:ff:ff:05:c2:b1",
    "nwk": "0x0000",
    "lqi": null,
    "device_type": "Coordinator",
    "manufacturer": "dresden elektronik",
    "model": "RaspBee II",
    "offline": false,
    "neighbours": [
        {
            "ieee": "00:0d:6f:ff:fe:f5:0e:c5",
            "nwk": "0x7385",
            "lqi": 120,
            "pan_id": "00:21:2e:ff:ff:05:c2:b1",
            "device_type": "Router",
            "rx_on_when_idle": "On",
            "relation": "Sibling",
            "new_joins_accepted": "NotAccepting",
            "depth": 1,
            "model": "TRADFRI control outlet",
            "manufacturer": "IKEA of Sweden",
            "offline": false,
            "supported": true
        }
    ]
}

I also tried debugging a little bit, like logging the device and neighbor objects in the build() method, but they obviously also don't show any neighbors for the RaspBee II....

MattWestb commented 3 years ago

I have experience then was testing bellows and only adding end devices ZHA-MAP was not finding the devices IEEE but nothing more and the devices was floating around without any connection in the GUI. After adding one router devices all IEEE was reported OK and getting LIQ and the GUI was working.

And some but not all Xiaomi sensor dont link joining thru IKEA ZB3 devices but is working OK if they changing to them. And Rasb/CornBee have good antennas so device like to connecting to it. I have no experience of running RaspBee im ZHA only in deCONZ.

ezcGman commented 3 years ago

Not quite sure what you're trying to tell me :) > devices was floating around without any connection in the GUI. After adding one router devices all IEEE was reported OK and getting LIQ and the GUI was working. Ok, that sounds right: If you don't have a router, to what would the devices connect to in the map!? I have the other way around: I see my two routers/coordinators but only one of them reports neighbors, as you can see above. The RaspBee II has 8 or so more devices connected to it, but they don't show up.

MattWestb commented 3 years ago

I dont have using my RasBee I with ZHA only in deCONZ. My experience is first with IT CC-2531 adding only 4 xiaomi sensors and was getting devices in the map but no connections lines between them and no LQI from them in the negbaur tables . Then adding 2 HOMA ("Chinese ZB3" dimmers) and the network map was starting reporting LQI and connections between all devices also from the coordinator to end devices. With EZSP i always have added ZB3 routers first for getting one working mesh and then adding end device thru the router that is near / god looking in the map and its working great.

Perhaps its some strange things with RaaspBee II that is making it not reporting the neburs OK.

PietroCattide commented 3 years ago

Same here.... Conbee2, several Xiaomi sensors, several Tradfri routers. The map is only showing a few connections between the devices. Most of them are without any connection in the map. Although they are working fine in HA. Anything I can do?

MattWestb commented 3 years ago

In Z2M is having problems with Rasp/CornBee is not reporting LQI at all or increasing it over time but the same for all device near and very fare and the devs is saying its the firmware bug but have dont getting it real fixes for some months. And its looks that the coordinator have problem keeping contact with sleeping end devices that is direct connected to it after reboot.

For My IKEA routers is working OK with Xiaomi / Aqara sensors that is having good signal to the nearest router but some (not all) dont like joining thru IKEA Zigbee 3 routers but old ZLL its OK and then tricking them changing to one ZB3. Last time some Philips HUE Motion sensors have starting leaving and rejoining very strange routers but they is Zigbee ZZ / HA 1.X.

Try install ZigZag its working little other way but is doing its work OK in ZHA.

And one new thing is that the latest ZHA have one updated version of ZHA-Map in the ZHA config that dont need separate addons.