Skip to content

Commit

Permalink
Merge pull request #15 from kyle4269/dev
Browse files Browse the repository at this point in the history
Add MQTT port
  • Loading branch information
kyle4269 authored Mar 28, 2024
2 parents 8d86c14 + a9b2c27 commit 7a1fd43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 7a1fd43

Please sign in to comment.