mirror of https://github.com/arendst/Tasmota.git
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)
|
||||
- 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 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)
|
||||
- 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 SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)
|
||||
|
||||
## Released
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ struct ENERGY {
|
|||
|
||||
#ifdef SDM630_IMPORT
|
||||
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 start_energy = 0; // 12345.12345 kWh total previous
|
||||
|
@ -994,7 +994,7 @@ void EnergyShow(bool json)
|
|||
char active_power_chr[Energy.phase_count][FLOATSZ];
|
||||
#ifdef SDM630_IMPORT
|
||||
char import_active_chr[Energy.phase_count][FLOATSZ];
|
||||
#endif
|
||||
#endif // SDM630_IMPORT
|
||||
char export_active_chr[Energy.phase_count][FLOATSZ];
|
||||
for (uint32_t i = 0; i < Energy.phase_count; 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]);
|
||||
#ifdef SDM630_IMPORT
|
||||
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]);
|
||||
}
|
||||
|
||||
|
@ -1054,7 +1054,7 @@ void EnergyShow(bool json)
|
|||
EnergyFormatIndex(value_chr, energy_return_chr[0], json, 2));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // SDM630_IMPORT
|
||||
|
||||
if (!isnan(Energy.export_active[0])) {
|
||||
ResponseAppend_P(PSTR(",\"" D_JSON_EXPORT_ACTIVE "\":%s"),
|
||||
|
@ -1164,7 +1164,7 @@ void EnergyShow(bool json)
|
|||
if (!isnan(Energy.import_active[0])) {
|
||||
WSContentSend_PD(HTTP_ENERGY_SNS4, EnergyFormat(value_chr, import_active_chr[0], json));
|
||||
}
|
||||
#endif
|
||||
#endif // SDM630_IMPORT
|
||||
|
||||
XnrgCall(FUNC_WEB_SENSOR);
|
||||
#endif // USE_WEBSERVER
|
||||
|
|
|
@ -64,7 +64,7 @@ const uint16_t sdm630_start_addresses[] {
|
|||
0x015A, // + + + kWh Phase 1 import active energy
|
||||
0x015C, // + + + kWh Phase 2 import active energy
|
||||
0x015E, // + + + kWh Phase 3 import active energy
|
||||
#endif
|
||||
#endif // SDM630_IMPORT
|
||||
0x0156 // + + + kWh Total active energy
|
||||
};
|
||||
|
||||
|
@ -192,7 +192,7 @@ void SDM630Every250ms(void)
|
|||
break;
|
||||
|
||||
case 22:
|
||||
#endif
|
||||
#endif // SDM630_IMPORT
|
||||
EnergyUpdateTotal(value, true);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue