changed MQTT connection port from 1884 to 80

This commit is contained in:
ishak jmilou.ishak
2024-12-03 12:18:02 +01:00
parent dd2a1b56c4
commit a03894e52e

View File

@@ -12,7 +12,7 @@ def on_message(client, userdata, message):
# Create an MQTT client instance # Create an MQTT client instance
mqtt_client = mqtt.Client() mqtt_client = mqtt.Client()
mqtt_client.username_pw_set("server", "serverwachtwoordofzo") mqtt_client.username_pw_set("server", "serverwachtwoordofzo")
mqtt_client.connect("localhost", 1884, 60) mqtt_client.connect("localhost", 80, 60)
mqtt_client.loop_start() mqtt_client.loop_start()
mqtt_client.subscribe("kobuki/data") mqtt_client.subscribe("kobuki/data")
mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use