Thanks for your answer.
A bit more background: I would like to be able to command appliances depending on my current consumption and solar production of power. Therefore, I am trying to create an average per minute or per 5 minutes of the power used in my home. Further, the logs are filling up very fast for nothing (the power consumed reading ("ElectricityPowerDelivered") is producing 86400 lines in the log every day), so I was thinking to also reduce the logs; finally, I'd like to make graphs, and those are too slow with so many points to plot.
My electricity meter produces output every second, that is being input into FHEM. Only modified values are logged by FHEM, example of my meter's log in FHEM:
2022-02-03_11:25:34 CompteurORES ElectricityPowerDelivered: 0.896 kW
2022-02-03_11:25:35 CompteurORES TelegramTime: 2022-02-03 11:25:35
2022-02-03_11:25:35 CompteurORES ElectricityDeliveredLowTariff: 212.821 kWh
2022-02-03_11:25:35 CompteurORES ElectricityPowerDelivered: 0.900 kW
2022-02-03_11:25:36 CompteurORES TelegramTime: 2022-02-03 11:25:36
2022-02-03_11:25:37 CompteurORES TelegramTime: 2022-02-03 11:25:37
2022-02-03_11:25:37 CompteurORES ElectricityPowerDelivered: 0.897 kW
2022-02-03_11:25:38 CompteurORES TelegramTime: 2022-02-03 11:25:38
2022-02-03_11:25:38 CompteurORES ElectricityPowerDelivered: 0.884 kW
2022-02-03_11:25:39 CompteurORES TelegramTime: 2022-02-03 11:25:39
2022-02-03_11:25:39 CompteurORES ElectricityDeliveredLowTariff: 212.822 kWh
2022-02-03_11:25:39 CompteurORES ElectricityPowerDelivered: 0.900 kW
This is the list of counters that can be updated by my smart meter:
ElectricityDeliveredLowTariff
ElectricityDeliveredNormalTariff
ElectricityPowerDelivered
ElectricityPowerProduced
ElectricityProducedLowTariff
ElectricityProducedNormalTariff
ElectricityThreshold
SwitchPositionElectricity
TariffIndicatorElectricity
TelegramTime
state
I have successfully used event-aggregator on my smart meter device in FHEM, on the reading "ElectricityPowerDelivered" to have only 1 logging per 10 seconds, but then I cannot use another event-aggregator on the same device to also reduce the logging of "ElectricityPowerProduced" (which is updated when I send power to the grid).
In the commandref, it is indicated to use a notify to multiply a device reading when we are hit by the limitation of only 1 event-aggregator possible per device. This is what I was trying to do as described in my first post, and it works almost OK, except that I have my reading coming to:
triggeredByEvent ElectricityPowerDelivered: 0.718834714600045
This is already a 10-seconds average (done by event-aggregator in the smart meter device, as a test). And from this reading, event-aggregator won't work because of the "ElectricityPowerDelivered" text. So if I can get rid of this text, and just keep the value in the field then it should work.
Thanks !