First sort of working mqtt routines
This commit is contained in:
8
software/test_software/mqtt_callbacks.py
Normal file
8
software/test_software/mqtt_callbacks.py
Normal 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}")
|
Reference in New Issue
Block a user