mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 00:52:17 +03:00
feat(web): mqtt for stats
This commit is contained in:
committed by
Blake Blackshear
parent
20c65b9a31
commit
e399790442
+2
-2
@@ -43,7 +43,7 @@ class MqttBackend():
|
||||
json_message = json.loads(message)
|
||||
json_message = {
|
||||
'topic': f"{self.topic_prefix}/{json_message['topic']}",
|
||||
'payload': json_message.get['payload'],
|
||||
'payload': json_message['payload'],
|
||||
'retain': json_message.get('retain', False)
|
||||
}
|
||||
except:
|
||||
@@ -73,7 +73,7 @@ class MqttBackend():
|
||||
except:
|
||||
logger.debug("Removing websocket client due to a closed connection.")
|
||||
self.clients.remove(client)
|
||||
|
||||
|
||||
self.mqtt_client.message_callback_add(f"{self.topic_prefix}/#", send)
|
||||
|
||||
def start(self):
|
||||
|
||||
Reference in New Issue
Block a user