From 92216ee5b9acdd157d69fd5b19c2864275d4b94e Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 18 Feb 2024 17:28:24 +0000 Subject: [PATCH] Let hostname be easily configurable --- src/main.cpp | 2 +- src/setup.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 31603c27..2b2fa03a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -289,7 +289,7 @@ void setup() readEEPROM();//Restore previous state mqttSerial.print("Setting up wifi..."); setup_wifi(); - ArduinoOTA.setHostname("ESPAltherma"); + ArduinoOTA.setHostname(HOSTNAME); ArduinoOTA.onStart([]() { busy = true; }); diff --git a/src/setup.h b/src/setup.h index 227ad81b..83693fc4 100644 --- a/src/setup.h +++ b/src/setup.h @@ -1,3 +1,6 @@ +//Default device hostname: +#define HOSTNAME "ESPAltherma" + //Setup your credentials and mqtt info here: //only change the value between the " " leave the rest of the line untouched. #define WIFI_SSID "SSID"//**Your SSID here**