MicroOcpp icon indicating copy to clipboard operation
MicroOcpp copied to clipboard

Send periodic Energy consumption

Open darkstar0x714 opened this issue 8 months ago • 0 comments

Hello

First of all thanks for your efforts to make such great lib

I am testing my charger on custom backend it worked fine in on/off but it only send energy just on start and end of each transaction i need to make send it periodically every 30 sec. For example

I changed both lines in lib. And i got nothing

meterValueSampleIntervalInt = declareConfiguration<int>("MeterValueSampleInterval", 30); // changed from 60

And also

meterValuesInTxOnlyBool = declareConfiguration<bool>(MO_CONFIG_EXT_PREFIX "MeterValuesInTxOnly", false); // changed from true

I am using this function in my setup code

addMeterValueInput([]()
                           {
                Serial.println("[main] Energy meter input requested");

                return currentEnergyWh ; }, "Energy.Active.Import.Register", "Wh", nullptr, nullptr, 2);

Also used it in loop each 30 second and got nothing too

Any help with that situation?!

darkstar0x714 avatar Apr 08 '25 21:04 darkstar0x714