Zigbee2MqttAssistant
Zigbee2MqttAssistant copied to clipboard
Linkquality not processed [BUG]
This are the versions
Version of Zigbee2MqttAssistant (this software): 0.3.141 (0.3.141+Branch.master.Sha.4045f90e7f9a57fd9bca5d96cff27db8236a8a6a) Release Version of Zigbee2Mqtt: 1.10.0-dev Coordinator version: 20190608
This is the output of zigbee2mqtt
info 2020-02-23 13:16:55: MQTT publish: topic 'zigbee2mqtt/ZolderPIR', payload '{"occupancy":true,"linkquality":102,"last_seen":"2020-02-23T13:16:55+01:00","battery":100,"voltage":3005,"device":{"friendlyName":"ZolderPIR","model":"RTCGQ01LM","ieeeAddr":"0x00158d0001b192fd","networkAddress":20306,"type":"EndDevice","manufacturerID":4151,"manufacturerName":"LUMI","powerSource":"Battery","applicationVersion":11}}'
The linkquality is unknown and in the networkmap the device is not connected.
BUT the device is working properly.
Zigbee Id is 0x00158d0001b192fd. Address on Zigbee Network is 0x4F52. Link quality is unknown/255. Battery level is 100%. Model is lumi.sensor_motion by LUMI. Hardware version is unknown. This device type is EndDevice
Same problem here... 1.10.0, 0.3.133 and 20190608. Every device without hw version and link quality.
@SargonofAssyria @frogale I had a look at this. It is not that simple to change. The Linkquality is calculated from its neighbours when the network mesh is established. This is what is shown. Unfortunately, battery and sleeping nodes don't report the Linkquality at that time. When ever a battery device is active, its current linkquality is publised by Z2M, but this number is not used by Z2MA. @carldebilly do you have any good input on how to mix the calculated linkquality and the linkquality delivered in the JSON response when a device transmits?
public ushort? LinkQuality => Parents
.Where(p => p.relationship < 3)
.Select(p => (ushort?)p.linkQuality)
.DefaultIfEmpty()
.Max();
@magpern The first-never-published version were using the information from the "get devices" payload. But it's not used anymore because I found it was "seems" more accurate to use the one from the links...
The goal was to create a kind of "smart view" in the device details, showing all routes to coordinator with the cost of each of them... but I didn't figure any easy way to build it.
Same issue here... But I understand it's not an easy fix, but thanks for your effort anyway.