Skip to content

Commit 54e5db7

Browse files
committed
Use SSL by default for MQTT
1 parent c9bdaad commit 54e5db7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

adafruit_funhouse/network.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,19 @@ def init_io_mqtt(self):
7777
"Adafruit IO secrets are kept in secrets.py, please add them there!\n\n"
7878
) from KeyError
7979

80-
return self.init_mqtt(IO_MQTT_BROKER, 1883, aio_username, aio_key, True)
80+
return self.init_mqtt(
81+
IO_MQTT_BROKER, MQTT.MQTT_TLS_PORT, aio_username, aio_key, True
82+
)
8183

8284
# pylint: disable=too-many-arguments
83-
def init_mqtt(self, broker, port=1883, username=None, password=None, use_io=False):
85+
def init_mqtt(
86+
self,
87+
broker,
88+
port=MQTT.MQTT_TLS_PORT,
89+
username=None,
90+
password=None,
91+
use_io=False,
92+
):
8493
"""Initialize MQTT"""
8594
self.connect()
8695
self._mqtt_client = MQTT.MQTT(

0 commit comments

Comments
 (0)