Proxmox LXC: deconz not connecting to ConBee II gateway

Hi.
Im trying to run deconz v2.13.01 in an LXC ubuntu 20.04 LTS container in proxmox, deconz starts and i can access it from browser but i cant seem to establish connection to my ConBee II.
I have passed my ConBee through to the cointainer and tried every solution i could find on the web, i’ve also tried installing docker in LXC and then deconz in that(because thats what was working on my Pi) also with no luck.

Can anyone point me in the right direction please, thanks

here is some of the log, let me know if i should be looking for something specific.

i cant attach more than one screenshot! please look here for screenshots of my configuration.
github link #5432

For deConz to be able to access the Conbee, the container must run in privilege mode and have full access to the machine HW.
An LXC container virtualizes this and commands cannot pass through the abstracted layers.
Try a Docker container instead of an LXC.

Thanks for the reply
Iam running privileged mode, full access to machine hardware? should it not be enough to pass the Conbee stick through to the container?
Are you saying there is absolutely no way of running deconz in a LXC container?
When i install home assistant OS in a VM there is no problem passing the stick through to the deconz add-on in HA

Hello Friend,

I managed to get around by creating a new startup script for DECONZ, it works perfectly for me.
Add the user who runs the process to /etc/sudoers
deconz ALL=(ALL) NOPASSWD:ALL

Create a new startup file for deconz:
nano /lib/systemd/system/deconz-lxc.service

[Unit]
Description=deCONZ: ZigBee gateway – GUI/REST API
Wants=deconz-init.service deconz-update.service
After=lightdm.service
StartLimitIntervalSec=0
[Service]
User=1000
Group=1000
Environment=“DISPLAY=:0”
ExecStartPre=sudo /bin/mkdir -p /run/udev/data
ExecStartPre=sudo /sbin/setcap cap_net_bind_service+ep /usr/bin/deCONZ
ExecStartPre=sudo /bin/bash -c “/bin/echo -e ‘E:ID_VENDOR_ID=1cf1\nE:ID_MODEL_ID=0030’ > /run/udev/data/c166:0”
ExecStartPre=sudo /bin/chown deconz:deconz /var/log/deCONZ.log
ExecStart=/usr/bin/deCONZ --http-listen=10.0.0.10 --http-port=80 --ws-port=443 --auto-connect=1 --upnp=1 --device=/dev/ttyACM0 --allow-local=0
StandardOutput=file:/var/log/deCONZ.log
Restart=on-failure
RestartSec=30
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME

[Install]
WantedBy=multi-user.target

2 Likes

Thanks man, i already have a startup service, its not exactly same as your but should do the same thing?
i’ve made it following a guide i found. whats your setup? maybe ill try clean install and do it your way

i just follow this manual, but is not a LXC Container. Headless and works great.

1 Like

My container .conf on proxmox host:
arch: amd64
cores: 4
features: fuse=1,nesting=1
hostname: sh-deconz
memory: 4096
net0: name=ens18,bridge=vmbr0,hwaddr=46:54:04:58:58:6F,ip=dhcp,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm-ssd:vm-1105-disk-0,size=100G
startup: order=0
swap: 4096
lxc.apparmor.profile: unconfined
lxc.apparmor.raw: mount,
lxc.cap.drop:
lxc.cgroup2.devices.allow: a
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 4:7 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 166:* rwm
lxc.mount.entry: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2217331-if00 dev/CONBEEII none bind,optional,create=file 0 0
lxc.mount.entry: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2217331-if00 dev/ttyACM0 none bind,optional,create=file 0 0
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/tty7 dev/tty7 none bind,optional,create=file
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/fuse dev/fuse none bind,create=file 0 0

My conf for udev rules on proxmox host: nano /etc/udev/rules.d/99-ttyACM-rw.rules

SUBSYSTEMS==“usb”, ATTRS{idVendor}==“1cf1”, ATTRS{idProduct}==“0030”, SYMLINK+=“CONBEEII”, MODE=“0777”

Verify command (sudo /bin/bash -c “/bin/echo -e ‘E:ID_VENDOR_ID=1cf1\nE:ID_MODEL_ID=0030’ > /run/udev/data/c166:0”) success:

2 Likes

Thanks i might try that if i cant get LXC cointainer to work, also, hope google can translate it well enough for me to follow the guide :smiley:

Thanks again :+1: ill play with it tonight! ill let you know how it goes :smiley:

1 Like

If you have questions i can helping you. The point is creating a VM and keeping a eye on point 10. And just watch the screenshots in this Manual.

1 Like

So i never got it to work in the LXC container :confused: i feel like i have tried everything but somehow i must be missing something…
I gave up and installed it in a VM following the German guide, translated by google and it was surprisingly good, worked in first try.
for me the downside of running it in a VM is that it uses more resources and also more power, but for now it will have to do, maybe in the in the future ill try in a LXC container again.
Many thanks to both of you for taking the time to help!

i had the same hassel with LXC but with a VM installed headless it needs not that much more resources then the LXC Container. At least it runs super stable!

1 Like

I’ve been trying to get deCONZ to work in a Proxmox LXC as well, with no luck.
Is the conclusion that it won’t work? And if so why is this different than for the Aeotec Z-stick for Z-wave?

1 Like

There is this guide. I did not try it.

2 Likes