updated credentials to secure mqtt

This commit is contained in:
2024-11-20 16:29:22 +01:00
parent a028a6f88f
commit eb804c888c
2 changed files with 3 additions and 3 deletions

View File

@@ -9,8 +9,8 @@ def on_message(client, userdata, message):
# Create an MQTT client instance
mqtt_client = mqtt.Client()
mqtt_client.username_pw_set("ishak", "kobuki")
mqtt_client.connect("localhost", 1883, 60)
mqtt_client.username_pw_set("server", "serverwachtwoordofzo")
mqtt_client.connect("localhost", 1884, 60)
mqtt_client.loop_start()
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