diff --git a/README.md b/README.md index 154e803..30f7b67 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ 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_auth: false mqtt_username: username mqtt_password: password main_topic: frigate diff --git a/index.py b/index.py index ab13d47..0adca84 100644 --- a/index.py +++ b/index.py @@ -529,9 +529,9 @@ def run_mqtt_client(): mqtt_client.on_connect = on_connect # check if we are using authentication and set username/password if so - if config['frigate'].get('mqtt_auth', False): + if config['frigate'].get('mqtt_username', False): username = config['frigate']['mqtt_username'] - password = config['frigate']['mqtt_password'] + password = config['frigate'].get('mqtt_password', '') mqtt_client.username_pw_set(username, password) mqtt_client.connect(config['frigate']['mqtt_server'])