From ddee903c81caef64a54ae6040c985a07babacb9f Mon Sep 17 00:00:00 2001 From: Phill Kelley <34226495+Paraphraser@users.noreply.github.com> Date: Tue, 16 May 2023 16:01:13 +1000 Subject: [PATCH] 2023-05-16 Zigbee2MQTT adaptation to expected kernel change - old-menu branch - PR 2 of 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Background: - #690 – Kernel update may remove /dev/ttyAMA0 Changes: 1. Adopts generic syntax for device specification to prompt user to add the relevant key (`ZIGBEE2MQTT_DEVICE_PATH`) and path (eg `/dev/ttyUSB0`) to `.env`. Example: ``` $ echo ZIGBEE2MQTT_DEVICE_PATH=/dev/ttyUSB0 >>~/IOTstack/.env ``` 2. Adopts `TZ=${TZ:-Etc/UTC}` 3. Adds (disabled) environment variable to enable debugging. Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com> --- .templates/zigbee2mqtt/service.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.templates/zigbee2mqtt/service.yml b/.templates/zigbee2mqtt/service.yml index 40e83a647..a2193f5d9 100644 --- a/.templates/zigbee2mqtt/service.yml +++ b/.templates/zigbee2mqtt/service.yml @@ -2,16 +2,17 @@ container_name: zigbee2mqtt image: koenkk/zigbee2mqtt:latest environment: - - TZ=Etc/UTC + - TZ=${TZ:-Etc/UTC} - ZIGBEE2MQTT_CONFIG_MQTT_SERVER=mqtt://mosquitto:1883 - ZIGBEE2MQTT_CONFIG_FRONTEND=true - ZIGBEE2MQTT_CONFIG_ADVANCED_LOG_SYMLINK_CURRENT=true + # - DEBUG=zigbee-herdsman* ports: - "8080:8080" volumes: - ./volumes/zigbee2mqtt/data:/app/data devices: - - /dev/ttyAMA0:/dev/ttyACM0 + - "${ZIGBEE2MQTT_DEVICE_PATH:?eg echo ZIGBEE2MQTT_DEVICE_PATH=/dev/ttyACM0 >>~/IOTstack/.env}:/dev/ttyACM0" restart: unless-stopped depends_on: - mosquitto