Gas counter Topic is solved

Moderator: leecollings

Post Reply
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Gas counter

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

Re: Gas counter

Post by waltervl »

This would perhaps something as a start: viewtopic.php?t=18848
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Gas counter

Post by jacobsentertainment »

Looks ok but aint working, thanks for the tip, getting little closer
User avatar
waltervl
Posts: 5886
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Gas counter

Post by waltervl »

In DzVents you can start with this
viewtopic.php?p=274121#p274121
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Gas counter

Post by jacobsentertainment »

waltervl wrote: Wednesday 05 May 2021 22:16 In DzVents you can start with this
viewtopic.php?p=274121#p274121
Thanks a lot, works just fine! Now search for a way to convert this to an gas volume...
User avatar
waltervl
Posts: 5886
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Gas counter

Post by waltervl »

jacobsentertainment wrote: Wednesday 05 May 2021 23:33
waltervl wrote: Wednesday 05 May 2021 22:16 In DzVents you can start with this
viewtopic.php?p=274121#p274121
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)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Gas counter

Post by jacobsentertainment »

8-) Works perfectly, got it all sorted now. Thanks! :mrgreen:
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Gas counter

Post by jacobsentertainment »

One last question, is there a way to reset the counter to 0 or an specific number?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Gas counter

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Gas counter

Post 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!
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Gas counter

Post 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
offset.png (35.12 KiB) Viewed 834 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Gas counter

Post by jacobsentertainment »

That works partly
brander.jpg
brander.jpg (73.39 KiB) Viewed 834 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 :lol:
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest