mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-07 00:06:57 +01:00
subscribe in the connect callback (fixes #814)
This commit is contained in:
parent
683c3a4c90
commit
1a7853a47e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user