auth at broker works too

This commit is contained in:
Wolfgang Hottgenroth
2017-08-16 11:30:51 +02:00
parent 97e6dd41bb
commit aca683febb

View File

@ -9,19 +9,23 @@
#define DEBUG
#define SLEEP
// #define SLEEP
//const char* ssid = "EG-WLAN";
//const char* password = "shae3sheuthai2oluNgiqueiyahyumeiphughi8jequeil6taethooyeik1joh5";
//const char* mqttServer = "172.16.2.15";
const char* ssid = "iPhone";
const char* password = "wollud123456";
const char* mqttServer = "broker.hottis.de";
const uint16 mqttPort = 8883;
//const char* ssid = "WLan-KI-Pro";
//const char* password = "sVAPHCmo";
const char* mqttServer = "broker.hottis.de";
const uint16 mqttPort = 8883;
const char* mqttUsername = "esp1";
const char* mqttPassword = "test1234";
//const char* mqttServer = "172.16.2.15";
//const char* mqttServer = "10.11.184.91";
const uint16_t sleepTime = 300;
@ -96,7 +100,7 @@ void reconnect() {
Serial.print("Attempting MQTT connection...");
#endif
// Attempt to connect
if (client.connect("ESP8266Client2")) {
if (client.connect("ESP8266Client2", mqttUsername, mqttPassword)) {
#ifdef DEBUG
Serial.println("connected");
#endif