mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
Update MQTT version to 3.1.1 and change address to use SSL
- In main.cpp, update the MQTT version to 3.1.1 and change the address to use SSL instead of TCP. - In app.py, create a new MQTT client using MQTTv311 protocol.
This commit is contained in:
@@ -22,7 +22,7 @@ int main() {
|
||||
connOpts.set_clean_session(true);
|
||||
connOpts.set_user_name("ishak");
|
||||
connOpts.set_password("kobuki");
|
||||
connOpts.set_mqtt_version(MQTTVERSION_5); // Stel de MQTT-versie in (bijv. MQTT 5.0)
|
||||
connOpts.set_mqtt_version(MQTTVERSION_3_1_1); // Voor MQTT 3.1.1
|
||||
|
||||
try {
|
||||
std::cout << "Verbinden met broker..." << std::endl;
|
||||
|
@@ -8,6 +8,7 @@ mqtt_client = mqtt.Client()
|
||||
# Verbinding maken met de Raspberry Pi (broker)
|
||||
mqtt_client.username_pw_set("ishak", "kobuki")
|
||||
mqtt_client.connect("ishakpi.ddns.net", 1883, 60)
|
||||
client = mqtt.Client(protocol=mqtt.MQTTv311)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
|
Reference in New Issue
Block a user