user handling
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user