From fc1198c1f9203b1ddcd21df8324d0c40eb6785d1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 14 Jan 2019 10:57:01 +0100 Subject: [PATCH] Add features * Add support for Luminea ZX2820 Smart Socket with Energy monitoring (#4921) * Add define MDNS_ENABLE to control initial mDNS state (#4923) * Add split interlock part 1 (#4910) --- sonoff/_changelog.ino | 3 +++ sonoff/my_user_config.h | 3 +++ sonoff/settings.ino | 3 ++- sonoff/sonoff_template.h | 6 +++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 8c65c845b..42b97ddcb 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -8,6 +8,9 @@ * Change web authentication (#4865) * Add support for Digoo DG-SP202 Smart Socket with Energy monitoring (#4891) * Add support for Smanergy KA10 Smart Wall Socket with Energy monitoring + * Add support for Luminea ZX2820 Smart Socket with Energy monitoring (#4921) + * Add define MDNS_ENABLE to control initial mDNS state (#4923) + * Add split interlock part 1 (#4910) * * 6.4.1.7 20190106 * Fix HLW8012, HJL01 and BL0937 based energy sensors low Power (below 10W) measurement regression from 6.4.1.6 diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index a4fbfef7a..706276c22 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -134,6 +134,9 @@ #define FRIENDLY_NAME "Sonoff" // [FriendlyName] Friendlyname up to 32 characters used by webpages and Alexa #define EMULATION EMUL_NONE // [Emulation] Select Belkin WeMo (single relay/light) or Hue Bridge emulation (multi relay/light) (EMUL_NONE, EMUL_WEMO or EMUL_HUE) +// -- mDNS ---------------------------------------- +#define MDNS_ENABLED 0 // [SetOption55] Use mDNS (0 = Disable, 1 = Enable) + // -- Time - Up to three NTP servers in your region #define NTP_SERVER1 "pool.ntp.org" // [NtpServer1] Select first NTP server by name or IP address (129.250.35.250) #define NTP_SERVER2 "nl.pool.ntp.org" // [NtpServer2] Select second NTP server by name or IP address (5.39.184.5) diff --git a/sonoff/settings.ino b/sonoff/settings.ino index 055b35566..65f42e979 100644 --- a/sonoff/settings.ino +++ b/sonoff/settings.ino @@ -621,6 +621,7 @@ void SettingsDefaultSet2(void) Settings.webserver = WEB_SERVER; Settings.weblog_level = WEB_LOG_LEVEL; strlcpy(Settings.web_password, WEB_PASSWORD, sizeof(Settings.web_password)); + Settings.flag3.mdns_enabled = MDNS_ENABLED; // Button // Settings.flag.button_restrict = 0; @@ -1018,7 +1019,7 @@ void SettingsDelta(void) } } if (Settings.version < 0x06040105) { - Settings.flag3.mdns_enabled = 0; + Settings.flag3.mdns_enabled = MDNS_ENABLED; Settings.param[P_MDNS_DELAYED_START] = 0; } diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 5db27e817..66a83cd1e 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -546,6 +546,7 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { TECKIN_US, APLIC_WDP303075, GOSUND, + ZX2820, SK03_TUYA, DIGOO, KA10, @@ -569,7 +570,6 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { PHILIPS, YTF_IR_BRIDGE, WITTY, // Development Devices - ZX2820, WEMOS }; @@ -1740,7 +1740,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { 0, 0, 0 }, { "Luminea ZX2820", - GPIO_KEY1, // GPIO00 Button + GPIO_KEY1, // GPIO00 Button 0, 0, 0, GPIO_HLW_CF, // GPIO04 HLW8012 CF power GPIO_NRG_CF1, // GPIO05 HLW8012 CF1 voltage / current @@ -1754,7 +1754,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_LED1_INV, // GPIO13 Green Led - Link and Power status GPIO_REL1, // GPIO14 Relay 0, 0, 0 - } + } }; /*