Adding zigbee router causes issues with automation

Hi all.

I installed 2 zigbee routers to extend the range. Some of my devices that are closer to my coordinator decided to connect to my farther router, thus causing issues with my automation.

How can I get these devices to stick to my coordinator?

What issues are you facing?

devices not responding or have poor quality because they connect to the remote router with the weaker signal, instead to the closer router.

Zigbee does not allow that, the network routing is done automatically. Just add more/better Zigbee Router devices and do everything you can to avoid interference, especially for the Zigbee Coordinator

Begin by following this to rule out both interference and lack of routers (you will probably have to buy and add more Zigbee Router devices regardless of your setup) → Zigbee networks: how to guide for avoiding interference and optimize for getting better range + coverage (weird symptoms are usually due to EMF interference from something so before doing anything else start by connecting the Zigbee Coordinator via a very long USB extension cable to get it far way from other devices, and be sure to only connect to to a USB 2.0 port, so connect it via a powered USB 2.0 hub if your computer only have USB 3.x ports. Know that USB 3.x ports and USB 3.x devices will cause serious EMF interference for Zigbee).

If that does not work then also consider upgrading the Zigbee Coordinator firmware to a later version.

Thanks for the detailed reply.

  1. I didn’t know about the USB3.0 issue, so that is the 1st thing I’ll tackle. I only have USB3.0 on my HA machine so I’ll do as you suggested and connected a USB 2 hub.

  2. My home layout doesn’t allow for a long USB cable for the coordinator, so I’ll have to live with that for now.

  3. Aside from no.2, I’ve done my best to avoid interference with zigbee signals. I have the IKEA zigbee repeater: IKEA E1746 control via MQTT | Zigbee2MQTT

and I have this Sonoff Zigbee Dongle-E set up as a router: SONOFF ZBDongle-E control via MQTT | Zigbee2MQTT

And my coordinator is Sonoff Zigbee Dongle P

Make sure it is a “powered” USB 2.0 hub, meaing that the hub should have its own external power-supply AC-adapter, (all USB devices including a Zigbee radio adapter can also show other weird symptoms if they do not have enough/correct power all the time). Like for example this one → https://www.amazon.com/AmazonBasics-Port-USB-Power-Adapter/dp/B00DQFGJR4

I am afraid that using some kind of USB extension cable to the Zigbee Coordiantor is really a must, even if it is not as very long, the longer you get it away from your computer and any other devices/cables the better, so just moving it a little way might be the night and day difference between working and not.

A tip is that there are inexpensive USB over RJ45 extension adapters you can byy (sold as a pair with male and female USB ports) and they can convert any Ethernet cable into a very long passive USB cable on the cheap (though a high-quality “shielded” Ethernet cable is recommended for radio adapters). See for example this one → https://www.amazon.com/Male-RJ45-Female-Extension-Adapter/dp/B083W3D65G/

Anyway, check out this video which clearly shows how bad things might work when the Zigbee Coordinator is too close to a USB 3.x device/cable:

That is good, however still suggest you consider buying one or more of the IKEA Trådfri Signal Repeater or Sonoff dongles, as having more of those spread out around your home should give great coverage. The more “known good” always-on Zigbee Router devices that are available the more robust network you get and it will then be able to better handle if one of the Zigbee Routers goes offline temporarily or permanently, so one of the keys to a stable Zigbee network can be said to simply to add loads of Zigbee Router devices.

Suggest that you consider upgrading the firmware on it to a later version than what shipped with it if you have not already. I believe that the latest have some issues reported for it though so perhaps try the latest “develop” version if you dare. See → ITead's "Sonoff Zigbee 3.0 USB Dongle Plus" (model "ZBDongle-P") based on Texas Instruments CC2652P +20dBm radio SoC/MCU and Z-Stack_3.x.0 coordinator 20230901/20230902 feedback · Koenkk/Z-Stack-firmware · Discussion #474 · GitHub

1 Like

I’ll try to see how I can increase the distance of the zigbee coordinator from the PC and yes, I will use a powered usb 2 hub.

The sonoff coordinator is using a firmware I flashed 1.5 months ago. The sonoff router is an E variant and that is using the latest sonoff router firmware.

Are you currently using the 20230507 firmware version mentioned here that others reported issues with? → Z-Stack_3.x.0 coordinator 20230901/20230902 feedback · Koenkk/Z-Stack-firmware · Discussion #474 · GitHub

If so then you might want to either downgrade to older version or upgrade to the mentioned develop version instead.

I don’t recall the exact version. How can I validate?

Among other ways, you can find the Z-Stack Code Revision (“ZStack CodeRevision”) in the backup file, so just download the JSON backup file and you should find that listed somewhere at the end of it. More tips here → ITead's "Sonoff Zigbee 3.0 USB Dongle Plus" (model "ZBDongle-P") based on Texas Instruments CC2652P +20dBm radio SoC/MCU

by the way, using a powered usb2 hub, I cannot figure out the port for the dongle.
I get this:
Zigbee2MQTT:error 2023-09-24 12:51:40: Exiting... Zigbee2MQTT:error 2023-09-24 12:51:40: Error: Error while opening serialport 'Error: Error: Operation not permitted, cannot open /dev/bus/usb/001/001'

use /dev/serial/by-id

I don’t know what it means.
This is what I see in the HW when the hub is connected:

BUSNUM: '001'
DEVNAME: /dev/bus/usb/001/001
DEVNUM: '001'
DEVPATH: /devices/pci0000:00/0000:00:14.0/usb1
DEVTYPE: usb_device
DRIVER: usb
ID_BUS: usb
ID_FOR_SEAT: usb-pci-0000_00_14_0
ID_MODEL: xHCI_Host_Controller
ID_MODEL_ENC: xHCI\x20Host\x20Controller
ID_MODEL_ID: '0002'
ID_PATH: pci-0000:00:14.0
ID_PATH_TAG: pci-0000_00_14_0
ID_REVISION: '0601'
ID_SERIAL: Linux_6.1.45_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
ID_SERIAL_SHORT: '0000:00:14.0'
ID_USB_INTERFACES: ':090000:'
ID_USB_MODEL: xHCI_Host_Controller
ID_USB_MODEL_ENC: xHCI\x20Host\x20Controller
ID_USB_MODEL_ID: '0002'
ID_USB_REVISION: '0601'
ID_USB_SERIAL: Linux_6.1.45_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
ID_USB_SERIAL_SHORT: '0000:00:14.0'
ID_USB_VENDOR: Linux_6.1.45_xhci-hcd
ID_USB_VENDOR_ENC: Linux\x206.1.45\x20xhci-hcd
ID_USB_VENDOR_ID: 1d6b
ID_VENDOR: Linux_6.1.45_xhci-hcd
ID_VENDOR_ENC: Linux\x206.1.45\x20xhci-hcd
ID_VENDOR_ID: 1d6b
MAJOR: '189'
MINOR: '0'
PRODUCT: 1d6b/2/601
SUBSYSTEM: usb
TAGS: ':seat:'
TYPE: 9/0/1
USEC_INITIALIZED: '996750'

What does

sudo ls /dev/serial/by-id

return ?

image

No ~ behind by-id

You should get something like

afbeelding

oh I got it now.
it’s working, thought I have no real space to move the dongle away from the router or the HA machine.

by the way, it failed today. something is wrong with the hub.
either way, I did the command you suggested and this is what I get:
image

It’s the same as before.