de260eec62
Captures everything needed to rebuild the stack from scratch: infra/compose.yaml - mosquitto (eclipse-mosquitto:latest) - zigbee2mqtt (ghcr.io/pine64/zigbee2mqtt:latest-dev, BLZ fork) - nodered (nodered/node-red:latest) infra/mosquitto/config/mosquitto.conf - anonymous listener on 1883, file logging, persistence on infra/zigbee2mqtt/ - configuration.yaml: 5 paired devices with friendly names, 1 group - coordinator_backup.json: zigbee network key + pan id (recovery) - state.json: per-device persisted state (ON/OFF, linkquality) infra/nodered/ - settings.js: nodered defaults (flowFile: flows.json, no auth) - start.sh: patches Dashboard 2.0 SPA with <base href> at startup Also: - Updated z2m groups section to rename Laser & Fog -> DJ Booth (matches the friendly_name already in devices section) - Pushed the same change to live /root/zigbee2mqtt/configuration.yaml and restarted the zigbee2mqtt container - .gitignore: output/ (regenerated on every build, churns uuid ids) - README.md: link to infra/README.md for rebuild procedure
infra/
Full stack configuration as deployed on the RPi 3B+ at 192.168.81.147.
Layout on host
/root/
├── compose.yaml → infra/compose.yaml
├── mosquitto/config/mosquitto.conf → infra/mosquitto/config/mosquitto.conf
├── zigbee2mqtt/ → infra/zigbee2mqtt/
│ ├── configuration.yaml # device pairings + friendly names + groups
│ ├── coordinator_backup.json # zigbee network key + pan id (recovery)
│ └── state.json # per-device persisted state (ON/OFF, etc.)
└── nodered/ → bind-mount for nodered container's /data
├── flows.json → generated from ../flows/zigbee-monitor.yaml
├── settings.js → infra/nodered/settings.js
└── start.sh → infra/nodered/start.sh (patches Dashboard SPA)
Rebuild procedure from a fresh host
- Install Docker,
docker compose. - Clone this repo,
cd infra. mkdir -p mosquitto/data mosquitto/log(empty dirs for the volume mounts).docker compose up -d.- Pair zigbee devices (IEEE addresses in
zigbee2mqtt/configuration.yamlwill be wrong; re-pair or use the existingcoordinator_backup.jsonto rejoin the same network). just deployfrom the repo root to push the Node-RED flow.
Files that drift at runtime
nodered/flows.json— managed by the generator, do not hand-edit.nodered/node_modules/@flowfuse/node-red-dashboard/dist/index.html— patched bystart.shat every container start; survives reboots, lost ondocker compose down -v.mosquitto/data/— broker persistence, transient.zigbee2mqtt/database.db— sqlite, transient (regenerated fromconfiguration.yaml+coordinator_backup.json).zigbee2mqtt/state.json— committed so device ON/OFF state survives full rebuilds.