Fake Gasmeter

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Fake Gasmeter

Post by Derik »

Dear..

Is there perhaps someone that is using a dummy gasmeter to see the usage of Kwh
I hope someone have this working so i can upload Kwh [ from my heatpump ] to www.mindergas.nl
What i am searching for is a dummy gasmeter, that is for real a kwh meter and this dummy have to count the actual and the total usage of the kwh meter.
When i have this working, i can upload this dummy gasmeter to www.mindergas.nl every day.
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
SweetPants

Re: Fake Gasmeter

Post by SweetPants »

Can you elaborate on a gas meter that usage Kwh?
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Fake Gasmeter

Post by Derik »

SweetPants wrote: Monday 04 February 2019 20:06 Can you elaborate on a gas meter that usage Kwh?
I use a script to divide the Heatpump Kwh meter to 2Kwh to 1M3 gas.
And this Kwh meter is set to a dummy gas.:

DZ vents script Khw to Gas:

Code: Select all

return {
on = { timer = { "every 1 minutes"}}, --at 21:52 every minute

execute = function(dz)

local WarmtepompKWH = dz.devices('Z: WP Tot').counterToday 
dz.log(WarmtepompKWH)
local WP_gas = dz.devices('D.M.: WP naar Gas')
local usage = WarmtepompKWH * 500
dz.log(usage)
WP_gas.updateGas(usage)
dz.openURL('http://192.168.5.70:8080/json.htm?type=command&param=udevice&idx=12268&nvalue=0&svalue='..usage)
end
}
So i get a dummy filled with "gas":
ScreenShot211.jpg
ScreenShot211.jpg (15.59 KiB) Viewed 576 times
Only i mis the total counter.. this counter that is in this meter is only a day total counter.

And this total counter [ a Always total counter not for 1 day ] is needed for a good upload tot mindergas
www.mindergas.nl
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
SweetPants

Re: Fake Gasmeter

Post by SweetPants »

If i remember correct, there was a total counter in the passed, but it is removed. Total counters (per year) are now in the reports section. I'am afraid you have to calculate this yourself.
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Fake Gasmeter

Post by Derik »

SweetPants wrote: Monday 04 February 2019 20:25 If i remember correct, there was a total counter in the passed, but it is removed. Total counters (per year) are now in the reports section. I'am afraid you have to calculate this yourself.
So i must make a feature request?


And do know what type of counter in the dummy section looks a gasmeter? so that have a total counter like the gasmeter?
Perhaps i can upload that on to mindergas..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Fake Gasmeter

Post by waaren »

Derik wrote: Monday 04 February 2019 20:30 So i must make a feature request?
No.
domoticz gas meter devices (real or virtual are the same internally) only store the total value in table deviceStatus. The daily usage is the result of a calculation (subtract max value from meter_calendar from current value)
So if you want to update the gas meter you should do something like

Code: Select all

gas = domoticz.devices("your gas meter) 
wpWHTotal=dz.devices('Z: WP Tot').WhTotal
gas.updateGas(wpWHTotal * 500) 
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest