Tak wygląda compose.yml na którym odpalam brokera mqtt, ha oraz zigbee2mqtt:
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /opt/homeassistant/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
devices:
- /dev/ttyUSB0
privileged: true
network_mode: host
mqtt:
image: eclipse-mosquitto:2.0
restart: unless-stopped
volumes:
- "/opt/homeassistant/mosquitto:/mosquitto"
ports:
- "1883:1883"
- "9001:9001"
# MQTT server authentication, uncomment if required:
#user: <mqtt_user>
#password: <mqtt_pass>
command: "mosquitto -c /mosquitto-no-auth.conf"
zigbee2mqtt:
container_name: zigbee2mqtt
restart: unless-stopped
image: koenkk/zigbee2mqtt
volumes:
- /opt/homeassistant/zigbee2mqtt/data:/app/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
environment:
- TZ=Europe/Berlin
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
Tak logi z uruchomienia:
neo@syon:/opt/homeassistant $ docker compose up -d && docker compose logs -f
[+] Running 4/4
✔ Network homeassistant_default Created 0.1s
✔ Container homeassistant-mqtt-1 Started 1.1s
✔ Container homeassistant Started 0.5s
✔ Container zigbee2mqtt Started 1.1s
zigbee2mqtt | Using '/app/data' as data directory
mqtt-1 | 1719743771: mosquitto version 2.0.18 starting
mqtt-1 | 1719743771: Config loaded from /mosquitto-no-auth.conf.
mqtt-1 | 1719743771: Opening ipv4 listen socket on port 1883.
mqtt-1 | 1719743771: Opening ipv6 listen socket on port 1883.
mqtt-1 | 1719743771: mosquitto version 2.0.18 running
homeassistant | s6-rc: info: service s6rc-oneshot-runner: starting
homeassistant | s6-rc: info: service s6rc-oneshot-runner successfully started
homeassistant | s6-rc: info: service fix-attrs: starting
homeassistant | s6-rc: info: service fix-attrs successfully started
homeassistant | s6-rc: info: service legacy-cont-init: starting
homeassistant | s6-rc: info: service legacy-cont-init successfully started
homeassistant | s6-rc: info: service legacy-services: starting
homeassistant | services-up: info: copying legacy longrun home-assistant (no readiness notification)
homeassistant | s6-rc: info: service legacy-services successfully started
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: Logging to console, file (filename: log.log)
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: Starting Zigbee2MQTT version 1.38.0 (commit #fe048e6)
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: Starting zigbee-herdsman (0.49.2)
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: zigbee-herdsman started (resumed)
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":78,"product":0,"revision":"0x264e0900","transportrev":0},"type":"ConBee3"}'
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: Currently 0 devices are joined:
zigbee2mqtt | [2024-06-30 12:36:14] warning: z2m: `permit_join` set to `true` in configuration.yaml.
zigbee2mqtt | [2024-06-30 12:36:14] warning: z2m: Allowing new devices to join.
zigbee2mqtt | [2024-06-30 12:36:14] warning: z2m: Set `permit_join` to `false` once you joined all devices.
zigbee2mqtt | [2024-06-30 12:36:14] info: z2m: Zigbee: allowing new devices to join.
homeassistant | 2024-06-30 12:36:16.389 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m:mqtt: Connecting to MQTT server at mqtt://192.168.0.192:1883
mqtt-1 | 1719743776: New connection from 172.21.0.1:58476 on port 1883.
mqtt-1 | 1719743776: New client connected from 172.21.0.1:58476 as mqttjs_c9671e3c (p2, c1, k60).
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m:mqtt: Connected to MQTT server
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m: Started frontend on port 8080
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"fe048e6","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":78,"product":0,"revision":"0x264e0900","transportrev":0},"type":"ConBee3"},"log_level":"info","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.38.0"}'
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
zigbee2mqtt | [2024-06-30 12:36:16] info: z2m: Zigbee2MQTT started!
mqtt-1 | 1719743779: New connection from 192.168.0.192:45465 on port 1883.
mqtt-1 | 1719743779: New client connected from 192.168.0.192:45465 as 1raQbRlkbDdQk8rSSHYzzv (p2, c1, k60).
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/binary_sensor/1221051039810110150109113116116_0x00212effff0e4640/connection_state/config', payload '{"device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"device_class":"connectivity","entity_category":"diagnostic","name":"Connection state","object_id":"zigbee2mqtt_bridge_connection_state","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"payload_off":"offline","payload_on":"online","state_topic":"zigbee2mqtt/bridge/state","unique_id":"bridge_0x00212effff0e4640_connection_state_zigbee2mqtt","value_template":"{{ value }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/binary_sensor/1221051039810110150109113116116_0x00212effff0e4640/restart_required/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"device_class":"problem","enabled_by_default":false,"entity_category":"diagnostic","name":"Restart required","object_id":"zigbee2mqtt_bridge_restart_required","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/bridge/info","unique_id":"bridge_0x00212effff0e4640_restart_required_zigbee2mqtt","value_template":"{{ value_json.restart_required }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/button/1221051039810110150109113116116_0x00212effff0e4640/restart/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","command_topic":"zigbee2mqtt/bridge/request/restart","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"device_class":"restart","name":"Restart","object_id":"zigbee2mqtt_bridge_restart","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"payload_press":"","unique_id":"bridge_0x00212effff0e4640_restart_zigbee2mqtt"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/select/1221051039810110150109113116116_0x00212effff0e4640/log_level/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","command_template":"{\"options\": {\"advanced\": {\"log_level\": \"{{ value }}\" } } }","command_topic":"zigbee2mqtt/bridge/request/options","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"entity_category":"config","name":"Log level","object_id":"zigbee2mqtt_bridge_log_level","options":["error","warning","info","debug"],"origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/bridge/info","unique_id":"bridge_0x00212effff0e4640_log_level_zigbee2mqtt","value_template":"{{ value_json.log_level | lower }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/sensor/1221051039810110150109113116116_0x00212effff0e4640/version/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"entity_category":"diagnostic","icon":"mdi:zigbee","name":"Version","object_id":"zigbee2mqtt_bridge_version","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/bridge/info","unique_id":"bridge_0x00212effff0e4640_version_zigbee2mqtt","value_template":"{{ value_json.version }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/sensor/1221051039810110150109113116116_0x00212effff0e4640/coordinator_version/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:chip","name":"Coordinator version","object_id":"zigbee2mqtt_bridge_coordinator_version","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/bridge/info","unique_id":"bridge_0x00212effff0e4640_coordinator_version_zigbee2mqtt","value_template":"{{ value_json.coordinator.meta.revision }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: undefined: MQTT publish: topic 'homeassistant/sensor/1221051039810110150109113116116_0x00212effff0e4640/network_map/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"enabled_by_default":false,"entity_category":"diagnostic","json_attributes_template":"{{ value_json.data.value | tojson }}","json_attributes_topic":"zigbee2mqtt/bridge/response/networkmap","name":"Network map","object_id":"zigbee2mqtt_bridge_network_map","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/bridge/response/networkmap","unique_id":"bridge_0x00212effff0e4640_network_map_zigbee2mqtt","value_template":"{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/sensor/1221051039810110150109113116116_0x00212effff0e4640/permit_join_timeout/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"device_class":"duration","entity_category":"diagnostic","name":"Permit join timeout","object_id":"zigbee2mqtt_bridge_permit_join_timeout","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/bridge/info","unique_id":"bridge_0x00212effff0e4640_permit_join_timeout_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ iif(value_json.permit_join_timeout is defined, value_json.permit_join_timeout, None) }}"}'
zigbee2mqtt | [2024-06-30 12:36:21] info: z2m:mqtt: MQTT publish: topic 'homeassistant/switch/1221051039810110150109113116116_0x00212effff0e4640/permit_join/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"availability_mode":"all","command_topic":"zigbee2mqtt/bridge/request/permit_join","device":{"hw_version":"ConBee3 0x264e0900","identifiers":["zigbee2mqtt_bridge_0x00212effff0e4640"],"manufacturer":"Zigbee2MQTT","model":"Bridge","name":"Zigbee2MQTT Bridge","sw_version":"1.38.0"},"icon":"mdi:human-greeting-proximity","name":"Permit join","object_id":"zigbee2mqtt_bridge_permit_join","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"payload_off":"false","payload_on":"true","state_topic":"zigbee2mqtt/bridge/info","unique_id":"bridge_0x00212effff0e4640_permit_join_zigbee2mqtt","value_template":"{{ value_json.permit_join | lower }}"}'
A tutaj zdjęcie RPi: