Skip to content

Commit 9d41966

Browse files
author
brentru
committed
MQTT->MQTTS
1 parent a294aec commit 9d41966

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Adafruit_IO/mqtt_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MQTTClient(object):
3535
using the MQTT protocol.
3636
"""
3737

38-
def __init__(self, username, key, service_host='io.adafruit.com', service_port=1883):
38+
def __init__(self, username, key, service_host='io.adafruit.com', service_port=8883):
3939
"""Create instance of MQTT client.
4040
4141
Required parameters:
@@ -52,6 +52,7 @@ def __init__(self, username, key, service_host='io.adafruit.com', service_port=1
5252
self.on_message = None
5353
# Initialize MQTT client.
5454
self._client = mqtt.Client()
55+
self._client.tls_set_context() # mqqts
5556
self._client.username_pw_set(username, key)
5657
self._client.on_connect = self._mqtt_connect
5758
self._client.on_disconnect = self._mqtt_disconnect

0 commit comments

Comments
 (0)