diff --git a/esp8266-weather-station-color.ino b/esp8266-weather-station-color.ino index 6d7cf27..e9aae19 100644 --- a/esp8266-weather-station-color.ino +++ b/esp8266-weather-station-color.ino @@ -130,7 +130,9 @@ bool canBtnPress; void connectWifi() { if (WiFi.status() == WL_CONNECTED) return; //Manual Wifi + WiFi.mode(WIFI_STA); WiFi.begin(WIFI_SSID,WIFI_PASS); + WiFi.hostname(WIFI_HOSTNAME); int i = 0; while (WiFi.status() != WL_CONNECTED) { delay(500); diff --git a/settings.h b/settings.h index ec783ec..f15dbd5 100644 --- a/settings.h +++ b/settings.h @@ -23,6 +23,7 @@ See more at http://blog.squix.ch // Setup #define WIFI_SSID "yourssid" #define WIFI_PASS "yourpassw0rd" +#define WIFI_HOSTNAME "ThingPulse-weather-station-color" const int UPDATE_INTERVAL_SECS = 15 * 60; // Update every 10 minutes const int SLEEP_INTERVAL_SECS = 0; // Going to Sleep after idle times, set 0 for dont sleep