thehookup / Holiday_LEDs_2.0

Tested and 100% working, this new version is easier to setup and can support 6 zones dynamically
199 stars 36 forks source link

Enhancement: WiFi Host Name #10

Closed wranglatang closed 5 years ago

wranglatang commented 5 years ago

Suggestion to add in the below line of code into the setup_wifi section for the WiFi Hostname:

WiFi.hostname(USER_MQTT_CLIENT_NAME);

void setup_wifi() 
{
  // We start by connecting to a WiFi network
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.hostname(USER_MQTT_CLIENT_NAME);
  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

This will mean a human readable device name will appear in your router instead of ESP_

ad8mustanggt commented 5 years ago

@thehookup FYI - I created #12 for this if you'd like to add it. I tested and it works as expected on my end.

thehookup commented 5 years ago

merged.