diff --git a/README.md b/README.md index 169e968..2a78aac 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
-
+
diff --git a/app/build.sh b/app/build.sh
index 25c5547..bb89cfa 100755
--- a/app/build.sh
+++ b/app/build.sh
@@ -11,6 +11,7 @@
set -e
BUILD_DATE=$(date -Iminutes)
+BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION=$(git describe --tags --abbrev=0)
VERSION="${VERSION:1}"
arr=(${VERSION//./ })
@@ -19,7 +20,7 @@ IMAGE=tsun-gen3-proxy
if [[ $1 == dev ]] || [[ $1 == rc ]] ;then
IMAGE=docker.io/sallius/${IMAGE}
-VERSION=${VERSION}-$1
+VERSION=${VERSION}-$1-${BRANCH}
elif [[ $1 == rel ]];then
IMAGE=ghcr.io/s-allius/${IMAGE}
else
diff --git a/app/requirements.txt b/app/requirements.txt
index fd06d2f..7558187 100644
--- a/app/requirements.txt
+++ b/app/requirements.txt
@@ -1,3 +1,3 @@
- aiomqtt==1.2.1
+ aiomqtt==2.0.0
schema==0.7.5
aiocron==1.8
\ No newline at end of file
diff --git a/app/src/mqtt.py b/app/src/mqtt.py
index 413daf4..7ada981 100644
--- a/app/src/mqtt.py
+++ b/app/src/mqtt.py
@@ -73,17 +73,17 @@ class Mqtt(metaclass=Singleton):
if self.cb_MqttIsUp:
await self.cb_MqttIsUp()
- async with self.__client.messages() as messages:
- await self.__client.subscribe(
- f"{ha['auto_conf_prefix']}"
- "/status")
- async for message in messages:
- status = message.payload.decode("UTF-8")
- logger_mqtt.info('Home-Assistant Status:'
- f' {status}')
- if status == 'online':
- self.ha_restarts += 1
- await self.cb_MqttIsUp()
+ # async with self.__client.messages() as messages:
+ await self.__client.subscribe(
+ f"{ha['auto_conf_prefix']}"
+ "/status")
+ async for message in self.__client.messages:
+ status = message.payload.decode("UTF-8")
+ logger_mqtt.info('Home-Assistant Status:'
+ f' {status}')
+ if status == 'online':
+ self.ha_restarts += 1
+ await self.cb_MqttIsUp()
except aiomqtt.MqttError:
logger_mqtt.info(f"Connection lost; Reconnecting in {interval}"