diff --git a/README.md b/README.md index a86455e..dbf8ca0 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ In a browser navigate to the IP address assigned to the ESP32. #### Network Configuration -- Hostname (needs to be unique, "nukihub" is not allowed): Set the hostname for the Nuki Hub ESP, will also be used as the MQTT client ID. Needs to be unique. +- Hostname (needs to be unique): Set the hostname for the Nuki Hub ESP, will also be used as the MQTT client ID. Needs to be unique. - Network hardware: "Wi-Fi only" by default, set to one of the specified ethernet modules if available, see the "Supported Ethernet devices" and "[Connecting via Ethernet](#connecting-via-ethernet-optional)" section of this README. - Home Assistant device configuration URL: When using Home Assistant discovery the link to the Nuki Hub Web Configuration will be published to Home Assistant. By default when this setting is left empty this will link to the current IP of the Nuki Hub. When using a reverse proxy to access the Web Configuration you can set a custom URL here. - RSSI Publish interval: Set to a positive integer to set the amount of seconds between updates to the maintenance/wifiRssi MQTT topic with the current Wi-Fi RSSI, set to -1 to disable, default 60. diff --git a/src/NukiNetwork.cpp b/src/NukiNetwork.cpp index acb5aa4..480b150 100644 --- a/src/NukiNetwork.cpp +++ b/src/NukiNetwork.cpp @@ -217,7 +217,7 @@ void NukiNetwork::initialize() { _hostname = _preferences->getString(preference_hostname, ""); - if(_hostname == "" || _hostname == "nukihub") + if(_hostname == "") { char _nukiHubUidString[20]; uint8_t mac[8]; @@ -265,7 +265,7 @@ void NukiNetwork::initialize() _hostname = _preferences->getString(preference_hostname, ""); - if(_hostname == "" || _hostname == "nukihub") + if(_hostname == "") { char _nukiHubUidString[20]; uint8_t mac[8]; diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index 576f032..e08b052 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -3174,7 +3174,7 @@ bool WebCfgServer::processArgs(PsychicRequest *request, PsychicResponse* resp, S } else if(key == "HOSTNAME") { - if(_preferences->getString(preference_hostname, "") != value && value != "nukihub") + if(_preferences->getString(preference_hostname, "") != value) { _preferences->putString(preference_hostname, value); Log->print("Setting changed: "); @@ -5104,7 +5104,7 @@ esp_err_t WebCfgServer::buildNetworkConfigHtml(PsychicRequest *request, PsychicR response.print(""); response.print("

Network Configuration

"); response.print(""); - printInputField(&response, "HOSTNAME", "Hostname (needs to be unique, \"nukihub\" is not allowed)", _preferences->getString(preference_hostname).c_str(), 100, ""); + printInputField(&response, "HOSTNAME", "Hostname (needs to be unique)", _preferences->getString(preference_hostname).c_str(), 100, ""); printDropDown(&response, "NWHW", "Network hardware", String(_preferences->getInt(preference_network_hardware)), getNetworkDetectionOptions(), ""); printInputField(&response, "HASSCUURL", "Home Assistant device configuration URL (empty to use http://LOCALIP; fill when using a reverse proxy for example)", _preferences->getString(preference_mqtt_hass_cu_url).c_str(), 261, ""); #ifndef CONFIG_IDF_TARGET_ESP32H2