First sort of working mqtt routines

This commit is contained in:
marcel
2025-08-11 21:31:31 +02:00
parent f722f8aec1
commit 8afdc890f1
15 changed files with 443 additions and 31 deletions

View File

@@ -0,0 +1,8 @@
def on_connect(client, userdata, flags, reason_code, properties=None):
client.subscribe(topic="topic/important")
def on_message(client, userdata, message, properties=None):
print(
f"(Received message {message.payload} on topic '{message.topic}' with QoS {message.qos}"
)
def on_subscribe(client, userdata, mid, qos, properties=None):
print(f"Subscribed with QoS {qos}")