Page 1 of 1
Gas counter
Posted: Tuesday 04 May 2021 17:28
by jacobsentertainment
Hi all,
Can someone give me some help, I have an old central heater and hooked up an sensor to the burner, now I can monitor the time this is powered/on and with the som of how much gas it uses per hour i can make the calculations.
I'm aiming for an counter that counts the time the burner is on and as I have an number of how much it uses per hour/minute an extra counter that counts gas in M³
I already found some dummies where I can make the sensor but I have no clue how to create a script for this any help is appreciated.
Re: Gas counter
Posted: Tuesday 04 May 2021 19:43
by waltervl
This would perhaps something as a start:
viewtopic.php?t=18848
Re: Gas counter
Posted: Wednesday 05 May 2021 20:46
by jacobsentertainment
Looks ok but aint working, thanks for the tip, getting little closer
Re: Gas counter
Posted: Wednesday 05 May 2021 22:16
by waltervl
In DzVents you can start with this
viewtopic.php?p=274121#p274121
Re: Gas counter
Posted: Wednesday 05 May 2021 23:33
by jacobsentertainment
Thanks a lot, works just fine! Now search for a way to convert this to an gas volume...
Re: Gas counter
Posted: Thursday 06 May 2021 7:31
by waltervl
jacobsentertainment wrote: ↑Wednesday 05 May 2021 23:33
Thanks a lot, works just fine! Now search for a way to convert this to an gas volume...
Change line
iCounter.updateCounter(secondsActive)
To
iCounter.updateCounter(secondsActive*conversionfactor)
And change the virtual custom device from time to gas with units m3 (or whatever you want to use)
Re: Gas counter
Posted: Thursday 06 May 2021 11:06
by jacobsentertainment

Works perfectly, got it all sorted now. Thanks!

Re: Gas counter
Posted: Thursday 06 May 2021 22:15
by jacobsentertainment
One last question, is there a way to reset the counter to 0 or an specific number?
Re: Gas counter
Posted: Thursday 06 May 2021 22:22
by waaren
jacobsentertainment wrote: ↑Thursday 06 May 2021 22:15
One last question, is there a way to reset the counter to 0 or an specific number?
Only by editing the data in the database using sqlite or similar tool.
Re: Gas counter
Posted: Thursday 06 May 2021 22:26
by jacobsentertainment
waaren wrote: ↑Thursday 06 May 2021 22:22
Only by editing the data in the database using sqlite or similar tool.
Ok thanks for the reply!
Re: Gas counter
Posted: Thursday 06 May 2021 22:35
by waaren
jacobsentertainment wrote: ↑Thursday 06 May 2021 22:26
waaren wrote: ↑Thursday 06 May 2021 22:22
Only by editing the data in the database using sqlite or similar tool.
Ok thanks for the reply!
Sorry I was under the impression that you used a gas device type. For a counter you could try using the offset in the edit popup from the utility tab.

- offset.png (35.12 KiB) Viewed 842 times
Re: Gas counter
Posted: Thursday 06 May 2021 22:45
by jacobsentertainment
That works partly

- brander.jpg (73.39 KiB) Viewed 842 times
I think the hard way is the best way to set it to 0. delete the counter, create a new one and adjust the idx number in the script. It's a rough one but works
