diff --git a/BUILDS.md b/BUILDS.md index c24588c72..93c4e5114 100644 --- a/BUILDS.md +++ b/BUILDS.md @@ -67,6 +67,7 @@ m = minimal, l = lite, t = tasmota, k = knx, s = sensors, i = ir, d = display | USE_ELECTRIQ_MOODL | - | - | x / - | x | x | - | x | | | | | | | | | | | USE_ENERGY_SENSOR | - | x | x / x | x | x | - | - | +| USE_ENERGY_DUMMY | - | x | x / x | x | x | - | - | | USE_PZEM004T | - | - | x / x | x | x | - | - | | USE_PZEM_AC | - | - | x / x | x | x | - | - | | USE_PZEM_DC | - | - | x / x | x | x | - | - | diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 139f6983c..f2af992f8 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -707,7 +707,7 @@ // -- Power monitoring sensors -------------------- #define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code) #define USE_ENERGY_POWER_LIMIT // Add additional support for Energy Power Limit detection (+1k2 code) -#define USE_ENERGY_DUMMY // Add support for dummy Energy monitor allowing user values (+0k5 code) +#define USE_ENERGY_DUMMY // Add support for dummy Energy monitor allowing user values (+0k7 code) #define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) #define USE_PZEM_AC // Add support for PZEM014,016 Energy monitor (+1k1 code) #define USE_PZEM_DC // Add support for PZEM003,017 Energy monitor (+1k1 code) diff --git a/tasmota/support_features.ino b/tasmota/support_features.ino index a6a7e5b3d..3cd84d00f 100644 --- a/tasmota/support_features.ino +++ b/tasmota/support_features.ino @@ -740,7 +740,9 @@ void ResponseAppendFeatures(void) #ifdef USE_HALLEFFECT feature8 |= 0x00000010; // xsns_87_esp32_halleffect.ino #endif -// feature8 |= 0x00000020; +#if defined(USE_ENERGY_SENSOR) && defined(USE_ENERGY_DUMMY) + feature8 |= 0x00000020; +#endif // feature8 |= 0x00000040; // feature8 |= 0x00000080; diff --git a/tasmota/xnrg_20_dummy.ino b/tasmota/xnrg_20_dummy.ino index 4787cae21..d1ddc2e86 100644 --- a/tasmota/xnrg_20_dummy.ino +++ b/tasmota/xnrg_20_dummy.ino @@ -105,7 +105,7 @@ bool NrgDummyCommand(void) { } void NrgDummyDrvInit(void) { - if (TasmotaGlobal.gpio_optiona.dummy_energy) { + if (TasmotaGlobal.gpio_optiona.dummy_energy && TasmotaGlobal.devices_present) { if (HLW_PREF_PULSE == Settings.energy_power_calibration) { Settings.energy_frequency_calibration = NRG_DUMMY_FREF; Settings.energy_voltage_calibration = NRG_DUMMY_UREF; diff --git a/tools/decode-status.py b/tools/decode-status.py index 8cd2fbc8e..5690fca53 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -253,7 +253,7 @@ a_features = [[ "USE_TOF10120","USE_SDM72","USE_DISPLAY_TM1637","USE_PROJECTOR_CTRL" ],[ "USE_MPU6886","USE_TFMINIPLUS","USE_CSE7761","USE_BERRY", - "USE_HALLEFFECT","","","", + "USE_HALLEFFECT","USE_ENERGY_DUMMY","","", "","","","", "","","","", "","","","", @@ -287,7 +287,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v20210327 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v20210406 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj))