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