Skip to content

Send periodic Energy consumption #408

@darkstar0x714

Description

@darkstar0x714

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?!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions