(SOLVED) ZHA connection failed with SONOFF Zigbee 3.0 Dongle

Hello together,

I have got HassIO running on a Pi4.
I plugged in a new SONOFF Zigbee 3.0 Dongle, which should work out-of-the-box with ZHA Integration.

I followed Instruction:

But at Point 4 i get „Connection failed“, whether i select software/hardware/nothing.

Does anybody have a hint to solve this problem?

Dongle seems to be detected, as during Integration it shows me serial path

/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_0edf89633693eb118b6b214f3d98b6d1-if00-port0
for selection.

lsusb shows:

Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 10c4:ea60
Bus 001 Device 002: ID 2109:3431
Bus 002 Device 002: ID 174c:55aa
Bus 002 Device 001: ID 1d6b:0003

Thank you in advance.

Greets Haggel

1 Like

I have the exact same issue…
With a Home Assistant VW running on an Unraid Server…
Do you mind me asking where you bought your Dongle (i jsut received mine via mail today in germany)

I had just the same problem this evening using Zigbee2mqtt.

Always error could not open port

/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_0edf89633693eb118b6b214f3d98b6d1-if00-port0

Then I tried simply /dev/ttyUSB0 and Zigbee2mqtt started ?
Not happy with this solution, but at least it is working.

1 Like

But direct link does not work anymore. A friend order 2 pieces, one for me. :slight_smile:

I also tried /dev/ttyUSB0 with ZHA, but didn’t find it either.

Neither disabling bluetooth changed anything.

I thought as much - i also used the mydealz link… question is… does the device from your friend work correctly? If not maybe that deal was just too good to be true…and the devices are faulty?
when i try to install it now it installs without a problem (does not even ask me point 3 and 4)
But i get the following errors

02:02:26 – (WARNUNG) config_entries.py
Couldn't start ZNP = Texas Instruments Z-Stack ZNP protocol: CC253x, CC26x2, CC13x2 coordinator
02:02:26 – (FEHLER) Zigbee Home Automation
Couldn't start application
02:02:26 – (FEHLER) /usr/local/lib/python3.9/site-packages/zigpy/application.py
Received an unhandled command: SYS.ResetInd.Callback(Reason=<ResetReason.PowerUp: 0>, TransportRev=2, ProductId=1, MajorRel=2, MinorRel=7, MaintRel=1)
02:02:11 – (WARNUNG) /usr/local/lib/python3.9/site-packages/zigpy_znp/api.py```

So… apparently restarting the host after installing did the trick…

1 Like

Problem solved.

I tried out my Conbee II Stick, which was running fine on another pi with Phoscon.
When I added Conbee II Stick to my Home Assistant PI4 it was running fine with Phoscon Add-on as well.
But with ZHA I got same error as with SONOFF (Phoscon Add-on was uninstalled before).

As I am running Raspberrymatic Add-on on HA, I deactivated it just for a test.
→ Conbee II as well als SONOFF Stick can be configured with ZHA!!

Root cause was CuXD Daemon on Raspberrymatic.

Here is the perfect solution:

This is how I figured it out, at least it is not giving me any errors. I have not added any devices yet.

First, in the doc for HA for the docker implementation, you need to make sure the device is discoverable by adding it into the docker-compose.yml file.

Then you will see the device show up in the integration setup. Pick ZNP option since that is what it says to pick in the Sonoff documentation. Make sure either nothing or hardware is selected.

Make sure the antenna is not connected and it should connect just fine.

So what helped me was adding dev folder to my docker-compose.yaml of home assitant. Then after restart it was able to detect sonoff USB stick and connect

volumes:
    - /dev:/dev
devices:
    - "/dev/ttyUSB0:/dev/ttyUSB0"
2 Likes

I just want share that I was having the same problem using home assistant core installed from the arch linux repositories. It turns out that the permissions on the dongle device file (/dev/USB0) were rw-rw---- with user root, and group uucp. The systemd file installed creates a hass user, but that user doesn’t have permissions to access the device. In order to give access to the hass user, one can use systemctl edit --full home-assistant.service and add the line SupplementaryGroups=uucp, which will add the hass user to the uucp group. Then, after a systemctl daemon-reload and systemctl restart home-assistant.service you should be up and running.

4 Likes

Tearing my hair out trying to get it to work, but was solved with @CopOnTheRun solution above, only my device was in “dialout” group. Added to the systemd unit file and bingo!

I had the same problem and it turned out that I had forgot to add my user to the crucial groups (I use core).

sudo usermod -a -G dialout,gpio,i2c homeassistant

Fixed the issue. For a diagnostic I must add that in the console I was getting the following errors/warning

2022-02-08 17:00:58 ERROR (MainThread) [zigpy_zigate.common] Unable to set PiZiGate GPIO, please check configuration
2022-02-08 17:00:58 ERROR (MainThread) [zigpy_zigate.common] No access to /dev/mem.  Try running as root!
1 Like

So as many have mentioned here it has something to do with permisions, i was able to make it work by doing chmod on the /ttyUSB0 and giving more permissions.
This is probably not the right way to do it but it worked for me

chmod a+rwx ttyUSB0

2 Likes

Hi,
just went into the same case, last Hassio, and /dev/tty/usbxx or ACMxxx were on group dialout.
As my previous zigee conbee II controller was working with these rights I dig into other options.
In fact I simply solved the trouble just with :
serial:
port: /dev/ttyUSB1
baudrate: 115200

Spent hours just for that… Hope it can help others.

/klona

hi
just wanted to know is this possible to do through home assistant dashboard or should I be accessing the RPI? Since in the new version I just cant find the device through supervisors any more like before.
I am still tucked on the version of 2022.04 which is still stable with all the ZHA devices, whenever I update the entire ZHA integration fails.

1 Like

After uninstalling mqtt & zigbee2mqtt
Adding a usb extension from the Pi
& disconnecting the antenna

IT FINALLY WORKED!!!
(not sure if it was one or a combination of those things but victory is now at hand.

Dude, you saved my life.

Im running HA core on LUbuntu and after hours of try this and that …

sudo chmod a+rwx /dev/ttyACM0

Many thanks!

Thanks a ton! solved it for me.
On Ubuntu 22.04 the group is dialout, so the line becomes SupplementaryGroups=dialout