azuwis / zigbee2mqtt-networkmap

Home Assistant Custom Card to show Zigbee2mqtt network map
259 stars 18 forks source link

Some of my devices are detached #14

Closed itorgov closed 4 years ago

itorgov commented 4 years ago

Hi!

Some of my devices are detached on the map. Why did it happen? Is it bug or not? I thought that all devices should be connected to coordinator or router. Screenshot 2019-11-28 at 22 33 46

hajo62 commented 4 years ago

I see the same: image

azuwis commented 4 years ago

This is probably a Zigbee2mqtt issue, the information is given by Zigbee2mqtt.

Please fill the issue template, especially the sensor attributes, without this I can not confirm.

The network map function of Zigbee2mqtt was know to have various kind of issues, see https://github.com/Koenkk/zigbee2mqtt/issues/652

You can try updating Zigbee2mqtt to 1.7.1, and see if the problem is still there. People are having good result using 1.7.1, see https://github.com/Koenkk/zigbee2mqtt/issues/2307

hajo62 commented 4 years ago

Which issue template are you referring to? I don't know, what I should get to answer "especially the sensor attributes"...

I did the zigbee2mqtt update to v1.7.1. networkmap: v0.5.0 Home Assistant v0.101.3

Restartet both containers. Still the same result

azuwis commented 4 years ago

Which issue template are you referring to? I don't know, what I should get to answer "especially the sensor attributes"...

You can see the issue template when creating an new one. You can also find the sensor attribute in the Zigbee2mqtt log, look for line like:

MQTT publish: topic 'zigbee2mqtt/bridge/networkmap/raw', payload...

And copy the whole line.

I did the zigbee2mqtt update to v1.7.1. networkmap: v0.5.0 Home Assistant v0.101.3

Restartet both containers. Still the same result

I think you should report the issue to Zigbee2mqtt instead.

hajo62 commented 4 years ago

Here the filled template: Home Assistant version v0.101.3

Zigbee2mqtt version v1.7.1

OS and browser version MacOS Firefox v70.0.1 or Chrome v78.0.3904.108

Error message on browser No error

State attributes of sensor.zigbee2mqtt_networkmap

nodes:
  - ieeeAddr: '0x00124b00193648ca'
    friendlyName: Coordinator
    type: Coordinator
    networkAddress: 0
    failed: []
    lastSeen: null
  - ieeeAddr: '0x00158d0002b5196f'
    friendlyName: XiaomiAqara-1
    type: EndDevice
    networkAddress: 26058
    manufacturerName: LUMI
    modelID: lumi.weather
    lastSeen: 1575015908044
  - ieeeAddr: '0x00158d0002e23355'
    friendlyName: XiaomiSmart-1
    type: EndDevice
    networkAddress: 11126
    manufacturerName: LUMI
    modelID: lumi.sens
    lastSeen: null
  - ieeeAddr: '0x00158d00025ee3a6'
    friendlyName: XiaomiAqara-2
    type: EndDevice
    networkAddress: 36594
    manufacturerName: LUMI
    modelID: lumi.weather
    lastSeen: 1575016030142
  - ieeeAddr: '0x000b57fffe271050'
    friendlyName: '0x000b57fffe271050'
    type: EndDevice
    networkAddress: 19118
    manufacturerName: IKEA of Sweden
    modelID: TRADFRI wireless dimmer
    lastSeen: null
links:
  - source:
      ieeeAddr: '0x000b57fffe271050'
      networkAddress: 19118
    target:
      ieeeAddr: '0x00124b00193648ca'
      networkAddress: 0
    linkquality: 170
    depth: 1
    routes: []
    sourceIeeeAddr: '0x000b57fffe271050'
    targetIeeeAddr: '0x00124b00193648ca'
    sourceNwkAddr: 19118
    lqi: 170
    relationship: 1
  - source:
      ieeeAddr: '0x00158d0002b5196f'
      networkAddress: 26058
    target:
      ieeeAddr: '0x00124b00193648ca'
      networkAddress: 0
    linkquality: 5
    depth: 1
    routes: []
    sourceIeeeAddr: '0x00158d0002b5196f'
    targetIeeeAddr: '0x00124b00193648ca'
    sourceNwkAddr: 26058
    lqi: 5
    relationship: 1
  - source:
      ieeeAddr: '0x00158d00025ee3a6'
      networkAddress: 36594
    target:
      ieeeAddr: '0x00124b00193648ca'
      networkAddress: 0
    linkquality: 26
    depth: 1
    routes: []
    sourceIeeeAddr: '0x00158d00025ee3a6'
    targetIeeeAddr: '0x00124b00193648ca'
    sourceNwkAddr: 36594
    lqi: 26
    relationship: 1
  - source:
      ieeeAddr: '0x001788010479f6d9'
      networkAddress: 45798
    target:
      ieeeAddr: '0x00124b00193648ca'
      networkAddress: 0
    linkquality: 0
    depth: 1
    routes: []
    sourceIeeeAddr: '0x001788010479f6d9'
    targetIeeeAddr: '0x00124b00193648ca'
    sourceNwkAddr: 45798
    lqi: 0
    relationship: 1
  - source:
      ieeeAddr: '0x0000000000000000'
      networkAddress: 11126
    target:
      ieeeAddr: '0x00124b00193648ca'
      networkAddress: 0
    linkquality: 0
    depth: 255
    routes: []
    sourceIeeeAddr: '0x0000000000000000'
    targetIeeeAddr: '0x00124b00193648ca'
    sourceNwkAddr: 11126
    lqi: 0
    relationship: 3
friendly_name: Zigbee2mqtt Networkmap

Home Assistant log nothing relevant

azuwis commented 4 years ago

@hajo62 I can confirm this is a Zigbee2mqtt issue, at least in your case.

  - ieeeAddr: '0x00158d0002e23355'
    friendlyName: XiaomiSmart-1

The ieeeAddr of XiaomiSmart-1 is 0x00158d0002e23355, but this ieeeAddr can not be found in links, that means this node is detached according to the information given by Zigbee2mqtt.

zibous commented 4 years ago

Same problem here:

Home Assistant 0.102.3

Zigbee2mqtt version 1.7.1+dev

OS and browser version MacOS Firefox v70.0.1 or Chrome v78.0.3904.108

Error message on browser No error

Bildschirmfoto 2019-12-02 um 15 21 54

zigbee2mqtt version: 1.7.1+dev Zigbee Bridge Coordinator: zStack12,revision":20190608

{"version":"1.7.1+dev",
 "commit":"a7486d7",
 "coordinator":
    {"type":"zStack12",
     "meta":
        {"transportrev":2,
         "product":0,
         "majorrel":2,
         "minorrel":6,
         "maintrel":3,
         "revision":20190608}
        },
     "log_level":"info","permit_join":true
     }

"temperatursensor1": {
        "temperature": 24.44,
        "linkquality": 31,
        "last_seen": "2019-12-02T15:27:20+01:00",
        "humidity": 40.81,
        "pressure": 975.2,
        "battery": 100,
        "voltage": 3015
    }

"temperatursensor2": {
        "temperature": 16.33,
        "linkquality": 28,
        "last_seen": "2019-12-02T15:02:04+01:00",
        "humidity": 44.38,
        "pressure": 974.9,
        "battery": 74,
        "voltage": 2955
}

"0x00158d00034985f3": {
        "temperature": 23.66,
        "linkquality": 28,
        "last_seen": "2019-12-02T15:04:22+01:00",
        "pressure": 975,
        "humidity": 30.43,
        "battery": 86,
        "voltage": 2975
}

"wassersensor1": {
        "battery": 100,
        "voltage": 3025,
        "linkquality": 31,
        "last_seen": "2019-12-02T15:20:06+01:00",
        "water_leak": false
}
azuwis commented 4 years ago

Quote from Koenkk, the author of Zigbee2mqtt:

If only the end devices are detached, this is not really strange, they can sleep for a long time causing them to drop from the routers routing tables.

It seems normal that end devices are detached.

Anyway this is a upstream issue even if it really is an issue. Please discuss in https://github.com/Koenkk/zigbee2mqtt/issues/2436 instead.