diff --git a/.env b/.env index 9ea74c3..c7ac6c4 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -VERSION=1.3.0.1 +VERSION=1.4.0.1 NON_INTERACTIVE=false BUILDX=true BUILDX_PURGE=false diff --git a/Dockerfile b/Dockerfile index 01d5700..f229a2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 82801fd..01b4b3f 100644 --- a/README.md +++ b/README.md @@ -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 \ diff --git a/chroot/opt/venv/start.sh b/chroot/opt/venv/start.sh index cdab040..ef01872 100755 --- a/chroot/opt/venv/start.sh +++ b/chroot/opt/venv/start.sh @@ -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" @@ -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}, diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index 27386bb..d7fae3e 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -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