diff --git a/esp/platformio.ini b/esp/platformio.ini index 2e4f314..1fc4107 100644 --- a/esp/platformio.ini +++ b/esp/platformio.ini @@ -16,4 +16,4 @@ upload_protocol = esptool lib_deps = adafruit/Adafruit NeoPixel@^1.11.0 sstaub/NTP@^1.6 - https://git.kabelsalat.ch/s3lph/Arduino-Library-SoftDhcp.git@^0.0.1 + https://git.kabelsalat.ch/s3lph/Arduino-Library-SoftDhcp.git@^0.0.2 diff --git a/esp/src/main.cpp b/esp/src/main.cpp index 334bda6..c917740 100644 --- a/esp/src/main.cpp +++ b/esp/src/main.cpp @@ -54,7 +54,7 @@ void setupNtp() { } void expired() { - //Serial.println("DHCP lease expired, stopping NTP"); + Serial.println("DHCP lease expired, stopping NTP"); ntp.stop(); ntpInitialized = false; } @@ -63,6 +63,7 @@ void setup() { Serial.begin(115200); dhcp.onLease(setupNtp); dhcp.onExpire(expired); + dhcp.hostname("ambient-lighting-clock"); dhcp.requestOption(DHCP_TIME_SERVERS); dhcp.begin(); WiFi.begin(ssid, password);