From 1a7853a47e30d10e7bdc1d8ad99e2771e448dd06 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 19 Feb 2021 06:44:22 -0600 Subject: [PATCH] subscribe in the connect callback (fixes #814) --- frigate/mqtt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frigate/mqtt.py b/frigate/mqtt.py index 13ca35163..3358c001f 100644 --- a/frigate/mqtt.py +++ b/frigate/mqtt.py @@ -91,6 +91,7 @@ def create_mqtt_client(config: FrigateConfig, camera_metrics): logger.error("Unable to connect to MQTT: Connection refused. Error code: " + str(rc)) logger.info("MQTT connected") + client.subscribe(f"{mqtt_config.topic_prefix}/#") client.publish(mqtt_config.topic_prefix+'/available', 'online', retain=True) client = mqtt.Client(client_id=mqtt_config.client_id)