Skip to content

Commit

Permalink
Bump Theengs Gateway to v1.1.0 (#7)
Browse files Browse the repository at this point in the history
* Bump Theengs Gateway to 1.1.0

* Indentation
  • Loading branch information
1technophile authored Oct 27, 2023
1 parent c20505d commit a98dfdd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=0.9.0.1
VERSION=1.1.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==0.9.0
pip install --upgrade --extra-index-url=https://www.piwheels.org/simple pip TheengsGateway==1.1.0

COPY chroot /

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
MQTT_PRE_TOPIC: home/presence/TheengsGateway
PRESENCE: false
PUBLISH_ALL: true
PUBLISH_ADVDATA: false
TIME_BETWEEN: 60
SCAN_TIME: 60
LOG_LEVEL: DEBUG
Expand Down Expand Up @@ -98,6 +99,7 @@ docker run --rm \
-e MQTT_PRE_TOPIC=home/presence/TheengsGateway \
-e PRESENCE=false \
-e PUBLISH_ALL=true \
-e PUBLISH_ADVDATA=false \
-e TIME_BETWEEN=60 \
-e SCAN_TIME=60 \
-e LOG_LEVEL=DEBUG \
Expand Down
12 changes: 9 additions & 3 deletions chroot/opt/venv/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ if hasvalue $PUBLISH_ALL; then
fi
fi

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

if hasvalue $PRESENCE; then
if ! [[ $PRESENCE =~ (true|false) ]]; then
echo "WARNING : Wrong value for PRESENCE environment variable, will use default - false"
Expand Down Expand Up @@ -76,7 +83,6 @@ if hasvalue $LOG_LEVEL; then
fi
fi


if hasvalue $DISCOVERY; then
if ! [[ $DISCOVERY =~ (true|false) ]]; then
echo "WARNING : Wrong value for DISCOVERY environment variable, will use default - true"
Expand Down Expand Up @@ -119,7 +125,6 @@ if hasvalue $SCANNING_MODE; then
fi
fi


if hasvalue $TIME_FORMAT; then
if ! [[ $TIME_FORMAT =~ (true|false) ]]; then
echo "WARNING : Wrong value for TIME_FORMAT environment variable, will use default - false"
Expand All @@ -142,14 +147,15 @@ cat <<EOF> $CONFIG
"presence_topic": "${MQTT_PRE_TOPIC:-home/presence/TheengsGateway}",
"presence": ${PRESENCE:-false},
"publish_all": ${PUBLISH_ALL:-true},
"publish_advdata": ${PUBLISH_ADVDATA:-false},
"ble_scan_time": ${SCAN_TIME:-60},
"ble_time_between_scans": ${TIME_BETWEEN:-60},
"log_level": "${LOG_LEVEL:-DEBUG}",
"discovery": ${DISCOVERY:-true},
"hass_discovery": ${HASS_DISCOVERY:-true},
"discovery_topic": "${DISCOVERY_TOPIC:-homeassistant/sensor}",
"discovery_device_name": "${DISCOVERY_DEVICE_NAME:-TheengsGateway}",
"discovery_filter": "${DISCOVERY_FILTER:-[IBEACON,GAEN,MS-CDP]}",
"discovery_filter": "${DISCOVERY_FILTER:-[IBEACON]}",
"scanning_mode": "${SCANNING_MODE:-active}",
"adapter": "${ADAPTER:-hci0}",
"time_sync": "${TIME_SYNC:-[]}",
Expand Down
5 changes: 4 additions & 1 deletion examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ services:
MQTT_PRE_TOPIC: home/presence/TheengsGateway
PRESENCE: false
PUBLISH_ALL: true
PUBLISH_ADVDATA: false
TIME_FORMAT: false
TIME_SYNC: "[]"
TIME_BETWEEN: 60
SCAN_TIME: 5
LOG_LEVEL: DEBUG
DISCOVERY: true
HASS_DISCOVERY: true
DISCOVERY_TOPIC: homeassistant/sensor
DISCOVERY_DEVICE_NAME: TheengsGateway
DISCOVERY_FILTER: "[IBEACON,GAEN,MS-CDP]"
DISCOVERY_FILTER: "[IBEACON]"
SCANNING_MODE: active
ADAPTER: hci0
volumes:
Expand Down

0 comments on commit a98dfdd

Please sign in to comment.