How to get P1 meter values every 5 seconds

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
schlebe
Posts: 2
Joined: Monday 18 November 2024 18:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

How to get P1 meter values every 5 seconds

Post by schlebe »

Hello,

I defined a P1 meter hardware specifying "Rate Limit" to 5 seconds. (see image below)
image_2024-11-18_182141533.png
image_2024-11-18_182141533.png (52.56 KiB) Viewed 1299 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
image_2024-11-18_185834532.png (62.5 KiB) Viewed 1295 times
User avatar
waltervl
Posts: 5384
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to get P1 meter values every 5 seconds

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
HvdW
Posts: 531
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: How to get P1 meter values every 5 seconds

Post by HvdW »

I wonder: What makes it so important to have these data every 5 seconds.
Bugs bug me.
schlebe
Posts: 2
Joined: Monday 18 November 2024 18:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to get P1 meter values every 5 seconds

Post 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.
User avatar
waltervl
Posts: 5384
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to get P1 meter values every 5 seconds

Post 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.....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PierreT
Posts: 50
Joined: Wednesday 03 May 2023 10:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: How to get P1 meter values every 5 seconds

Post 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.
HvdW
Posts: 531
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: How to get P1 meter values every 5 seconds

Post 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.
Bugs bug me.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests