Allow nukihub as hostname
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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("<input type=\"hidden\" name=\"page\" value=\"savecfg\">");
|
||||
response.print("<h3>Network Configuration</h3>");
|
||||
response.print("<table>");
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user