From 932e3d5d52dd0bfc376f21e2dffd38fbb1137cd1 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 29 Jan 2021 10:57:59 +0100 Subject: [PATCH] Change MDNS_NAME to SYSTEM_NAME This value will be used as the MQTT client name when MQTT gets implemented. --- WeatherStation.ino | 2 +- config.h.sample | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WeatherStation.ino b/WeatherStation.ino index 9cee67b..86d2454 100644 --- a/WeatherStation.ino +++ b/WeatherStation.ino @@ -224,7 +224,7 @@ setup() MDNS.setHostProbeResultCallback(host_probe_result); - if ((!MDNSResponder::indexDomain(negotiated_hostname, 0, MDNS_NAME)) || + if ((!MDNSResponder::indexDomain(negotiated_hostname, 0, SYSTEM_NAME)) || (!MDNS.begin(negotiated_hostname))) { Serial.println("Error setting up mDNS!"); diff --git a/config.h.sample b/config.h.sample index 435228f..34e6879 100644 --- a/config.h.sample +++ b/config.h.sample @@ -24,6 +24,8 @@ * */ +#include "consts.h" + // The SSID (name) and password of the WiFi network you want to connect to #define WIFI_SSID "YourWiFiName" #define WIFI_PASS "YourWiFiPass" @@ -31,7 +33,7 @@ // The mDNS hostname you want this station to be visible as. This should be // different for each station you install (e.g. if you want to measure the // temperature and humidity of each room separately) -#define MDNS_NAME "internal-hostname" +#define SYSTEM_NAME "internal-hostname" // If you have a DHT temperature+humidity sensor of this type will be used, // remove the #undef line and uncomment one of DHT11 or DHT22. You also have