Page 1 of 1
How to get P1 meter values every 5 seconds
Posted: Monday 18 November 2024 18:30
by schlebe
Hello,
I defined a P1 meter hardware specifying "Rate Limit" to 5 seconds. (see image below)

- image_2024-11-18_182141533.png (52.56 KiB) Viewed 1814 times
Now when I click to "LOG" on specific device to see graphes, the measures are displayed every 5 MINUTES.
I have also copied Sqlite3 database "domoticz.db" on Windows using scp PowerWhell command.
When I select "Meter" table to see all rows, every hour I have only 12 measures (one measure every 5 MINUTES).
What must I do to get a measure every 5 SECONDS and not every 5 MINUTES ?
Best regards

- image_2024-11-18_185834532.png (62.5 KiB) Viewed 1810 times
Re: How to get P1 meter values every 5 seconds
Posted: Monday 18 November 2024 19:10
by waltervl
The data is send to Domoticz every 5 seconds (you can check it on the device widget changing values every 5 seconds).
But in the database that data is avaraged and logged every 5 minutes as else the database will grow too large.
If you want to see the data change every 5 seconds you will have to forward it to another database like influxDB
For performance reasons it is not advised to set a rate of 5 seconds but min 10. Even better is 30 or 60 seconds. As you have scripts or MQTT running it can overload the system with low rates.
See also the wiki
https://wiki.domoticz.com/Dutch_DSMR_sm ... th_P1_port
Re: How to get P1 meter values every 5 seconds
Posted: Tuesday 19 November 2024 0:33
by HvdW
I wonder: What makes it so important to have these data every 5 seconds.
Re: How to get P1 meter values every 5 seconds
Posted: Tuesday 19 November 2024 8:18
by schlebe
In my case, P1 measures are used for 2 distinct things
1. to obtain usage and delivery in kWh
2. to compute lost in kWh when my converter is down because voltage is too high
For first point, I don't need a measure every 5 seconds; but for second this is important.
Re: How to get P1 meter values every 5 seconds
Posted: Tuesday 19 November 2024 14:24
by waltervl
Your Solar inverter has no monitoring in Domoticz? As that is the only reliable source. By the way you can never calculate your loss. You only know when the the inverter was switched off and on again. You cannot calculate what it perhaps could have produced.....
Re: How to get P1 meter values every 5 seconds
Posted: Friday 22 November 2024 9:31
by PierreT
schlebe wrote: ↑Tuesday 19 November 2024 8:18
In my case, P1 measures are used for 2 distinct things
1. to obtain usage and delivery in kWh
2. to compute lost in kWh when my converter is down because voltage is too high
For first point, I don't need a measure every 5 seconds; but for second this is important.
Seems like an impossible task since you can't measure what doesn't exist and the real question here is what you would define as "loss". Would that be the expected output from the PV or the usage being registered on the P1 during the time that the converter is down?
For the latter, assuming that your PV is capable of producing significantly more than you'll ever use then your converter going down should be fairly obvious as this will cause delivery to suddenly drop to zero while at the same time the reported voltage is above say 250V (you'll want to apply an error margin). You could thus create an event to flip a dummy switch whenever this occurs and then obviously a second event to flip it back once delivery starts being reported again on the P1, or sundown. Additionally you could then use that switch state to replicate usage data to a dummy simple energy meter so you wouldn't have to inspect the graphs and do al the calculations yourself.
Re: How to get P1 meter values every 5 seconds
Posted: Friday 22 November 2024 11:24
by HvdW
Totally agree with @PierreT.
Seems like an impossible task since you can't measure what doesn't exist and the real question here is what you would define as "loss".
@schlebe
to compute lost in kWh when my converter is down because voltage is too high
The urge to go to the bottom of the cup will make you frustrated whilst 5 minutes lost won't make you a poor person.
Realising this will give you peace of mind which is more valuable than anything else.