diff --git a/ConfigGenerator/configGen.py b/ConfigGenerator/configGen.py index 2ef94f0..44431bb 100644 --- a/ConfigGenerator/configGen.py +++ b/ConfigGenerator/configGen.py @@ -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"}, diff --git a/Release/TwoLedSignal.bin b/Release/TwoLedSignal.bin index b7fb05c..8f8d2e9 100644 Binary files a/Release/TwoLedSignal.bin and b/Release/TwoLedSignal.bin differ diff --git a/Release/TwoLedSignal.cpp.o b/Release/TwoLedSignal.cpp.o index 07b79c2..c2db2c6 100644 Binary files a/Release/TwoLedSignal.cpp.o and b/Release/TwoLedSignal.cpp.o differ diff --git a/Release/TwoLedSignal.elf b/Release/TwoLedSignal.elf index 063d2a9..218c7d8 100755 Binary files a/Release/TwoLedSignal.elf and b/Release/TwoLedSignal.elf differ diff --git a/Release/configuration.cpp.o b/Release/configuration.cpp.o index 55751e8..eee2a68 100644 Binary files a/Release/configuration.cpp.o and b/Release/configuration.cpp.o differ diff --git a/Release/configurationMode.cpp.o b/Release/configurationMode.cpp.o index 48c4119..7e3643c 100644 Binary files a/Release/configurationMode.cpp.o and b/Release/configurationMode.cpp.o differ diff --git a/Release/productionMode.cpp.o b/Release/productionMode.cpp.o index fbf157b..997c9cc 100644 Binary files a/Release/productionMode.cpp.o and b/Release/productionMode.cpp.o differ diff --git a/configuration.cpp b/configuration.cpp index 2d36550..18e219b 100644 --- a/configuration.cpp +++ b/configuration.cpp @@ -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 += - " />" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " @@ -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(">"); diff --git a/configuration.h b/configuration.h index 013ed85..288e9f1 100644 --- a/configuration.h +++ b/configuration.h @@ -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]; diff --git a/productionMode.cpp b/productionMode.cpp index 0a3448e..f069937 100644 --- a/productionMode.cpp +++ b/productionMode.cpp @@ -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