New to Zigbee2mqtt, please help!

Hi guys,

I am having an issue finalizing the configuration for some new window sensors (Aqara aka Xiaomi) and I’m not really sure exactly what the problem is.

So let me tell you a bit about my setup and what I’ve done so far.

My setup:

Unraid server running the following dockers:

  • Home Assistant
  • Mosquitto
  • Zigbee2MQTT

I have successfully configured Mosquitto and I see both Home Assistant & Zigbee2mqtt logging in (I set the client ID on each so I’d know the difference) and I’ve paired a number of the window contact sensors. I’m using a CC2531 coordinator and a CC2530 router.

The issue(s) that I’m having right now are as follows:

  • The router seems to be acting very strangely and I’m not sure exactly why… It’s basically only in one of two states:
    • Powers on with a quick blinking red light and then turns solid green (this is when the router and coordinator are in the same room, with the Coordinator plugged directly into my server and the router into a USB port on my PC.
  • Powers on with a quick blinking red light and never stops (this is when I try to use a 5V Apple USB wall plug, I’m not sure if this is too high power for the device?)

I’ve seen the link quality on the router bounce around from the high 20’s to mostly either 0 or 1 and I see tons of these messages in the logs:

e[32mzigbee2mqtt:info e[39m 2020-07-14 23:17:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:17:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:18:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:18:34: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:19:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:19:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:20:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:20:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:21:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:21:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:22:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:22:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:23:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:23:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:24:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:24:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:25:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:25:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:26:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:26:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload ‘{“led”:false,“linkquality”:0,“description”:“0/0x00124B000E0EAB9B”,“type”:“COORD”,“rssi”:0}’
e[32mzigbee2mqtt:info e[39m 2020-07-14 23:26:33: MQTT publish: topic ‘zigbee2mqtt/0x00124b000be9580a’, payload

So anyways not sure why I’m seeing so many of these messages, probably like discovery messages where the coordinator is trying to find the router? Nor sure.

So basically the biggest issue is that I’m able to pair some of my Xiamo sensors but when I take one into my bedroom (opposite side of the house on the second level) and I open the contact sensor, it remains in an open state and I get a message in Zigbee2qtt that the device has left the network.

Anyways I would really appreciate any advice/help or troubleshooting steps that will help me wrap this up.

Thanks!

Evan

Your router is too far away. The link quality is a scale of 255 (perfect) to 0 (not connected).

The Xiaomi devices don’t automatically switch how they connect to the mesh. If you pair them by the coordinator they won’t then auto-connect to a router later. You have to pair them in place.

So it’s really weird, even when I pair the router in the same room as the coordinator or even just outside, the link quality is never higher than ~20. Any idea what would cause this? I’m assuming it’s not just a software glitch?

Both my coordinator and router have antennas so I’d think I could at least put a small amount of distance between the two and have them connect.

Regarding the Xiaomis, once they are paired is there anything I need to do to unpair or reset them before attempting to re-pair? If I hold down the physical button the LED blinks until I let go. After that if I hold it down it blinks once and then not again so I guess that means it’s out of range of either the coordinator or router? When I’m in the same room as the coordinator it will blink once and then a few seconds later blink a few more times which I think means it’s connected.

I rarely see anything as low as 20. My router normally sits around 80 (about 5 to 8 meters away), worst I get is a window sensor that bypasses the router and goes direct to the coordinator, even that normally sits around 30.

I’d say you’ve got a problem with either the router or the coordinator.

Well, I always have had mixed results with my CC2531 routers. Wildly different lqi during the day.

Red light:

short fast blinks (one per second) – the router is connecting to a network.
long blinks (one short flash per 4 seconds) – normal operations.
three short blinks – the router cannot send a report to a coordinator.

Thank you for sharing your graphs, I think I’m seeing though that your router is sometimes going as high as 100 lqi!? Mine has never gone beyond 20 :frowning:

They do not reroute :roll_eyes:

If you just look at the routers (I have 3, one with antenna, the other without), I sometimes reach around 85

But they can reach 0

image

A Xiaomi sensor, you have to re-pair close to your router, or it will never route through it.