Skip to content

Commit

Permalink
Merge pull request #106 from JeffreyFalgout/tls
Browse files Browse the repository at this point in the history
Fix #105.
  • Loading branch information
allangood authored Apr 7, 2022
2 parents 4059392 + 6b7eb52 commit e921ad1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rtlamr2mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ def sliding_mean(series):
# Build MQTT configuration
availability_topic = 'rtlamr/status'

host = None
port = None
user = None
password = None
tls = None
if (config['mqtt'].get('host')
or config['mqtt'].get('port')
or config['mqtt'].get('user')
Expand All @@ -301,8 +306,6 @@ def sliding_mean(series):
tls_ciphers = config['mqtt'].get('tls_ciphers', None)
tls_insecure = config['mqtt'].get('tls_insecure', False)
tls = { 'ca_certs': tls_ca, 'certfile': tls_cert, 'insecure': tls_insecure, 'keyfile': tls_keyfile, 'tls_version': tls_version, 'ciphers': tls_ciphers }
else:
tls = None
user = config['mqtt'].get('user')
password = config['mqtt'].get('password')
else:
Expand Down

0 comments on commit e921ad1

Please sign in to comment.