From 5d60365dfbe4cbb285e534bb703b9a242bd2e0f1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 1 Dec 2021 11:21:56 +0100 Subject: [PATCH] Formalize USE_SONOFF_SPM --- tasmota/my_user_config.h | 5 +++++ tasmota/support_features.ino | 4 +++- tools/decode-status.py | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 923e19108..6ffc7c2de 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -968,6 +968,11 @@ #ifdef ESP32 +//#define USE_SONOFF_SPM // Add support for ESP32 based Sonoff Smart Stackable Power Meter(+6k3 code) +#ifdef USE_SONOFF_SPM +#define USE_ETHERNET +#endif + //#define USE_ETHERNET // Add support for ethernet (Currently fixed for Olimex ESP32-PoE) // #define USE_WT32_ETH01 // Add support for Wireless-Tag WT32-ETH01 // #define ETH_TYPE 0 // [EthType] 0 = ETH_PHY_LAN8720, 1 = ETH_PHY_TLK110/ETH_PHY_IP101, 2 = ETH_PHY_RTL8201, 3 = ETH_PHY_DP83848, 4 = ETH_PHY_DM9051, 5 = ETH_PHY_KSZ8081 diff --git a/tasmota/support_features.ino b/tasmota/support_features.ino index 59d12e666..0372c80c8 100644 --- a/tasmota/support_features.ino +++ b/tasmota/support_features.ino @@ -781,7 +781,9 @@ void ResponseAppendFeatures(void) #if defined(USE_LIGHT) && defined(USE_LSC_MCSL) feature8 |= 0x00020000; // xlgt_07_lsc_mcsl.ino #endif -// feature8 |= 0x00040000; +#ifdef USE_SONOFF_SPM + feature8 |= 0x00040000; +#endif // feature8 |= 0x00080000; // feature8 |= 0x00100000; diff --git a/tools/decode-status.py b/tools/decode-status.py index 1ca16c0ab..6e70d8912 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -260,7 +260,7 @@ a_features = [[ "USE_BM8563","USE_ENERGY_DUMMY","USE_AM2320","USE_T67XX", "USE_MCP2515","USE_TASMESH","USE_WIFI_RANGE_EXTENDER","USE_INFLUXDB", "USE_HRG15","USE_VINDRIKTNING","USE_SCD40","USE_HM330X", - "USE_HDC2010","USE_LSC_MCSL","","", + "USE_HDC2010","USE_LSC_MCSL","USE_SONOFF_SPM","", "","","","", "","","","", "","","","" @@ -291,7 +291,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v20211130 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v20211201 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj))