From 3bef25fb39b14147e29edcca6c114499f0c6dca9 Mon Sep 17 00:00:00 2001 From: Carsten Schmiemann Date: Tue, 8 Nov 2022 23:59:49 +0100 Subject: [PATCH] Add hostname --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 05e45f3..787f606 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -338,6 +338,13 @@ void setup() { WiFiManagerParameter custom_address_outside_temperature("address_outside_temperature", "Address of outside temperature", address_outside_temperature, 6); WiFiManager wm; + #ifdef ESP8266 + WiFi.hostname("ESP_Solar_Monitor"); + #endif + #ifdef ESP32 + WiFi.setHostname("ESP_Solar_Monitor"); + #endif + wm.setSaveConfigCallback(saveConfigCallback); wm.addParameter(&custom_mqtt_server); wm.addParameter(&custom_gx_vrm_id);