diff --git a/bluetooth_bcm43xx/CHANGELOG.md b/bluetooth_bcm43xx/CHANGELOG.md deleted file mode 100644 index 4031576..0000000 --- a/bluetooth_bcm43xx/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -## 2.3 -- Enable PSCAN - -## 2.2 -- Fix device-tree path for Supervisor 113 - -## 2.1 -- Support new way to read `serial-number` from device-tree - -## 2.0 -- Update Firmware blobs - -## 1.1 -- Some cleanups -- Use new baudrate -- Set bluetooth mac - -## 1.0 -- Update base image diff --git a/bluetooth_bcm43xx/Dockerfile b/bluetooth_bcm43xx/Dockerfile deleted file mode 100644 index 1f28665..0000000 --- a/bluetooth_bcm43xx/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG BUILD_FROM -FROM $BUILD_FROM - -# Add env -ENV LANG C.UTF-8 - -# Setup base -RUN apk add --no-cache bluez-deprecated - -# Copy firmware -COPY firmware/* /lib/firmware/brcm/ - -# Copy data -COPY run.sh / -RUN chmod a+x /run.sh - -CMD [ "/run.sh" ] diff --git a/bluetooth_bcm43xx/config.json b/bluetooth_bcm43xx/config.json deleted file mode 100644 index 70681df..0000000 --- a/bluetooth_bcm43xx/config.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "Bluetooth BCM43xx (ResinOS)", - "version": "2.3", - "slug": "bluetooth_bcm43xx", - "description": "Activate Bluetooth for Broadcom 43xx chips for ResinOS", - "url": "https://home-assistant.io/addons/bluetooth_bcm43xx/", - "startup": "initialize", - "boot": "auto", - "host_network": true, - "devicetree": true, - "privileged": ["NET_ADMIN"], - "devices": ["/dev/ttyAMA0:/dev/ttyAMA0:rwm"], - "options": {}, - "schema": {}, - "image": "homeassistant/{arch}-addon-bluetooth_bcm43xx" -} diff --git a/bluetooth_bcm43xx/firmware/BCM43430A1.hcd b/bluetooth_bcm43xx/firmware/BCM43430A1.hcd deleted file mode 100644 index 9b087f1..0000000 Binary files a/bluetooth_bcm43xx/firmware/BCM43430A1.hcd and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/BCM4345C0.hcd b/bluetooth_bcm43xx/firmware/BCM4345C0.hcd deleted file mode 100644 index ef9c160..0000000 Binary files a/bluetooth_bcm43xx/firmware/BCM4345C0.hcd and /dev/null differ diff --git a/bluetooth_bcm43xx/logo.png b/bluetooth_bcm43xx/logo.png deleted file mode 100644 index fec1083..0000000 Binary files a/bluetooth_bcm43xx/logo.png and /dev/null differ diff --git a/bluetooth_bcm43xx/run.sh b/bluetooth_bcm43xx/run.sh deleted file mode 100644 index d309ab1..0000000 --- a/bluetooth_bcm43xx/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e - -# Read serial number -if [ -e /device-tree/serial-number ]; then - SERIAL="$(cut -c9- /device-tree/serial-number)" -else - SERIAL="$(grep Serial /proc/cpuinfo | cut -c19-)" -fi - -# Generate MAC -B1="$(echo "$SERIAL" | cut -c3-4)" -B2="$(echo "$SERIAL" | cut -c5-6)" -B3="$(echo "$SERIAL" | cut -c7-8)" -BDADDR="$(printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa)))" - -hciattach /dev/ttyAMA0 bcm43xx 921600 - "$BDADDR" -sleep 1 - -hciconfig hci0 up -hciconfig hci0 piscan - -while pgrep hciattach > /dev/null -do - sleep 600 -done diff --git a/configurator/run.sh b/configurator/run.sh index ecf15d4..8b8de13 100644 --- a/configurator/run.sh +++ b/configurator/run.sh @@ -28,17 +28,17 @@ if [ "$SSL" == "true" ]; then fi LOGLEVEL=$(jq --raw-output '.loglevel // empty' $CONFIG_PATH) -if [ ! -z "$LOGLEVEL" ]; then +if [ -n "$LOGLEVEL" ]; then export HC_LOGLEVEL=$LOGLEVEL fi SESAME=$(jq --raw-output '.sesame // empty' $CONFIG_PATH) -if [ ! -z "$SESAME" ]; then +if [ -n "$SESAME" ]; then export HC_SESAME=$SESAME fi SESAME_TOTP_SECRET=$(jq --raw-output '.sesame_totp_secret // empty' $CONFIG_PATH) -if [ ! -z "$SESAME_TOTP_SECRET" ]; then +if [ -n "$SESAME_TOTP_SECRET" ]; then export HC_SESAME_TOTP_SECRET=$SESAME_TOTP_SECRET fi diff --git a/custom_deps/run.sh b/custom_deps/run.sh index 9661b84..8fd151b 100644 --- a/custom_deps/run.sh +++ b/custom_deps/run.sh @@ -11,7 +11,7 @@ echo "[Info] Remove old deps" rm -rf /config/deps/* # Need custom apk for build? -if [ ! -z "$APK" ]; then +if [ -n "$APK" ]; then echo "[Info] Install apks for build" if ! ERROR="$(apk add --no-cache "${APK[@]}")"; then echo "[Error] Can't install packages!" diff --git a/git_pull/run.sh b/git_pull/run.sh index 53a2903..4fa7129 100644 --- a/git_pull/run.sh +++ b/git_pull/run.sh @@ -75,7 +75,7 @@ fi } function setup-user-password { -if [ ! -z "$DEPLOYMENT_USER" ]; then +if [ -n "$DEPLOYMENT_USER" ]; then cd /config || return echo "[Info] setting up credential.helper for user: ${DEPLOYMENT_USER}" git config --system credential.helper 'store --file=/tmp/git-credentials' diff --git a/snips/run.sh b/snips/run.sh index bfff54a..471b578 100644 --- a/snips/run.sh +++ b/snips/run.sh @@ -43,7 +43,7 @@ if [ "$MQTT_BRIDGE" == "true" ]; then echo "address $HOST:$PORT" } >> /etc/mosquitto.conf - if [ ! -z "$USER" ]; then + if [ -n "$USER" ]; then { echo "username $USER" echo "password $PASSWORD" diff --git a/ssh/run.sh b/ssh/run.sh index cb99a34..30d8855 100644 --- a/ssh/run.sh +++ b/ssh/run.sh @@ -11,7 +11,7 @@ PASSWORD=$(jq --raw-output ".password" $CONFIG_PATH) sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config sed -i s/#LogLevel.*/LogLevel\ DEBUG/ /etc/ssh/sshd_config -if [ ! -z "$AUTHORIZED_KEYS" ]; then +if [ -n "$AUTHORIZED_KEYS" ]; then echo "[INFO] Setup authorized_keys" mkdir -p ~/.ssh @@ -21,7 +21,7 @@ if [ ! -z "$AUTHORIZED_KEYS" ]; then chmod 600 ~/.ssh/authorized_keys sed -i s/#PasswordAuthentication.*/PasswordAuthentication\ no/ /etc/ssh/sshd_config -elif [ ! -z "$PASSWORD" ]; then +elif [ -n "$PASSWORD" ]; then echo "[INFO] Setup password login" echo "root:$PASSWORD" | chpasswd 2&> /dev/null diff --git a/tellstick/run.sh b/tellstick/run.sh index b8dd867..1250355 100644 --- a/tellstick/run.sh +++ b/tellstick/run.sh @@ -29,23 +29,23 @@ for (( i=0; i < "$DEVICES"; i++ )); do echo " name = \"$DEV_NAME\"" echo " protocol = \"$DEV_PROTO\"" - if [ ! -z "$DEV_MODEL" ]; then + if [ -n "$DEV_MODEL" ]; then echo " model = \"$DEV_MODEL\"" fi - if [ ! -z "$ATTR_HOUSE" ] || [ ! -z "$ATTR_CODE" ] || [ ! -z "$ATTR_UNIT" ] || [ ! -z "$ATTR_FADE" ]; then + if [ -n "$ATTR_HOUSE" ] || [ -n "$ATTR_CODE" ] || [ -n "$ATTR_UNIT" ] || [ -n "$ATTR_FADE" ]; then echo " parameters {" - if [ ! -z "$ATTR_HOUSE" ]; then + if [ -n "$ATTR_HOUSE" ]; then echo " house = \"$ATTR_HOUSE\"" fi - if [ ! -z "$ATTR_CODE" ]; then + if [ -n "$ATTR_CODE" ]; then echo " code = \"$ATTR_CODE\"" fi - if [ ! -z "$ATTR_UNIT" ]; then + if [ -n "$ATTR_UNIT" ]; then echo " unit = \"$ATTR_UNIT\"" fi - if [ ! -z "$ATTR_FADE" ]; then + if [ -n "$ATTR_FADE" ]; then echo " fade = \"$ATTR_FADE\"" fi