From 53a9683f0ebc06d3cd17e07a9937f5a8023e1652 Mon Sep 17 00:00:00 2001 From: Ernst Kloppenburg Date: Thu, 5 Aug 2021 09:22:18 +0200 Subject: [PATCH 1/2] remove duplicate echo of ttyACM0 in case more than one ttyACM* device is found --- start.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/start.sh b/start.sh index 9ca4adf..95a2f12 100755 --- a/start.sh +++ b/start.sh @@ -5,8 +5,6 @@ function detect_zigbee_device { usb_dev_count=$(ls -1 /dev/ttyACM* 2>/dev/null | wc -l) if [ "$usb_dev_count" -gt 1 ]; then >&2 echo "There are multiple devices connected, that could be Zigbee USB adaptors. Please check data/zigbee/configuration.yml, if the device is wrong. /dev/ttyACM0 is used as the default." - - echo "/dev/ttyACM0" fi if [ -c /dev/ttyACM0 ]; then From 7876dd0d7f5f7eee9e5d659fde75cbc479d6ab85 Mon Sep 17 00:00:00 2001 From: Ernst Kloppenburg Date: Thu, 5 Aug 2021 09:35:00 +0200 Subject: [PATCH 2/2] check for presence of dresden elektronik device (Conbee II) --- start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 95a2f12..b689be1 100755 --- a/start.sh +++ b/start.sh @@ -1,7 +1,7 @@ #!/bin/bash function detect_zigbee_device { - if usb_dev=$(lsusb -d 0451:); then + if [[ $(lsusb -d 0451:) || $(lsusb -d 1cf1:) ]]; then usb_dev_count=$(ls -1 /dev/ttyACM* 2>/dev/null | wc -l) if [ "$usb_dev_count" -gt 1 ]; then >&2 echo "There are multiple devices connected, that could be Zigbee USB adaptors. Please check data/zigbee/configuration.yml, if the device is wrong. /dev/ttyACM0 is used as the default." @@ -13,7 +13,7 @@ function detect_zigbee_device { >&2 echo "I could not find /dev/ttyACM0. Please check your hardware." fi else - >&2 echo No Texas Instruments USB device found. + >&2 echo No Texas Instruments or Dresden Elektronik USB device found. echo "False" fi