Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
paho-mqtt~=1.6.1
paho-mqtt>=2.0.0
pymodbus==3.0.2
watchdog~=2.1.9
pyModbusTCP
Expand Down
4 changes: 3 additions & 1 deletion tedge_modbus/reader/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ def connect_to_tedge(self):
broker = self.base_config["thinedge"]["mqtthost"]
port = self.base_config["thinedge"]["mqttport"]
client_id = "modbus-client"
client = mqtt_client.Client(client_id)
client = mqtt_client.Client(
mqtt_client.CallbackAPIVersion.VERSION1, client_id
)
client.connect(broker, port)
self.logger.debug("Connected to MQTTT broker at %s:%d", broker, port)
return client
Expand Down