diff --git a/src/espmega_iot_core.cpp b/src/espmega_iot_core.cpp index 3d4625d..50e1bd4 100644 --- a/src/espmega_iot_core.cpp +++ b/src/espmega_iot_core.cpp @@ -247,6 +247,14 @@ void eeprom_retrieve_init() #ifdef ENABLE_WEBUI ESPMega_FRAM.read(EEPROM_ADDRESS_WEBUI_USERNAME, (uint8_t *)WEBUI_USERNAME, 32); ESPMega_FRAM.read(EEPROM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)WEBUI_PASSWORD, 32); + if(strlen(WEBUI_USERNAME)==0) { + strcpy(WEBUI_USERNAME,"admin"); + ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_USERNAME, (uint8_t *)WEBUI_USERNAME, 32); + } + if(strlen(WEBUI_PASSWORD)==0) { + strcpy(WEBUI_PASSWORD,"admin"); + ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)WEBUI_PASSWORD, 32); + } #endif // EEPROM Data Retrival #ifdef ENABLE_CLIMATE_MODULE