My situation was similar. I’m going to give a break-down of the specifics in case someone has a similar issue that could provide them with the help of my solution. I have two Zigbee controllers: a Sonoff Dongle-P and HUSBZB-1 (Zigbee and Z-Wave). I have both controllers (dongles) plugged in through a 10-port USB 3.0 Hub (using USB A to A Cable Extensions of 6 inches for the purpose of extending the dongles away from the 3.0 ports as they’re known to cause interference with Zigbee dongles).
My HUSBZB is controlling my ZHA and soon to also be my Z-Wave devices. My Sonoff is to handle my Z2M (was providing this support while connected directly to my Dell Optiplex 7050 that I’m using in place of O-Droid N2+ as it has massive increase of speed over it). When I got my HUSBZB dongle I decided I would connect it and my Sonoff Dongle-P to the USB hub. While the HUSBZB connected mostly okay (had to plug in hub with nothing attaching and reboot the Optiplex from CLI), I then connected the HUSBZB and turned it on after HA finished restarting and this handled by ZHA devices mostly okay (the problems I had were the result of trying to use an old ZHA integration rather than starting fresh).
Next I plugged in my Sonoff to the USB hub (I don’t recall exactly what order I performed this in a I had been working at restoring HA from my N2+ to the Optiplex, which is a story for another day). At any rate, my Sonoff was recognized by HA in the Settings > System > Hardware, it was unable to be connected to Z2M (sort of). I say sort of because devices that I was adding to ZHA were being added to my Z2M and my Mosquitto Broker was listing the devices, allowing me to make modifications, and also see the changes to their states, but I simply couldn’t interact with Z2M. When I would go to Z2M addon (as the integration was saying the addon was turned off), the addon would remain greyed out when hitting Start and wouldn’t enable (in fact, it would list a series of log entries, but wouldn’t actually start up).
For reference, my Z2M addon has the following configuration YAML (passwords and user name changed - setting up Z2M and the Mosquitto broker are more involved than this, and a person should look this up on their part up on their own time):
data_path: /config/zigbee2mqtt
socat:
enabled: true
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: "-d -d"
log: true
mqtt:
server: mqtt://core-mosquitto
user: MOSQUITTO BROKER USERNAME HERE
password: MOSQUITTO BROKER USER'S PASSWORD HERE
serial:
port: >-
/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0
So now that you have the back-story, here’s the moment you were waiting for - the solution (and no, I didn’t use Tasmota as I haven’t gotten to the level of doing a lot of flashing). I made sure that the Sonoff that was listed in the “Hardware” section was inside my Z2M addon. I disconnected my Sonoff, that was to be used for my Z2M, from my USB and went to the CLI and did a:
ha host reboot
This command rebooted my Dell Optiplex and HA along with it.
- Once HA started back up, I plugged in my Sonoff Dongle to the USB Hub. At first it didn’t want to work (the addon would load, logs looked good, but when I went to the Z2M integration, it gave me a 502 unavailable error - at least pretty sure it was the 502).
- So I did a normal restart of the HA through the Developer Tools. When HA came back up, I made sure that the add-on had automatically started and I clicked on the integration and voila, success!
Hope this tale helps some of you