Skip to content

Commit

Permalink
mqtt auth clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmerza committed Feb 11, 2024
1 parent 626bdbe commit bb97f1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit bb97f1b

Please sign in to comment.