user handling

This commit is contained in:
2025-12-15 23:07:19 +01:00
parent f6f2d20eb8
commit b0f19eb72e
15 changed files with 573 additions and 127 deletions

View File

@@ -43,6 +43,7 @@ def on_message(client: MQTTClient, topic: str, payload: bytes, qos, properties):
db_connect.DatabaseConnect().create_sensor_reading(id, datetime.datetime.fromisoformat(data[0]), float(data[1]))
else:
db_connect.DatabaseConnect().emit_log(1, f"Received MQTT message for unknown topic {topic}")
#TODO: add device topics and handle those commands
@fast_mqtt.on_disconnect()
def on_disconnect(client: MQTTClient, packet, exc=None):