CT Z2mqtt: Updated zigbee2mqtt install methode

This commit is contained in:
2025-01-09 19:11:23 +01:00
parent 0489103d06
commit a25b2ab81f
4 changed files with 12 additions and 36 deletions

View File

@@ -344,7 +344,7 @@ files:
variants: variants:
- mqtt - mqtt
#FileForMqtt #FileForHass
- path: /opt/Setup - path: /opt/Setup
generator: copy generator: copy
source: CT-Files/hass source: CT-Files/hass
@@ -508,31 +508,6 @@ packages:
variants: variants:
- mqtt - mqtt
#PKGS for Hass
- packages:
- git
- python3
- py3-virtualenv
- py3-pip
- python3-dev
- ca-certificates
- libffi-dev
- openssl-dev
- nmap
- iputils
- build-base
- tzdata
- sudo
- jpeg-dev
- zlib-dev
- bash
- mariadb-dev
- eudev-dev
- ffmpeg-dev
- ffmpeg
action: install
variants:
- hass
#PKGS for MailBackup #PKGS for MailBackup
- packages: - packages:

View File

@@ -8,7 +8,7 @@ adduser -h /opt/HomeAssistant/data -D -G hass -s /bin/sh hass
chown -R hass:hass /opt/HomeAssistant chown -R hass:hass /opt/HomeAssistant
sudo -u hass python3 -m venv /opt/HomeAssistant/srv sudo -u hass python3 -m venv /opt/HomeAssistant/srv
sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel mysqlclient && pip3 install homeassistant' sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel isal zlib-ng mysqlclient && pip3 install homeassistant'
#Install Home Assistant Community Store #Install Home Assistant Community Store
wget https://github.com/hacs/integration/releases/latest/download/hacs.zip -O /tmp/hacs.zip wget https://github.com/hacs/integration/releases/latest/download/hacs.zip -O /tmp/hacs.zip

View File

@@ -1,14 +1,15 @@
#!/bin/ash #!/bin/ash
npm install -g pnpm
#Run folowing commands as 'node' user #Run folowing commands as 'node' user
sudo -u node ash << EOF sudo -u node ash << EOF
#Install zigbee2mqtt #Install zigbee2mqtt
git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/node/zigbee2mqtt git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/node/zigbee2mqtt
npm --prefix /opt/node/zigbee2mqtt ci pnpm -C /opt/node/zigbee2mqtt i --frozen-lockfile
npm --prefix /opt/node/zigbee2mqtt run build pnpm -C /opt/node/zigbee2mqtt run build
##Update config ##Update config
sed -i -e '/port:/c\ port: \/dev\/ttyACM-Zigbee' /opt/node/zigbee2mqtt/data/configuration.yaml cp /opt/node/zigbee2mqtt/data/configuration.example.yaml /opt/node/zigbee2mqtt/data/configuration.yaml
printf "frontend:\n port: 5002" >> /opt/node/zigbee2mqtt/data/configuration.yaml sed -i -e '/# port:/c\# port: \/dev\/ttyACM-Zigbee' /opt/node/zigbee2mqtt/data/configuration.yaml
#Install Z-Wave JS UI #Install Z-Wave JS UI
git clone https://github.com/zwave-js/zwave-js-ui /opt/node/ZwaveJsUi git clone https://github.com/zwave-js/zwave-js-ui /opt/node/ZwaveJsUi
@@ -17,7 +18,7 @@ npm --prefix /opt/node/ZwaveJsUi run build
#Save PM2 statup config #Save PM2 statup config
pm2 install pm2-logrotate pm2 install pm2-logrotate
pm2 start npm --name zigbee2mqtt --cwd /opt/node/zigbee2mqtt -- start pm2 start pnpm --name zigbee2mqtt --cwd /opt/node/zigbee2mqtt -- start
pm2 start npm --name ZwaveJsUi --cwd /opt/node/ZwaveJsUi -- start pm2 start npm --name ZwaveJsUi --cwd /opt/node/ZwaveJsUi -- start
pm2 save pm2 save
pm2 kill pm2 kill

View File

@@ -47,8 +47,8 @@ This can be done on a privileged Debian CT (make sure to enable the Fuse, Nestin
| nodejs | Alpine | Basic nodejs install with pm2 | | nodejs | Alpine | Basic nodejs install with pm2 |
| nextcloud | Alpine | Nextcloud | | nextcloud | Alpine | Nextcloud |
| mqtt | Alpine | Mosquitto mqtt broker | | mqtt | Alpine | Mosquitto mqtt broker |
| hass `(Broken, Requires python 3.12)` | Alpine | HomeAssistant instance with HACS and mysql support | | hass `(Broken, Requires python 3.13)` | Alpine | HomeAssistant instance with HACS and mysql support |
| mailbackup `(Broken, Requires python 3.12)` | Alpine | Contains mail archive tools (MailBackup-sys) | | mailbackup | Alpine | Contains mail archive tools (MailBackup-sys) |
| heimdall | Alpine | Heimdall, A application dashboard/launcher | | heimdall | Alpine | Heimdall, A application dashboard/launcher |
| vouchproxy | Alpine | Vouch-proxy, A SSO solution for Nginx | | vouchproxy | Alpine | Vouch-proxy, A SSO solution for Nginx |
| freshrss | Alpine | FreshRSS, a self-hosted RSS feed aggregator | | freshrss | Alpine | FreshRSS, a self-hosted RSS feed aggregator |
@@ -204,7 +204,7 @@ lxc.cgroup2.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/ttyACM-Zigbee dev/ttyACM-Zigbee none bind,optional,create=file lxc.mount.entry: /dev/ttyACM-Zigbee dev/ttyACM-Zigbee none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=file lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=file
``` ```
* Zigbee2mqtt Available on http://`<ip>`:5002 * Zigbee2mqtt Available on http://`<ip>`:8080
* Z-wave JS UI Available on http://`<ip>`:8091 * Z-wave JS UI Available on http://`<ip>`:8091
* in the Z-wave JS UI web ui set the Zwave serial port to /dev/ttyACM-Zwave * in the Z-wave JS UI web ui set the Zwave serial port to /dev/ttyACM-Zwave
* If a `Cannot lock port` error shows, please reboot the CT, if that does not fix it try rebooting the Proxmox server * If a `Cannot lock port` error shows, please reboot the CT, if that does not fix it try rebooting the Proxmox server