Zigbee2MQTT force devices to connect to another router?

Hi all,

I have installed a Sonoff plug which I am trying to use as a router for my zigbee devices. One section of the house is just a little too far away from the Rpi with the Sonoff USB 3.0 Zigbee dongle. I can’t really move it, so I thought I’d try this router.

I repaired the light switch (no neutral wires unforutnately) which has gone on to the plug router, but the other smaller Aqara switches won’t. They just sit there connecting (poorly) to the coordinator. I thought these things were meant to be smart?

Is there a way in the device settings to force them to use the router plug?

image

Cheers!

3 Likes

Aqara sensors pick a route when paired then they never change. So if you add new routers to the network, you have to re-pair the aqara sensors in-situ to take advantage of a new better possible route.

Just enable adding devices in zigbee2mqtt and hold the button on the sensor.

6 Likes

image

worked perfectly thank you.

I had to pair the sensor right next to the plug though, then put it back where it belonged. It would still pair to the coordinator and get a poorer LQI otherwise!! I guess that was the first thing it saw (before the plug)

1 Like

this weirdly doesn’t work for me.
I’ve been trying to get my xiaomi sensor to use one of the IKEA plugs closest to it.
No matter how many times I tried re-pariring, it seems only wanting to connect to the main router.

If it thinks it has a better route that way, let it use it.

Just force it. You can enable to only “join using this device” in Z2M. That way the IKEA plug will be the only option. Just press the small arrow down, next to the “premit join”

23 Likes

Wow! how did I miss that!!!? let me try that now!!!
thanks matey!

I found this rather hit and miss. I’ve forced it and it’s not connecting still.
found this article → Device-Availability | Zigbee2MQTT

not sure how relevant it is, and if it is still relevant, can anyone please show an example on the configuration.yaml? I cannot get it working as i think I got the syntax wrong.

Cheers

1 Like

Strange it will not connect to the right router. I do not have any ikea, I use aqara plugs as my routers, and two Tubes ZB. I have done this numerous times, both in ZHA and in Z2M. After I moved to Z2M it seems less important, I’m not focusing on it any more. Do you have other routers, just to try and see if it is related to the ikea one? Or, if it works, just forget about it.

The connection strength numbers on the may map are, to my experience, not really useful. With my conbee2 I got 255 on most, and still some errors. With my current Sonoff dongle 3.0, if only have numbers below 100, and newer any errors.

1 Like

+1 to the THANK YOU for pointing out, that you can force pair the devices to a specific router.

once you’ve seen the dropdown arrow, you can’t unsee it ^^

I just completed my ZHA - Z2M migration with a Sonoff 3.0 and I first paired my 4 Ikea Plugs and then all my bulbs that were routers and finally all the end devices and sensors. Most of the time I could choose which router I wanted to pair a new device too but on occasions the device just refused to pair to the closest router. This happened with a couple of Sengled bulbs, some Aqara sensors and one of the two SmartThings buttons I have. Weird but I chose the next closest router instead.
The new mesh seems rock solid and is really fast compared to my HUSBZB-1

1 Like

What tool have you used to make this nice graph in the first post?

It’s the Map tab in the Zigbee2mqtt UI

1 Like

Can confirm, but: why? I thought hitting „Add Device“ enables Join on ALL routers (including coordinator). Is that not the case?

Yes, that is the case, and the device will choose the route it believes are the best, and will change route later if the zigbee mesh changes. Some devices are not following the zigbee standard fully, and might behave strange. Like some Aqara devices which will never change route.

The original question was how to force a device to connect to a specific device, hence the answer.

2 Likes

Never knew this! thankyou. Just saved me some time turning things on / off again to force routes!