Hello all,
Sorry in advance if I am missing some concepts (read and watched lots of videos but I might be wrong).
[EDIT] I try to run a stack from portainer in a Proxmox VM, Ubuntu 22.04.5 server.
For a new install, I can't get zigbee2mqtt to read the config file properly. I have no error in the container log except that it can't connect to "mqtt://localhost", which is not my setup.
I have the same effect with Mosquitto, but here with an error in the log.
See mosquitto log:
See z2m log:
I created folders and config files in the VM space:
Here the content of the config:
and
Here the content of the config:
Here is the docker compose run as stack:
and here the VM config:
Thanks in advance!!
Sorry in advance if I am missing some concepts (read and watched lots of videos but I might be wrong).
[EDIT] I try to run a stack from portainer in a Proxmox VM, Ubuntu 22.04.5 server.
For a new install, I can't get zigbee2mqtt to read the config file properly. I have no error in the container log except that it can't connect to "mqtt://localhost", which is not my setup.
I have the same effect with Mosquitto, but here with an error in the log.
See mosquitto log:
Code:
1737460259: Error: Unable to open config file /mosquitto/config/mosquitto.conf.
See z2m log:
Code:
[2025-01-21 12:53:10] info: z2m: Connecting to MQTT server at mqtt://localhost
[2025-01-21 12:53:10] error: z2m: MQTT failed to connect, exiting... ()
I created folders and config files in the VM space:
Here the content of the config:
Bash:
listener 1883
listener 9001
protocol websockets
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
allow_anonymous true
and
Here the content of the config:
YAML:
# Indicates the configuration version (used by configuration migrations)
version: 4
# Home Assistant integration (MQTT discovery)
homeassistant:
enabled: true
permit_join: true
# Enable the frontend, runs on port 8080 by default
frontend:
enabled: true
port: 8080
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://172.18.0.3'
# MQTT server authentication, uncomment if required:
user: USER
password: PSSWD
# Serial settings
serial:
port: /dev/ttyUSB0
# Periodically check whether devices are online/offline
# availability:
# enabled: false
# Advanced settings
advanced:
# channel: 11
# Let Zigbee2MQTT generate a network key on first start
network_key: GENERATE
# Let Zigbee2MQTT generate a pan_id on first start
pan_id: GENERATE
# Let Zigbee2MQTT generate a ext_pan_id on first start
ext_pan_id: GENERATE
Here is the docker compose run as stack:
YAML:
services:
mosquitto:
image: eclipse-mosquitto
container_name: mosquitto
restart: unless-stopped
volumes:
- $PWD/mosquitto/config:/mosquitto/config
- $PWD/mosquitto/data:/mosquitto/data
- $PWD/mosquitto/log:/mosquitto/log
ports:
- 1883:1883
- 9001:9001
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt:latest
restart: unless-stopped
volumes:
- $PWD/zigbee2mqtt/app/data:/zigbee2mqtt/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
environment:
- TZ=Europe/Paris
devices:
- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_504fbf9860a4ed11bed084582981d5c7-if00-port0:/dev/ttyUSB0
logging:
driver: json-file
options:
max-file: 5
max-size: 10m
and here the VM config:
Bash:
root@myhomelab:~# qm config 121
boot: order=scsi0;ide2;net0
cores: 1
cpu: host
ide2: local:iso/ubuntu_22.04.5_live-server-amd64.iso,media=cdrom,size=2086842K
memory: 2048
meta: creation-qemu=9.0.2,ctime=1736982981
name: full-ha
net0: virtio=BC:24:11:C2:3B:34,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-121-disk-0,discard=on,iothread=1,size=64G
scsihw: virtio-scsi-single
smbios1: uuid=df6413ad-5f04-49a3-9cd8-68a62885d072
sockets: 1
tags: cpu-host;portainer;ubuntu-server
usb0: host=10c4:ea60
vmgenid: b06442be-5b75-488c-b66d-95e3182ed00d
Thanks in advance!!
Last edited: