Skip to content

Commit fdeffa3

Browse files
committed
esp32.cpp: add Current.Import and Temperature to OCPP MeteredValues
1 parent 85ade35 commit fdeffa3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SmartEVSE-3/src/esp32.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,6 +2605,11 @@ void ocppInit() {
26052605
// Parameters: key name, default value, filename for persistence (optional, use CONFIGURATION_FN for default), readonly, rebootRequired, restricted
26062606
MicroOcpp::declareConfiguration<int>("ConfigureMaxCurrent", 16);
26072607

2608+
// Set MeterValuesSampledData to include Current.Import and Temperature in periodic meter values
2609+
// Note: declareConfiguration only sets the default; setString() actively updates the value
2610+
auto meterValuesSampledData = MicroOcpp::declareConfiguration<const char*>("MeterValuesSampledData", "");
2611+
meterValuesSampledData->setString("Energy.Active.Import.Register,Power.Active.Import,Current.Import,Temperature");
2612+
26082613
OcppUnlockConnectorOnEVSideDisconnect = MicroOcpp::declareConfiguration<bool>("UnlockConnectorOnEVSideDisconnect", true);
26092614

26102615
endTransaction(nullptr, "PowerLoss"); // If a transaction from previous power cycle is still running, abort it here

0 commit comments

Comments
 (0)