From eb804c888cc146a0ec10dbb595a7dbd0f3d10eee Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Wed, 20 Nov 2024 16:29:22 +0100 Subject: [PATCH] updated credentials to secure mqtt --- src/C++/Driver/src/main.cpp | 2 +- src/Python/flask/web/app.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index 4b504ba..059e8e2 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -10,7 +10,7 @@ CKobuki robot; std::string readMQTT(); void parseMQTT(std::string message); //ip, clientID, username, password -MqttClient client("mqtt://145.92.224.21:1883", "KobukiRPI", "rpi", "rpiwachtwoordofzo"); // create a client object +MqttClient client("mqtt://145.92.224.21:1884", "KobukiRPI", "rpi", "rpiwachtwoordofzo"); // create a client object std::string message = "stop"; std::string serializeKobukiData(const TKobukiData &data); void sendKobukiData(TKobukiData &data); diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index 0dda4da..60ddd63 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -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