To Proxmox or not to Proxmox

Yes. Itโ€™s detected in HAOS

iโ€™m having problem with sonoff 3.0 dongle too. i flashed it with new firmware and done everything. the key seem to work since it generate pan_id and network key. but frontend is not coming up

cat /opt/zigbee2mqtt/data/log/ to the latest file and see what it tells you

iโ€™m trying to lear this language but itโ€™s too difficult, but i arrived to this

you can try rm -f /opt/zigbee2mqtt/data/coordinator_backup.json

When starting Zigbee2MQTT if you

cd /opt/zigbee2mqtt
npm start

It will show you the errors

the only way to solve was to install a new lxc and make all again. but with your script this was very fast to do

1 Like

The auto script didnโ€™t work for me, Iโ€™m using this to passthrough USB and GPU to my Docker LXC, and it works fine (if you only need USB, just use the first 2 lines):

lxc.mount.entry: /dev/bus/usb/ dev/bus/usb/ none bind,optional,create=dir 0,0
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.apparmor.profile: unconfined
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.mount.auto: cgroup:rw
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0

Pay attention to the second part of the mount entry, thereโ€™s no initial slash: dev/bus/usb/, itโ€™s a common mistake that many do the first time they configure this.

The 189:* is also dependent on the specific device, you should check if 189 is correct in your case by doing this on the proxmox host shell:

Enumerate USB devices:

root@pve1:~# lsusb
Bus 002 Device 003: ID 18d1:9302 Google Inc.
Bus 002 Device 002: ID 2109:0815 VIA Labs, Inc. USB3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0764:0601 Cyber Power System, Inc. PR1500LCDRT2U UPS
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 001 Device 002: ID 2109:2815 VIA Labs, Inc. USB2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I want to passthrough my UPS, so I check details of it in the usb chain:

root@pve1:~# ll /dev/bus/usb/001/003
crw-rw-r-- 1 root nut 189, 2 Feb  7 16:47 /dev/bus/usb/001/003
root@pve1:~#

You see the number 189? Thatโ€™s what you need in the .conf. Typically, for USB I always saw 189 in my homelab servers.

In that Docker LXC Iโ€™m using 16 containers, one of which is Home Assistant, that is reading via host usb the Zigbee controller, the Z-Wave controller, etc.

Hope it works for youโ€ฆ

1 Like

Starting to trickle out unprivileged scripts
Proxmox Helper Scripts | Proxmox Scripts For Home Automation

1 Like

Hi, I run the script for Adguard in my Proxmox setup, it installed with error:

Using Unprivileged Install
Using Automatic Login
Using Automatic DHCP
[INFO] Using local for Template Storage.
[INFO] Using local-lvm for Container Storage.
Updating LXC Template Listโ€ฆ :heavy_check_mark:
Creating LXC Containerโ€ฆ :heavy_check_mark:
[INFO] LXC Container 102 was successfully created.
Starting LXC Containerโ€ฆ :heavy_check_mark:
Setting up Container OSโ€ฆ :heavy_check_mark:
Network Connected: 192.168.1.72 :heavy_check_mark:
Updating Container OSโ€ฆ :heavy_check_mark:
Installing Dependenciesโ€ฆ [ERROR:LXC] 100@58 Unknown failure occured.
root@pve:~#

[ERROR:LXC] 100@58 Unknown failure occured.

Donโ€™t see how much could go wrong with Installing Dependencies

echo -en "${GN} Installing Dependencies... "
apt-get install -y curl &>/dev/null
apt-get install -y sudo &>/dev/null
echo -e "${CM}${CL} \r"

Thatโ€™s it :man_shrugging:

Hi, I install MotionEye VMS LXC in my Proxmox, but MotionEye does not see my usb camera. How to forward a camera to an LXC container?

Try usb-passthrough.sh in misc
Read Home Assistant Container LXC for instructions

I run usb-passthrough.sh and reboot LXC, LXC not run with errors:

run_buffer: 321 Script exited with status 1
lxc_setup: 4398 Failed to run autodev hooks
do_start: 1274 Failed to setup container โ€œ102โ€
sync_wait: 34 An error occurred in another process (expected sequence number 4)
__lxc_start: 2068 Failed to spawn container โ€œ102โ€
TASK ERROR: startup for container โ€˜102โ€™ failed

Run in the Proxmox Shell. Not the LXC console.
Also, the LXC must be Privileged to use device passthrough

If you ran the script on a Unprivileged LXC, run nano /etc/pve/lxc/102.conf in the Proxmox shell, and remove everything below unprivileged: 1

Or, remove the MotionEye unprivileged LXC and reinstall it privileged

Yes, my old LXC was unprivileged. I reinstalled LXC in privileged mode. After running the usb-passthrough.sh script in the Proxmox shell, LXC starts normally, but still the USB camera is not visible.

So I went the full VM and LXC approach, putting each of the things (mariadb, zwavejs2mqtt, zigbee2mqtt, node-red, etc) in their own LXC, running Hassio in a VM.

My question is for people that have gone this route, what did you do for checking for updates to the various other items (mariadb, zwave, etc)? Are there any good scripts? Can any of them be integrated in to Home Assistant to have entities showing if something doesnโ€™t match the latest version?

Is there an easy way to install Samba on the Home Assistant LXC? Iโ€™ve started moving add-ons such as Adguard and NodeRed over to LXCs using @tteck 's scripts, but Iโ€™d really miss the Samba add-on which allows me to use Visual Studio from any PC on my network.

Thanks for a great bunch of useful scripts @tteck !

+1
I am nearly so far I will jump ship to running my own HA LXC, and manually add other containers/plugins.
only Samba is nice and easy. the entire folder structure at your fingertips and browse to it to edit any file.
but I myself am a little bit stumbling on this as well. needs some more love from me to figure out.

If you have a good tip in this, please let me know :slight_smile: :smiley:

off-topic:
just to note.
If you run adguard as DNS server, and your proxmox server is down for some reason, you might endup with a homenetwork with devices that cannot see eachother. I had this once or twice. not good for the WAF.

I solved (read: I wanted a new toy) this by buying a unifi UDMpro*. This router is solid and linux based. I am running Adguard on there in a podman container. Has been stable since I bought it. sticks after updates+reboots.

. * no, I dont own unifi shares :face_with_hand_over_mouth: