From a9b2c27b41307b04c297ae75782b3da9b0e054ad Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 28 Mar 2024 09:05:04 -0400 Subject: [PATCH] Add MQTT port --- README.md | 1 + index.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f2e1e6c..1aa0f98 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Create a `config.yml` file in your docker volume with the following contents: frigate: frigate_url: http://127.0.0.1:5000 mqtt_server: 127.0.0.1 + mqtt_port: 1883 # Optional. Default shown. mqtt_username: username mqtt_password: password main_topic: frigate diff --git a/index.py b/index.py index 4e2d541..c8f9952 100644 --- a/index.py +++ b/index.py @@ -24,7 +24,7 @@ first_message = True _LOGGER = None -VERSION = '1.3.6' +VERSION = '1.3.7' CONFIG_PATH = '/config/config.yml' DB_PATH = '/config/frigate_alpr.db' @@ -930,7 +930,7 @@ def run_mqtt_client(): password = config['frigate'].get('mqtt_password', '') mqtt_client.username_pw_set(username, password) - mqtt_client.connect(config['frigate']['mqtt_server']) + mqtt_client.connect(config['frigate']['mqtt_server'], config['frigate'].get('mqtt_port', 1883)) mqtt_client.loop_forever() def load_logger():