Page 1 of 1

virtual P1 meter Gas

Posted: Tuesday 02 December 2025 12:24
by hansdeh
Hi,

I created a virtual P1 meter where i want to store the gas usage by using hot water from the central heating system.

I count the numbers of minutes the system delivers hot water and i found out that one minute hot water usage average 50 liters of gas. When the hot water is shutdown a scripts calculates the number of minutes and multiplying by 50 i have the gasusage i want to store i the P1 meter using updateGas.

I found out that the P1 meter stores the total amount of gas asege per 5 minutes and then calculates the usage for that 5 minutes by substraction.

My problem is that i did not succeed to get that value in a local variable in dzVents so i cannot calculated the new value to store in the P1 meter.

Anyone an idea how to get the value out of the P1 meter into a local variable in DZVents.

Tnx,
Hans

Re: virtual P1 meter Gas

Posted: Tuesday 02 December 2025 17:09
by waltervl
Does the hot water system counts the total liters of hot water? Because then you can divide that with 50 to get the total liters of Gas used for hot water. That total value can be sent to the P1 Gas meter every 5 minutes.

And what kind of hot water/heating system do you use? Perhaps there are other ways to monitor the hot water gas usage.

Re: virtual P1 meter Gas

Posted: Tuesday 02 December 2025 21:34
by hansdeh
The problem is that with the p1 gasmeter you have to add the usage with the stored usage and write the total in then pp1 meter with updateGas.
The issue is that I don't know how to get the stored value out of the P1 meter into a local value in dzVents.
I now changed to a standard incrementele counter where i can get the value. So I have the solution, but now I want to know how to get the value out of the virtual P1 Gasmeter. This because I have searched days fot it.

Re: virtual P1 meter Gas

Posted: Tuesday 02 December 2025 22:24
by waltervl
See the dzvents wiki for Gas https://wiki.domoticz.com/DzVents:_next ... ipting#Gas

.counter: Number. Value in m3
.counterToday: Number. Value in m3