From 4bd59c1430cf4ececb6cb244fa0bacaa03d13a91 Mon Sep 17 00:00:00 2001 From: "molpie@raspberrypi3" Date: Thu, 13 Jun 2024 18:18:07 +0200 Subject: [PATCH] update from raspberrypi3 --- Dockerfile | 2 +- sms2mqtt.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1050fd8..41a64d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.18 +FROM python:3.12-alpine3.19 RUN apk add --no-cache gammu-dev tzdata diff --git a/sms2mqtt.py b/sms2mqtt.py index 07cdeb0..e11d13c 100644 --- a/sms2mqtt.py +++ b/sms2mqtt.py @@ -254,7 +254,9 @@ def shutdown(signum=None, frame=None): logging.info('Gammu initialized') - client = mqtt.Client(mqttclientid) + # https://stackoverflow.com/a/77985329 + # client = mqtt.Client(mqttclientid) + client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, mqttclientid) client.username_pw_set(mqttuser, mqttpassword) client.on_connect = on_mqtt_connect client.on_disconnect = on_mqtt_disconnect