Skip to content

Commit 8212c46

Browse files
committed
updating mqtt_client
1 parent 4661204 commit 8212c46

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

examples/esp32spi/minimqtt_pub_sub_blocking_esp32spi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def message(client, topic, message):
8787

8888
# Set up a MiniMQTT Client
8989
mqtt_client = MQTT.MQTT(
90-
broker=os.getenv("broker"), username=aio_username, password=aio_key
90+
broker="io.adafruit.com", username=aio_username, password=aio_key
9191
)
9292

9393
# Setup the callback methods above

examples/esp32spi/minimqtt_pub_sub_nonblocking_esp32spi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def message(client, topic, message):
8686

8787
# Set up a MiniMQTT Client
8888
mqtt_client = MQTT.MQTT(
89-
broker=os.getenv("broker"), username=aio_username, password=aio_key
89+
broker="io.adafruit.com", username=aio_username, password=aio_key
9090
)
9191

9292
# Setup the callback methods above

examples/minimqtt_simpletest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# or if you need your Adafruit IO key.)
1717
aio_username = os.getenv("aio_username")
1818
aio_key = os.getenv("aio_key")
19-
aio_broker = os.getenv("broker")
20-
aio_port = os.getenv("port")
2119

2220
print("Connecting to %s" % os.getenv("CIRCUITPY_WIFI_SSID"))
2321
wifi.radio.connect(
@@ -77,8 +75,8 @@ def message(client, topic, message):
7775

7876
# Set up a MiniMQTT Client
7977
mqtt_client = MQTT.MQTT(
80-
broker=aio_broker,
81-
port=aio_port,
78+
broker="io.adafruit.com",
79+
port=8883,
8280
username=os.getenv("CIRCUITPY_WIFI_SSID"),
8381
password=os.getenv("CIRCUITPY_WIFI_PASSWORD"),
8482
socket_pool=pool,

examples/native_networking/minimqtt_adafruitio_native_networking.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# or if you need your Adafruit IO key.)
1818
aio_username = os.getenv("aio_username")
1919
aio_key = os.getenv("aio_key")
20-
aio_port = os.getenv("port")
2120

2221
print("Connecting to %s" % os.getenv("CIRCUITPY_WIFI_SSID"))
2322
wifi.radio.connect(
@@ -62,9 +61,9 @@ def message(client, topic, message):
6261
# Set up a MiniMQTT Client
6362
mqtt_client = MQTT.MQTT(
6463
broker="io.adafruit.com",
65-
port=aio_port,
66-
username=aio_username,
67-
password=aio_key,
64+
port=8883,
65+
username=os.getenv("CIRCUITPY_WIFI_SSID"),
66+
password=os.getenv("CIRCUITPY_WIFI_PASSWORD"),
6867
socket_pool=pool,
6968
ssl_context=ssl.create_default_context(),
7069
)

0 commit comments

Comments
 (0)