Trying to change Zigbee channel - HUSBZ1

I am really hoping someone can help me as I am at my wits end with my Zigbee network. I had been battling for a few weeks with Zigbee instability but thought I was finally making progress. I relocated my HA machine to the centre of the house on the ground floor away from my Asus Mesh WiFi and used a USB extension cable to get my HUSBZ1 away from the PC. Everything seemed a lot more stable and I was happy.

I found out through lots of reading that the Zigbee channel being used was 15 and at the time my 2.4GHZ WiFi was also broadcasting on Channel 6 so I moved that to 11 at the same time I moved my HA PC. All of a sudden everything settled down.

Fast forward to today, I just found out my neighbour has installed a TP Link Deco M9 Plus mesh WiFi and of course it picked channel 6. (Of course you cannot change it either !!) The signal even from my house is pretty damn strong and my Zigbee network has gone to crap.

As a last resort before my Wife throws all my lights in the garbage I want to change the Zigbee channel so it is as far away from 6 as possible but I am running into issues

I have HA running in Docker on Ubuntu Server, I cannot run the bellows commands because the ZHA component in HA is running. Here’s what I have done:

Sudo i
root@hassio# docker exec -it homeassistant /bin/bash

This gets me too

bash-5.0#

When I run
bash-5.0# bellows -d /dev/ttyUSB1 info I get an timeout error. I also tried to run
bellows -d /dev/ttyUSB0 form -c 20 but it also errors

I believe it is possible to change the Zigbee channel with this HUSBZB1 stick I just need some help. I am pretty sure this latest stability issue is coming from the WiFi interference from my neighbour.

Sorry for the long post but I am really hoping someone can help

@Richdem Have a look here ZHA Zigbee change channel

Hi
I have been hovering in that thread and posted but wasn’t sure if anyone saw it. Like I said I am kinda panicking now lol

Did you stop HA before running the command. If HA is running, it will be in control of the stick so you won’t be able to run your command.

Yes, I first have run
docker exec -it homeassistant /bin/bash

while home assistant is running otherwise I get an error that it isn’t. Then I tried stopping home assistant and running
bellows -d /dev/ttyUSB1 info

I then get a timeout error, I have to admit the whole command line is not my strong point, Should you have ti stop the whole home assistant instance or is there a way of disabling the ZHA component?

For anyone that is interested I was able to successfully change the Zigbee channel on my HUSBZB-1. I am running HA & Docker on Ubuntu Server so the commands needed for your setup maybe slightly different.

  1. Stop the ZHA component by deleting it in the integrations page
  2. SSH into HA machine
  3. sudo -i
  4. docker exec -it homeassistant /bin/bash
  5. bellows -d /dev/ttyUSB1 info (This command should show you the current channel being used which is normally 15)
  6. bellows -d /dev/ttyUSB1 form -D /config/zigbee.db -c 11 (What is important here is the path to your zigbee.db after -D)

I changed my Zigbee channel to 11 and changed my Asus Mesh WiFi to channel 11 to give them the maximum amount of separation. Please note Zigbee 11 & WiFi 11 are not the same channel.

I was getting a lot of interference when my Zigbee was on channel 15 and so far things seem way more stable.

As a last note you will have to reset and re add all your Zigbee lights. I removed them first in the ZHA component. Once I was happy the channel had changed and survived a restart of HA I then stopped it, deleted the zigbee.db, restarted HA then added my lights back.

A big thanks to everyone help me figure out how to do this.

1 Like

Hi @Richdem I hope you dont mind me jumping on this old thread, but im coming up against the same issues you are having. I have removed ZHA from my integrations, restarted HA and made sure it isn’t there, but im in the same boat as you were - I need to have HA running to get to the bash command, but I get the timeout. If I stop HA, I cannot get to the bash command to run bellows. Can I ask how you got round this “loop”?

Did you try without restarting HA?

It has been a few months since I had to do this and from what I can remember I used the exact steps listed above.

If I get some time over the weekend I will try and take a look

Yes mate ive tried that - ive tried everything I can think of, just cannot get past this damn timeout :confused:

I finally cracked it. When running bellows I saw the option to specify -b for baud rate. I’m using the elablabs usb and it clicked that I remember having to specifically set the baud rate to 115200. When putting this in finally worked! That was about 12 hours of trying to finally find that!! Hopefully this will come in use to someone else at some point.

Thanks for the update,

I am using a different USB stick, the HUSBZ1 so my instructions may have to be modified.

Grab yourself a WiFi analyzer app if you have an android device and see what the surrounding channels look like. The standard Zigbee channel for my device was 15, I moved it to Zigbee channel 11 and then my Asus Mesh WiFi to channel 11 to get as much separation as possible

Since I did this my Zigbee network has been rock solid. It is also worth mentioning I used a 6ft USB extension cable to get the HUSBZ1 away from my PC running HA

I would also suggest you try the excellent ZHA Network Card, it is a great way to keep an eye on your Zigbee network

Here is what mine looks like

I have a number of Xiaomi door sensors, Smartthings door sensors, Smarthings motion detector & 2 Smartthings buttons. All these are battery devices which can sometimes be a headache but all mine work perfectly/

Thanks @Richdem, yes my TP-Link Deco system seems to favour channel 4 or 5 (and for some crazy reason you cannot change it!) - so I have shifted ZHA up to channel 26 and it seems much better. Most of my devices are in the 100-150 LQI’s so I think ive still got interference, ill perhaps buy some plugs to boost the network as they are literally all battery powered xiaomi motion sensors at the moment. I’ve also got a USB extension arriving today to shift the dongle away from the rPi as suggested.

Running into some issues trying to get the ZHA card installed (its saying it cannot detect that custom card) but ive raised an issue over there. Think it might be related to how HA has changed the way it handles custom resources.

Thanks again.

I had installed a Deco M9 Mesh system in my neigbours house and the damn thing also picked channel 6 which believe it or not started giving me interference. There is a whole thread on the TP-Link forum about the fact that they are missing a fundamental function of being able to choose what WiFi channel you want.

That is when I started investigating which channel the HUSBZB-1 was using. I have a ton of Zigbee light bulbs which act as repeaters plus I picked up 3 of the Ikea outlets and have one located on each floor. This also helped, all of my battery sensors work perfectly.

The only other thing you may want to consider is upgrading the Raspberry PI. I have a version 3 which I now use as a NAS. I picked up a cheap off lease HP 8200 Ultra Small Form Factor PC and installed Ubuntu Server, Docker & HA. I had a 128GB SSD laying around and it is perfect for HA. I used the following guide

Hi, when do you see that the change has taken effect? I apply the commands but check and keep showing Channel 15

I had to issue a leave network command before I was able to form a network on another channel

bellows -d /dev/ttyUSB1 leave
bellows -d /dev/ttyUSB1 form -D /config/zigbee.db -c 25

Given the very nice chart showing the channels for wifi and zigbee, wouldn’t it generally make more sense to use zigbee channel 26 or 25 instead of zigbee channel 11? (Assuming the wifi channel congestion is about the same on the high end and the low end.) zigbee channel 11 is in the main part of the frequency band of wifi channel 1, but zigbee channels 25 and 26 are on the shoulders of wifi channel 11.

I had better luck with zigbee channel 26 compared to zigbee channel 11, but mine was a brief experiment, and zigbee channel 26 is also no perfect. (I have a couple of powered zigbee outlets coming and hope they resolve the problem by acting as repeaters.)