Passtrough USB device to Custom APP

Hello,

i wanted to use Zigbee2MQTT on Truenas Scale Electic Eel.
I created a custom App for that, but how can i passtrough my zigbee stick to the docker container?

Thanks

The official page has instructions on how to do it:

If you use the Custom App Web-UI you won’t find all options necessary to do the usb passthrough in the recommended way. However you should be able to adapt the compose file listed in the guide:

version: '3.8'
services:
    zigbee2mqtt:
        container_name: zigbee2mqtt
        image: koenkk/zigbee2mqtt
        restart: unless-stopped
        volumes:
            - ./data:/app/data
            - /run/udev:/run/udev:ro
        ports:
            # Frontend port
            - 8080:8080
        environment:
            - TZ=Europe/Berlin
        devices:
            # Make sure this matched your adapter location
            - /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00:/dev/ttyACM0

You’re going to have to adapt the device path. Also change the host volume mount (the ./data part) and point it to a dataset where you want the data to be stored (something like /mnt/<pool-name>/<dataset-name>).

Compose files can be added in the Web-UI:
image

I personally prefer using docker run --rm <options> <image> on the commandline until I get the configuration exactly how I want and then create a compose afterwards.

1 Like