Browse Source

Support for LLMNR

fastled
Xose Pérez 6 years ago
parent
commit
10cc203625
5 changed files with 33 additions and 4 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +5
    -1
      code/espurna/config/general.h
  3. +6
    -0
      code/espurna/espurna.ino
  4. +18
    -0
      code/espurna/llmnr.ino
  5. +3
    -3
      code/platformio.ini

+ 1
- 0
code/espurna/config/arduino.h View File

@ -69,6 +69,7 @@
//#define I2C_SUPPORT 1
//#define INFLUXDB_SUPPORT 0
//#define IR_SUPPORT 1
//#define LLMNR_SUPPORT 1
//#define MDNS_SUPPORT 0
//#define NOFUSS_SUPPORT 1
//#define NTP_SUPPORT 0


+ 5
- 1
code/espurna/config/general.h View File

@ -324,13 +324,17 @@ PROGMEM const char* const custom_reset_string[] = {
#define API_REAL_TIME_VALUES 0 // Show filtered/median values by default (0 => median, 1 => real time)
// -----------------------------------------------------------------------------
// MDNS
// MDNS & LLMNR
// -----------------------------------------------------------------------------
#ifndef MDNS_SUPPORT
#define MDNS_SUPPORT 1 // Publish services using mDNS by default
#endif
#ifndef LLMNR_SUPPORT
#define LLMNR_SUPPORT 0 // Publish device using LLMNR protocol by default - requires 2.4.0
#endif
// -----------------------------------------------------------------------------
// SPIFFS
// -----------------------------------------------------------------------------


+ 6
- 0
code/espurna/espurna.ino View File

@ -168,6 +168,9 @@ void welcome() {
#if INFLUXDB_SUPPORT
DEBUG_MSG_P(PSTR(" INFLUXDB"));
#endif
#if LLMNR_SUPPORT
DEBUG_MSG_P(PSTR(" LLMNR"));
#endif
#if MDNS_SUPPORT
DEBUG_MSG_P(PSTR(" MDNS"));
#endif
@ -308,6 +311,9 @@ void setup() {
#if HOMEASSISTANT_SUPPORT
haSetup();
#endif
#if LLMNR_SUPPORT
llmnrSetup();
#endif
// Prepare configuration for version 2.0
hwUpwardsCompatibility();


+ 18
- 0
code/espurna/llmnr.ino View File

@ -0,0 +1,18 @@
/*
LLMNR MODULE
Copyright (C) 2017 by Xose Pérez <xose dot perez at gmail dot com>
*/
#if LLMNR_SUPPORT
#include <ESP8266LLMNR.h>
void llmnrSetup() {
LLMNR.begin(getSetting("hostname").c_str());
DEBUG_MSG_P(PSTR("[LLMNR] Configured\n"));
}
#endif // LLMNR_SUPPORT

+ 3
- 3
code/platformio.ini View File

@ -4,8 +4,8 @@ src_dir = espurna
data_dir = espurna/data
[common]
platform = espressif8266
#platform = espressif8266_stage
#platform = espressif8266
platform = espressif8266_stage
build_flags = -g -DMQTT_MAX_PACKET_SIZE=400 ${env.ESPURNA_FLAGS}
debug_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
build_flags_512k = ${common.build_flags} -Wl,-Tesp8266.flash.512k0.ld
@ -15,7 +15,7 @@ build_flags_1m = ${common.build_flags} -Wl,-Tesp8266.flash.1m0.ld
lib_deps =
https://github.com/xoseperez/Time
ArduinoJson
https://github.com/me-no-dev/ESPAsyncTCP#9b0cc37
https://github.com/me-no-dev/ESPAsyncTCP#289a681
https://github.com/me-no-dev/ESPAsyncWebServer#313f337
https://github.com/marvinroger/async-mqtt-client#v0.8.1
PubSubClient


Loading…
Cancel
Save