Fix 2.4.0

This commit is contained in:
cschwinne 2019-10-25 15:32:09 +02:00
parent 937f404583
commit 0cd46f932a
3 changed files with 17 additions and 25 deletions

View File

@ -30,21 +30,21 @@
//#define WLED_ENABLE_FS_EDITOR //enable /edit page for editing SPIFFS content. Will also be disabled with OTA lock
//to toggle usb serial debug (un)comment the following line
//#define WLED_DEBUG
#define WLED_DEBUG
//library inclusions
#include <Arduino.h>
#ifdef ARDUINO_ARCH_ESP32
#ifdef ESP8266
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ESPAsyncTCP.h>
#else
#include <WiFi.h>
#include "esp_wifi.h"
#include <ESPmDNS.h>
#include <AsyncTCP.h>
#include "SPIFFS.h"
#else
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ESPAsyncTCP.h>
#endif
#include <ESPAsyncWebServer.h>
@ -100,7 +100,7 @@
//version code in format yymmddb (b = daily build)
#define VERSION 1910252
#define VERSION 1910253
char versionString[] = "0.8.6";
@ -162,7 +162,7 @@ byte briMultiplier = 100; //% of brightness to set (to limit
//User Interface CONFIG
char serverDescription[33] = "WLED"; //Name of module
byte currentTheme = 7; //UI theme index for settings and classic UI
byte uiConfiguration = 0; //0: automatic (depends on user-agent) 1: classic UI 2: mobile UI
byte uiConfiguration = 2; //0: automatic (depends on user-agent) 1: classic UI 2: mobile UI
bool useHSB = true; //classic UI: use HSB sliders instead of RGB by default
char cssFont[33] = "Verdana"; //font to use in classic UI

View File

@ -205,27 +205,18 @@ void initInterfaces() {
if (alexaEnabled) alexaInit();
#ifndef WLED_DISABLE_OTA
#ifdef ESP8266
if (aOtaEnabled) ArduinoOTA.begin(false);
#else
ArduinoOTA.setMdnsEnabled(false);
if (aOtaEnabled) ArduinoOTA.begin();
#endif
#endif
strip.service();
// Set up mDNS responder:
if (strlen(cmDNS) > 0)
{
if (MDNS.begin(cmDNS))
{
if (!aOtaEnabled) MDNS.begin(cmDNS);
DEBUG_PRINTLN("mDNS started");
MDNS.addService("http", "tcp", 80);
MDNS.addService("wled", "tcp", 80);
if (aOtaEnabled) MDNS.enableArduino(8266);
} else {
DEBUG_PRINTLN("mDNS failed!");
}
}
server.begin();

View File

@ -106,7 +106,7 @@ void sendHADiscoveryMQTT()
#if ARDUINO_ARCH_ESP32 || LEDPIN != 3
/*
YYYY is discovery tipic
YYYY is device topic
XXXX is device name
Send out HA MQTT Discovery message on MQTT connect (~2.4kB):
@ -212,7 +212,8 @@ Send out HA MQTT Discovery message on MQTT connect (~2.4kB):
strcpy(pubt, "homeassistant/light/");
strcat(pubt, mqttClientID);
strcat(pubt, "/config");
DEBUG_PRINTLN(mqtt->publish(pubt, 0, true, buffer));
bool success = mqtt->publish(pubt, 0, true, buffer);
DEBUG_PRINTLN(success);
#endif
}