Skip to content

Commit

Permalink
Update due to new version of Paho-mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
graham22 committed Mar 24, 2024
1 parent d988dfd commit f9880ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/Python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM python:3.7.6-slim-stretch
FROM python:3.9.19-slim

RUN pip install --no-cache-dir pymodbus paho-mqtt

ADD classic_mqtt.py /
ADD support/*.py support/

ENTRYPOINT ["python3", "classic_mqtt.py"]
ENTRYPOINT ["python3", "classic_mqtt.py"]
2 changes: 1 addition & 1 deletion code/Python/classic_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def run(argv):
#setup the MQTT Client for publishing and subscribing
clientId = argumentValues['mqttUser'] + "_mqttclient_" + str(randint(100, 999))
log.info("Connecting with clientId=" + clientId)
mqttClient = mqttclient.Client(clientId)
mqttClient = mqttclient.Client(mqttclient.CallbackAPIVersion.VERSION1, clientId)
mqttClient.username_pw_set(argumentValues['mqttUser'], password=argumentValues['mqttPassword'])
mqttClient.on_connect = on_connect
mqttClient.on_disconnect = on_disconnect
Expand Down

0 comments on commit f9880ad

Please sign in to comment.