mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 04:06:34 +00:00
Add SDM630 three phase ImportActive Energy display
Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)
This commit is contained in:
parent
d0028eb2e4
commit
ad3cfa6cbb
@ -69,3 +69,4 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
|
|||||||
- Change pulsetime to allow use for all relays with 8 interleaved so ``Pulsetime1`` is valid for Relay1, Relay9, Relay17 etc. (#9279)
|
- Change pulsetime to allow use for all relays with 8 interleaved so ``Pulsetime1`` is valid for Relay1, Relay9, Relay17 etc. (#9279)
|
||||||
- Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
|
- Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
|
||||||
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
|
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
|
||||||
|
- Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
- Change pulsetime to allow use for all relays with 8 interleaved so ``Pulsetime1`` is valid for Relay1, Relay9, Relay17 etc. (#9279)
|
- Change pulsetime to allow use for all relays with 8 interleaved so ``Pulsetime1`` is valid for Relay1, Relay9, Relay17 etc. (#9279)
|
||||||
- Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
|
- Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
|
||||||
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
|
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
|
||||||
|
- Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)
|
||||||
|
|
||||||
## Released
|
## Released
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ struct ENERGY {
|
|||||||
|
|
||||||
#ifdef SDM630_IMPORT
|
#ifdef SDM630_IMPORT
|
||||||
float import_active[3] = { NAN, NAN, NAN }; // 123.123 kWh
|
float import_active[3] = { NAN, NAN, NAN }; // 123.123 kWh
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
float export_active[3] = { NAN, NAN, NAN }; // 123.123 kWh
|
float export_active[3] = { NAN, NAN, NAN }; // 123.123 kWh
|
||||||
|
|
||||||
float start_energy = 0; // 12345.12345 kWh total previous
|
float start_energy = 0; // 12345.12345 kWh total previous
|
||||||
@ -994,7 +994,7 @@ void EnergyShow(bool json)
|
|||||||
char active_power_chr[Energy.phase_count][FLOATSZ];
|
char active_power_chr[Energy.phase_count][FLOATSZ];
|
||||||
#ifdef SDM630_IMPORT
|
#ifdef SDM630_IMPORT
|
||||||
char import_active_chr[Energy.phase_count][FLOATSZ];
|
char import_active_chr[Energy.phase_count][FLOATSZ];
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
char export_active_chr[Energy.phase_count][FLOATSZ];
|
char export_active_chr[Energy.phase_count][FLOATSZ];
|
||||||
for (uint32_t i = 0; i < Energy.phase_count; i++) {
|
for (uint32_t i = 0; i < Energy.phase_count; i++) {
|
||||||
dtostrfd(Energy.voltage[i], Settings.flag2.voltage_resolution, voltage_chr[i]);
|
dtostrfd(Energy.voltage[i], Settings.flag2.voltage_resolution, voltage_chr[i]);
|
||||||
@ -1002,7 +1002,7 @@ void EnergyShow(bool json)
|
|||||||
dtostrfd(Energy.active_power[i], Settings.flag2.wattage_resolution, active_power_chr[i]);
|
dtostrfd(Energy.active_power[i], Settings.flag2.wattage_resolution, active_power_chr[i]);
|
||||||
#ifdef SDM630_IMPORT
|
#ifdef SDM630_IMPORT
|
||||||
dtostrfd(Energy.import_active[i], Settings.flag2.energy_resolution, import_active_chr[i]);
|
dtostrfd(Energy.import_active[i], Settings.flag2.energy_resolution, import_active_chr[i]);
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
dtostrfd(Energy.export_active[i], Settings.flag2.energy_resolution, export_active_chr[i]);
|
dtostrfd(Energy.export_active[i], Settings.flag2.energy_resolution, export_active_chr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1054,7 +1054,7 @@ void EnergyShow(bool json)
|
|||||||
EnergyFormatIndex(value_chr, energy_return_chr[0], json, 2));
|
EnergyFormatIndex(value_chr, energy_return_chr[0], json, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
|
|
||||||
if (!isnan(Energy.export_active[0])) {
|
if (!isnan(Energy.export_active[0])) {
|
||||||
ResponseAppend_P(PSTR(",\"" D_JSON_EXPORT_ACTIVE "\":%s"),
|
ResponseAppend_P(PSTR(",\"" D_JSON_EXPORT_ACTIVE "\":%s"),
|
||||||
@ -1164,7 +1164,7 @@ void EnergyShow(bool json)
|
|||||||
if (!isnan(Energy.import_active[0])) {
|
if (!isnan(Energy.import_active[0])) {
|
||||||
WSContentSend_PD(HTTP_ENERGY_SNS4, EnergyFormat(value_chr, import_active_chr[0], json));
|
WSContentSend_PD(HTTP_ENERGY_SNS4, EnergyFormat(value_chr, import_active_chr[0], json));
|
||||||
}
|
}
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
|
|
||||||
XnrgCall(FUNC_WEB_SENSOR);
|
XnrgCall(FUNC_WEB_SENSOR);
|
||||||
#endif // USE_WEBSERVER
|
#endif // USE_WEBSERVER
|
||||||
|
@ -64,7 +64,7 @@ const uint16_t sdm630_start_addresses[] {
|
|||||||
0x015A, // + + + kWh Phase 1 import active energy
|
0x015A, // + + + kWh Phase 1 import active energy
|
||||||
0x015C, // + + + kWh Phase 2 import active energy
|
0x015C, // + + + kWh Phase 2 import active energy
|
||||||
0x015E, // + + + kWh Phase 3 import active energy
|
0x015E, // + + + kWh Phase 3 import active energy
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
0x0156 // + + + kWh Total active energy
|
0x0156 // + + + kWh Total active energy
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ void SDM630Every250ms(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 22:
|
case 22:
|
||||||
#endif
|
#endif // SDM630_IMPORT
|
||||||
EnergyUpdateTotal(value, true);
|
EnergyUpdateTotal(value, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user