diff --git a/tasmota/include/tasmota_types.h b/tasmota/include/tasmota_types.h
index 5e7d5cd16..2e672f088 100644
--- a/tasmota/include/tasmota_types.h
+++ b/tasmota/include/tasmota_types.h
@@ -183,7 +183,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t mqtt_disable_sserialrec : 1; // bit 1 (v12.1.1.2) - SetOption147 - (MQTT) Disable publish SSerialReceived MQTT messages, you must use event trigger rules instead.
uint32_t artnet_autorun : 1; // bit 2 (v12.2.0.4) - SetOption148 - (Light) start DMX ArtNet at boot, listen to UDP port as soon as network is up
uint32_t dns_ipv6_priority : 1; // bit 3 (v12.2.0.6) - SetOption149 - (Wifi) prefer IPv6 DNS resolution to IPv4 address when available. Requires `#define USE_IPV6`
- uint32_t spare04 : 1; // bit 4
+ uint32_t no_voltage_common : 1; // bit 4 (v12.3.1.5) - SetOption150 - (Energy) Force no voltage/frequency common
uint32_t spare05 : 1; // bit 5
uint32_t spare06 : 1; // bit 6
uint32_t spare07 : 1; // bit 7
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino
index 2059b51dc..bdba44bfa 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino
@@ -1200,7 +1200,10 @@ const char HTTP_ENERGY_SNS3[] PROGMEM =
#endif // USE_WEBSERVER
void EnergyShow(bool json) {
- if (Energy->voltage_common) {
+ bool voltage_common = (Settings->flag6.no_voltage_common) ? false : Energy->voltage_common;
+ bool frequency_common = (Settings->flag6.no_voltage_common) ? false : Energy->frequency_common;
+
+ if (voltage_common) {
for (uint32_t i = 0; i < Energy->phase_count; i++) {
Energy->voltage[i] = Energy->voltage[0];
}
@@ -1333,12 +1336,12 @@ void EnergyShow(bool json) {
}
if (!isnan(Energy->frequency[0])) {
ResponseAppend_P(PSTR(",\"" D_JSON_FREQUENCY "\":%s"),
- EnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, Energy->frequency_common));
+ EnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, frequency_common));
}
}
if (Energy->voltage_available) {
ResponseAppend_P(PSTR(",\"" D_JSON_VOLTAGE "\":%s"),
- EnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, Energy->voltage_common));
+ EnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, voltage_common));
}
if (Energy->current_available) {
ResponseAppend_P(PSTR(",\"" D_JSON_CURRENT "\":%s"),
@@ -1397,7 +1400,7 @@ void EnergyShow(bool json) {
// {s}
| Head1 | | Head2 | | Head3 | | {e}
// {s} | | Head1 | | Head2 | | Head3 | | Head4 | | {e}
WSContentSend_P(PSTR(" {t}{s} | | ")); // First column is empty ({t} = , {s} = )
- bool label_o = Energy->voltage_common;
+ bool label_o = voltage_common;
bool no_label = (1 == Energy->phase_count);
for (uint32_t i = 0; i < Energy->phase_count; i++) {
WSContentSend_P(PSTR(" | %s%s | | "), (no_label)?"":(label_o)?"O":"L", (no_label)?"":itoa(i +1, value_chr, 10));
@@ -1405,12 +1408,12 @@ void EnergyShow(bool json) {
WSContentSend_P(PSTR("{e}")); // Last column is units ({e} = |
)
#endif // USE_ENERGY_COLUMN_GUI
if (Energy->voltage_available) {
- WSContentSend_PD(HTTP_SNS_VOLTAGE, WebEnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, Energy->voltage_common));
+ WSContentSend_PD(HTTP_SNS_VOLTAGE, WebEnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, voltage_common));
}
if (!Energy->type_dc) {
if (!isnan(Energy->frequency[0])) {
WSContentSend_PD(PSTR("{s}" D_FREQUENCY "{m}%s " D_UNIT_HERTZ "{e}"),
- WebEnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, Energy->frequency_common));
+ WebEnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, frequency_common));
}
}
if (Energy->current_available) {
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino
index 62f36bbba..cb5007ffc 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino
@@ -1416,7 +1416,10 @@ const char HTTP_ENERGY_SNS3[] PROGMEM =
#endif // USE_WEBSERVER
void EnergyShow(bool json) {
- if (Energy->voltage_common) {
+ bool voltage_common = (Settings->flag6.no_voltage_common) ? false : Energy->voltage_common;
+ bool frequency_common = (Settings->flag6.no_voltage_common) ? false : Energy->frequency_common;
+
+ if (voltage_common) {
for (uint32_t i = 0; i < Energy->phase_count; i++) {
Energy->voltage[i] = Energy->voltage[0];
}
@@ -1549,12 +1552,12 @@ void EnergyShow(bool json) {
}
if (!isnan(Energy->frequency[0])) {
ResponseAppend_P(PSTR(",\"" D_JSON_FREQUENCY "\":%s"),
- EnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, Energy->frequency_common));
+ EnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, frequency_common));
}
}
if (Energy->voltage_available) {
ResponseAppend_P(PSTR(",\"" D_JSON_VOLTAGE "\":%s"),
- EnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, Energy->voltage_common));
+ EnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, voltage_common));
}
if (Energy->current_available) {
ResponseAppend_P(PSTR(",\"" D_JSON_CURRENT "\":%s"),
@@ -1636,7 +1639,7 @@ void EnergyShow(bool json) {
if (Energy->gui_count > Energy->Settings.gui_cols) { Energy->gui_count = Energy->Settings.gui_cols; }
WSContentSend_P(PSTR("
")); // Close current table as we will use different column count
- bool label_o = Energy->voltage_common;
+ bool label_o = voltage_common;
if (ENERGY_DISPLAY_TABS == Energy->Settings.gui_display) {
uint32_t tabs = (relay_show -1 + Energy->Settings.gui_cols) / Energy->Settings.gui_cols;
if (tabs > 1) {
@@ -1668,12 +1671,12 @@ void EnergyShow(bool json) {
WSContentSend_P(PSTR("{e}")); // Last column is units ({e} = | )
#endif // USE_ENERGY_COLUMN_GUI
if (Energy->voltage_available) {
- WSContentSend_PD(HTTP_SNS_VOLTAGE, WebEnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, Energy->voltage_common));
+ WSContentSend_PD(HTTP_SNS_VOLTAGE, WebEnergyFormat(value_chr, Energy->voltage, Settings->flag2.voltage_resolution, voltage_common));
}
if (!Energy->type_dc) {
if (!isnan(Energy->frequency[0])) {
WSContentSend_PD(PSTR("{s}" D_FREQUENCY "{m}%s " D_UNIT_HERTZ "{e}"),
- WebEnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, Energy->frequency_common));
+ WebEnergyFormat(value_chr, Energy->frequency, Settings->flag2.frequency_resolution, frequency_common));
}
}
if (Energy->current_available) {
diff --git a/tools/decode-status.py b/tools/decode-status.py
index 567d54d90..52ddfc257 100755
--- a/tools/decode-status.py
+++ b/tools/decode-status.py
@@ -205,7 +205,8 @@ a_setoption = [[
"(MQTT) Disable publish SSerialReceived MQTT messages, you must use event trigger rules instead",
"(Light) start DMX ArtNet at boot, listen to UDP port as soon as network is up",
"(Wifi) prefer IPv6 DNS resolution to IPv4 address when available. Requires `#define USE_IPV6`",
- "","","","",
+ "(Energy) Force no voltage/frequency common",
+ "","","",
"","","","",
"","","","",
"","","","",
@@ -322,7 +323,7 @@ else:
obj = json.load(fp)
def StartDecode():
- print ("\n*** decode-status.py v12.3.1.2 by Theo Arends and Jacek Ziolkowski ***")
+ print ("\n*** decode-status.py v12.3.1.5 by Theo Arends and Jacek Ziolkowski ***")
# print("Decoding\n{}".format(obj))