Skip to content

Commit

Permalink
Added insecure MQTT connetion option (#6)
Browse files Browse the repository at this point in the history
* Added insecure MQTT connetion option

* removed assumption 1883 and insecure option, added argument to set MQTT security connection
  • Loading branch information
tung-wirepas authored Oct 6, 2021
1 parent 7f3d2dc commit d2aabc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wirepas_provisioning_server/provisioning_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def main():
default=get_default_value_from_env('WM_SERVICES_MQTT_PORT', 8883),
type=int,
help='MQTT broker port')
parser.add_argument('--insecure',
default=get_default_value_from_env('WM_SERVICES_MQTT_INSECURE', False),
type=bool,
help='MQTT security option')
parser.add_argument('--username',
default=get_default_value_from_env('WM_SERVICES_MQTT_USERNAME', 'mqttmasteruser'),
help='MQTT broker username')
Expand All @@ -115,7 +119,7 @@ def main():

logging.basicConfig(format='%(levelname)s %(asctime)s %(message)s', level=logging.INFO)

wni = WirepasNetworkInterface(args.host, args.port, args.username, args.password)
wni = WirepasNetworkInterface(args.host, args.port, args.username, args.password, args.insecure)

srv = ProvisioningServer(interface=wni, settings=args.config)
srv.loop()
Expand Down

0 comments on commit d2aabc9

Please sign in to comment.