disable ssl and auth
This commit is contained in:
@ -12,10 +12,8 @@ configItems = [
|
||||
{"label":"Wifi SSID", "key":"wifiSsid", "type":"C", "length":32, "default":"test"},
|
||||
{"label":"Wifi Key", "key":"wifiKey", "type":"C", "length":64, "default":"geheim"},
|
||||
{"label":"MQTT Broker", "key":"mqttBroker", "type":"C", "length":32, "default":"broker.hottis.de"},
|
||||
{"label":"MQTT Username", "key":"mqttUser", "type":"C", "length":32, "default":"TwoLedSignal1"},
|
||||
{"label":"MQTT Password", "key":"mqttPass", "type":"C", "length":32, "default":"geheim123"},
|
||||
{"label":"MQTT ClientId", "key":"mqttClientId", "type":"C", "length":32, "default":"TwoLedSignal1"},
|
||||
{"label":"MQTT Port", "key":"mqttPort", "type":"I", "default":8883},
|
||||
{"label":"MQTT Port", "key":"mqttPort", "type":"I", "default":1883},
|
||||
{"label":"MQTT Topic LED 1", "key":"mqttTopicLed1", "type":"C", "length":64, "default":"IoT/TwoLedSignal1/Led1"},
|
||||
{"label":"MQTT Topic LED 2", "key":"mqttTopicLed2", "type":"C", "length":64, "default":"IoT/TwoLedSignal1/Led2"},
|
||||
{"label":"MQTT DebugTopic", "key":"mqttDebugTopic", "type":"C", "length":64, "default":"IoT/TwoLedSignal1/Debug"},
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -32,10 +32,8 @@ void configServeIndex() {
|
||||
strcpy(configBlock.wifiSsid, "test");
|
||||
strcpy(configBlock.wifiKey, "geheim");
|
||||
strcpy(configBlock.mqttBroker, "broker.hottis.de");
|
||||
strcpy(configBlock.mqttUser, "TwoLedSignal1");
|
||||
strcpy(configBlock.mqttPass, "geheim123");
|
||||
strcpy(configBlock.mqttClientId, "TwoLedSignal1");
|
||||
configBlock.mqttPort = 8883;
|
||||
configBlock.mqttPort = 1883;
|
||||
strcpy(configBlock.mqttTopicLed1, "IoT/TwoLedSignal1/Led1");
|
||||
strcpy(configBlock.mqttTopicLed2, "IoT/TwoLedSignal1/Led2");
|
||||
strcpy(configBlock.mqttDebugTopic, "IoT/TwoLedSignal1/Debug");
|
||||
@ -135,36 +133,6 @@ void configServeIndex() {
|
||||
buffer += configBlock.mqttBroker;
|
||||
buffer += "\"";
|
||||
|
||||
buffer +=
|
||||
" />"
|
||||
" </td>"
|
||||
" </tr>"
|
||||
" <tr>"
|
||||
" <td>"
|
||||
" <label for\"mqttUser\">MQTT Username</label>"
|
||||
" </td><td>"
|
||||
" <input type=\"text\" name=\"mqttUser\" id=\"mqttUser\" ";
|
||||
|
||||
buffer += " size=\"32\" ";
|
||||
buffer += " value=\"";
|
||||
buffer += configBlock.mqttUser;
|
||||
buffer += "\"";
|
||||
|
||||
buffer +=
|
||||
" />"
|
||||
" </td>"
|
||||
" </tr>"
|
||||
" <tr>"
|
||||
" <td>"
|
||||
" <label for\"mqttPass\">MQTT Password</label>"
|
||||
" </td><td>"
|
||||
" <input type=\"text\" name=\"mqttPass\" id=\"mqttPass\" ";
|
||||
|
||||
buffer += " size=\"32\" ";
|
||||
buffer += " value=\"";
|
||||
buffer += configBlock.mqttPass;
|
||||
buffer += "\"";
|
||||
|
||||
buffer +=
|
||||
" />"
|
||||
" </td>"
|
||||
@ -292,10 +260,6 @@ void configServeGetConfiguration() {
|
||||
strcpy(configBlock.wifiKey, arg.c_str());
|
||||
arg = webServer.arg("mqttBroker");
|
||||
strcpy(configBlock.mqttBroker, arg.c_str());
|
||||
arg = webServer.arg("mqttUser");
|
||||
strcpy(configBlock.mqttUser, arg.c_str());
|
||||
arg = webServer.arg("mqttPass");
|
||||
strcpy(configBlock.mqttPass, arg.c_str());
|
||||
arg = webServer.arg("mqttClientId");
|
||||
strcpy(configBlock.mqttClientId, arg.c_str());
|
||||
arg = webServer.arg("mqttPort");
|
||||
@ -352,14 +316,6 @@ void showConfiguration() {
|
||||
Serial.print(configBlock.mqttBroker);
|
||||
Serial.println(">");
|
||||
|
||||
Serial.print("mqttUser = <");
|
||||
Serial.print(configBlock.mqttUser);
|
||||
Serial.println(">");
|
||||
|
||||
Serial.print("mqttPass = <");
|
||||
Serial.print(configBlock.mqttPass);
|
||||
Serial.println(">");
|
||||
|
||||
Serial.print("mqttClientId = <");
|
||||
Serial.print(configBlock.mqttClientId);
|
||||
Serial.println(">");
|
||||
|
@ -5,8 +5,6 @@ typedef struct {
|
||||
char wifiSsid[32];
|
||||
char wifiKey[64];
|
||||
char mqttBroker[32];
|
||||
char mqttUser[32];
|
||||
char mqttPass[32];
|
||||
char mqttClientId[32];
|
||||
uint32_t mqttPort;
|
||||
char mqttTopicLed1[64];
|
||||
|
@ -26,7 +26,7 @@ void callback(char* topic, byte* payload, unsigned int length);
|
||||
|
||||
|
||||
|
||||
WiFiClientSecure espClient;
|
||||
WiFiClient espClient;
|
||||
PubSubClient client(espClient);
|
||||
|
||||
void setup_wifi() {
|
||||
@ -124,7 +124,7 @@ void reconnect() {
|
||||
// Attempt to connect
|
||||
//char clientId[128];
|
||||
//snprintf(clientId, 127, "esp%s", WiFi.macAddress().c_str());
|
||||
if (client.connect(configBlock.mqttClientId, configBlock.mqttUser, configBlock.mqttPass)) {
|
||||
if (client.connect(configBlock.mqttClientId)) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("connected");
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user