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_
Suggestion to add in the below line of code into the setup_wifi section for the WiFi Hostname:
WiFi.hostname(USER_MQTT_CLIENT_NAME);
This will mean a human readable device name will appear in your router instead of ESP_