Skip to content

Commit e77be5b

Browse files
committed
added ssl option & details
1 parent f8518bc commit e77be5b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/mqtt_2subs_esp8266/mqtt_2subs_esp8266.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@
3232
/************************* Adafruit.io Setup *********************************/
3333

3434
#define AIO_SERVER "io.adafruit.com"
35-
#define AIO_SERVERPORT 1883
35+
#define AIO_SERVERPORT 1883 // use 8883 for SSL
3636
#define AIO_USERNAME "...your AIO username (see https://accounts.adafruit.com)..."
3737
#define AIO_KEY "...your AIO key..."
3838

3939
/************ Global State (you don't need to change this!) ******************/
4040

4141
// Create an ESP8266 WiFiClient class to connect to the MQTT server.
4242
WiFiClient client;
43+
// or... use WiFiFlientSecure for SSL
44+
//WiFiClientSecure client;
4345

4446
// Store the MQTT server, username, and password in flash memory.
4547
// This is required for using the Adafruit MQTT library.

examples/mqtt_esp8266/mqtt_esp8266.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@
2727
/************************* Adafruit.io Setup *********************************/
2828

2929
#define AIO_SERVER "io.adafruit.com"
30-
#define AIO_SERVERPORT 1883
30+
#define AIO_SERVERPORT 1883 // use 8883 for SSL
3131
#define AIO_USERNAME "...your AIO username (see https://accounts.adafruit.com)..."
3232
#define AIO_KEY "...your AIO key..."
3333

3434
/************ Global State (you don't need to change this!) ******************/
3535

3636
// Create an ESP8266 WiFiClient class to connect to the MQTT server.
3737
WiFiClient client;
38+
// or... use WiFiFlientSecure for SSL
39+
//WiFiClientSecure client;
3840

3941
// Store the MQTT server, username, and password in flash memory.
4042
// This is required for using the Adafruit MQTT library.

0 commit comments

Comments
 (0)