Skip to content

Commit

Permalink
Bump Theengs Gateway to v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile committed Feb 19, 2024
1 parent 54cedd7 commit 8940373
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=1.3.0.1
VERSION=1.4.0.1
NON_INTERACTIVE=false
BUILDX=true
BUILDX_PURGE=false
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL ["/bin/bash", "-ec"]
RUN apt update && apt install --no-install-recommends -y bluez build-essential
RUN python3 -m venv /opt/venv && \
source /opt/venv/bin/activate && \
pip install --upgrade --extra-index-url=https://www.piwheels.org/simple pip TheengsGateway==1.3.0
pip install --upgrade --extra-index-url=https://www.piwheels.org/simple pip TheengsGateway==1.4.0

COPY chroot /
CMD source /opt/venv/bin/activate && exec /opt/venv/start.sh
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ docker run --rm \
-e MQTT_SUB_TOPIC=home/+/BTtoMQTT/undecoded \
-e MQTT_PRE_TOPIC=home/presence/TheengsGateway \
-e PRESENCE=false \
-e GENERAL_PRESENCE=false \
-e PUBLISH_ALL=true \
-e PUBLISH_ADVDATA=false \
-e TIME_BETWEEN=60 \
Expand Down
8 changes: 8 additions & 0 deletions chroot/opt/venv/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ if hasvalue $PRESENCE; then
fi
fi

if hasvalue $GENERAL_PRESENCE; then
if ! [[ $GENERAL_PRESENCE =~ (true|false) ]]; then
echo "WARNING : Wrong value for GENERAL_PRESENCE environment variable, will use default - false"
GENERAL_PRESENCE=false
fi
fi

if hasvalue $BLE; then
if ! [[ $BLE =~ (true|false) ]]; then
echo "WARNING : Wrong value for BLE environment variable, will use default - true"
Expand Down Expand Up @@ -176,6 +183,7 @@ echo "Creating config at $CONFIG ..."
"subscribe_topic": "${MQTT_SUB_TOPIC:-home/+/BTtoMQTT/undecoded}",
"presence_topic": "${MQTT_PRE_TOPIC:-home/presence/TheengsGateway}",
"presence": ${PRESENCE:-false},
"general_presence": ${GENERAL_PRESENCE:-false},
"publish_all": ${PUBLISH_ALL:-true},
"publish_advdata": ${PUBLISH_ADVDATA:-false},
"ble_scan_time": ${SCAN_TIME:-60},
Expand Down
1 change: 1 addition & 0 deletions examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
MQTT_SUB_TOPIC: home/+/BTtoMQTT/undecoded
MQTT_PRE_TOPIC: home/presence/TheengsGateway
PRESENCE: false
GENERAL_PRESENCE: false
PUBLISH_ALL: true
PUBLISH_ADVDATA: false
TIME_FORMAT: false
Expand Down

0 comments on commit 8940373

Please sign in to comment.