Sonoff Zigbee Dongle Plus in Docker

Hi all

i just purchased a Sonoff USB Dongle Plus -P version

i updated the firmware to the latest

i have a Docker installation on Ubuntu (i manage updates using Portainer)

I have plugged in the dongle and can see it recognised by Ubuntu using lsusb command

but i dont see the device being detected in Home Assistant

Any advice?
Thannks

Do you intend to use ZHA or Z2M?

You need to add one of those (and it uses the dongle).

edit: I use Z2M. Here is my docker compose for all of it (notice the device line): removed as I now see you are using ZHA.

i tried to install ZHA but it just shows this and doesnt present me with a device to choose

I use Z2M, not ZHA so cannot advice on that - sorry. I am sure someone else will jump in.

after more digging i found this:

but dont know how to find my docker-compose file (let alone edit it)…

OK, what method did you use to start HA’s container?

was it something like:

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=MY_TIME_ZONE \
  -v /PATH_TO_YOUR_CONFIG:/config \
  -v /run/dbus:/run/dbus:ro \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable

or something more like:

docker compose up -d

honestly i dont recall, its running in Portainer

OK, can you remember how you started Portioner?

i followed these instructions

I think you may need to learn a little about how Portainer works (how to use it). I don’t use Portainer myself, so cannot help you there.

Hello,

well the tutorial tell you how to install portainer.
Then how did you install HA docker?
Did you use docker compose or not?

Anyway:

Backup in case you mess up.
Access portainer UI.
Select container from side menu
Select the container name of your HA install
Click Duplicate/Edit
Go to bottom page section select Runtime&Resources.
Click Add device, in host field add the host usb that you found in your Ubuntu example /dev/ttyACM0.
In container field same device example /dev/ttyACM0.
Click deploy container.
Once deployed your container can access the usb.

If you want to know if you have docker compose:
Ssh in you ubuntu machine or open terminal and enter command

docker compose version —short

Hit enter, if you see a number you should have a docker configuration in the specified path that you see in the home assistant container summary.

hello @AutoDIY

Thanks for your help
for completeness here are some more details for those that sumble across this

you correctly identified that i needed to add the resourse to the container as mentioned above

i found out the name of the USB device by keeping it uplugged
and running “ls /dev” via SSH
then plugged it in and re-ran it looking for the differences in the “tty” devices

i had a new one called ttyUSB0 → so in Portainer i added
image

then rebuilt the container
then when in HA when adding ZHA it discovered the dongle

thanks again

image