how to copy data from watermeter to waterflow [Solved]
Moderator: leecollings
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
how to copy data from watermeter to waterflow [Solved]
Hello,
i have a virtual watermeter(counter incremental) which receives the liters used.
it does so on a 60 second base.
now i want to copy what is send to the watermeter also to the waterflow(virtual device) to get the amount of liters/minute.
should be straight forward but i can not get this to work.
i either need what was send to the watermeter also send to the waterflow
or
watermeter-current-value minus watermeter-previous-value send to waterflow.
using the watermeter as a trigger device
is there an easy way to do this?
It can be done by using json but it seems a bit as a workaround(use json to update the weaterflow)
also does this command domoticz.device(' waterflow' ).update(liters) exist.
i know there are a lot of update features but they are not available on a flow device, only on temp and barometer or energy devices
thanks
i have a virtual watermeter(counter incremental) which receives the liters used.
it does so on a 60 second base.
now i want to copy what is send to the watermeter also to the waterflow(virtual device) to get the amount of liters/minute.
should be straight forward but i can not get this to work.
i either need what was send to the watermeter also send to the waterflow
or
watermeter-current-value minus watermeter-previous-value send to waterflow.
using the watermeter as a trigger device
is there an easy way to do this?
It can be done by using json but it seems a bit as a workaround(use json to update the weaterflow)
also does this command domoticz.device(' waterflow' ).update(liters) exist.
i know there are a lot of update features but they are not available on a flow device, only on temp and barometer or energy devices
thanks
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Could look like below
dzVents has a native method WaterflowUpdate for this since version 2.1 (domoticz V3.8088)i know there are a lot of update features but they are not available on a flow device, only on temp and barometer or energy devices
Code: Select all
return
{
on =
{
devices =
{
'waterMeter', -- change to name of your watermeter
},
},
data =
{
water =
{
initial = {},
},
},
execute = function(dz, item)
local factor = 1 -- this might need to be changed depending on if your meter is in liters or m3 or different.
local waterFlow = dz.devices('waterFlow')
local waterTotal = tonumber(item.sValue) * factor -- watermeter can be of type counter or custom sensor sValue works for both
if dz.data.water.total ~= nil then -- first reading does not update the flowmeter
waterFlow.cancelQueuedCommands()
local pastTime = dz.data.water.lastTime - dz.time.dDate -- seconds since last time
local waterFlowValue = ( waterTotal - dz.data.water.total ) * 60 / math.max(pastTime,60) -- liter / min
waterFlow.updateWaterflow(waterFlowValue)
waterFlow.updateWaterflow(0).afterSec(60) -- if no new data within 60 seconds the reset flow to 0
end
dz.data.water.total = waterTotal
dz.data.water.lastTime = dz.time.dDate
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
hmm.
getting this error
lua:27: attempt to index a number value (local 'waterFlow')
line 27 is waterFlow.updateWaterflow(waterFlow)
i named my flow meter waterFlow like in the script.
could it be that the local name being the same as the device name is causing this?
getting this error
lua:27: attempt to index a number value (local 'waterFlow')
line 27 is waterFlow.updateWaterflow(waterFlow)
i named my flow meter waterFlow like in the script.
could it be that the local name being the same as the device name is causing this?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Can you change line 26/27 to
Code: Select all
local waterFlowValue = ( waterTotal - dz.data.water.total ) * 60 / math.max(pastTime,60) -- liter / min
waterFlow.updateWaterflow(waterFlowValue)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
ok tried again but the waterflow meter (named Flow) updates with a value of 446464
UPDATE
found the problem
my watermeter is an incremental counter so i needed to use .counterToday
Thanks Waaren for the help
UPDATE
found the problem
my watermeter is an incremental counter so i needed to use .counterToday
Thanks Waaren for the help
Code: Select all
return
{
on =
{
devices =
{
'Watermeter', -- change to name of your watermeter
},
},
data =
{
water =
{
initial = {},
},
},
execute = function(dz, item)
local factor = 1 -- this might need to be changed depending on if your meter is in liters or m3 or different.
local waterFlow = dz.devices('Flow')
local waterTotal = item.counterToday * factor -- watermeter can be of type counter or custom sensor sValue works for both
if dz.data.water.total ~= nil then -- first reading does not update the flowmeter
waterFlow.cancelQueuedCommands()
local pastTime = dz.data.water.lastTime - dz.time.dDate -- seconds since last time
local waterFlowValue = ( waterTotal - dz.data.water.total ) * 60 / math.max(pastTime,60) -- liter / min
waterFlow.updateWaterflow(waterFlowValue)
waterFlow.updateWaterflow(0).afterSec(5) -- if no new data within 60 seconds the reset flow to 0
end
dz.data.water.total = waterTotal
dz.data.water.lastTime = dz.time.dDate
end
}
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
@waaren, can you look at this script.
i modified it so i can calculate a more accurate flow
the watermeter now gets updated instantly
i then calculate the time between 2 updates to calculate the flow.
It seems to work allright but the flow fluctuates a bit and i am not sure i did calculate things right.
i
i modified it so i can calculate a more accurate flow
the watermeter now gets updated instantly
i then calculate the time between 2 updates to calculate the flow.
It seems to work allright but the flow fluctuates a bit and i am not sure i did calculate things right.
i
Code: Select all
return
{
on =
{
devices =
{
'Watermeter', -- change to name of your watermeter
},
},
data =
{
water =
{
initial = {},
},
},
execute = function(dz, item)
local Time = require('Time')
local currentTime = Time()
local factor = 1000 -- this might need to be changed depending on if your meter is in liters or m3 or different.
local waterFlow = dz.devices('Flow')
local waterTotal = item.counterToday * factor -- watermeter can be of type counter or custom sensor sValue works for both
if dz.data.water.total ~= waterTotal then -- first reading does not update the flowmeter
waterFlow.cancelQueuedCommands()
local pasttime = (currentTime.compare(dz.data.water.lastTime).milliseconds)
local waterFlowValue = 60000 / pasttime
waterFlowValue = dz.round(waterFlowValue,2)
waterFlow.updateWaterflow(waterFlowValue)
waterFlow.updateWaterflow(0).afterSec(60) -- if no new data within 60 seconds then reset flow to 0
end
dz.data.water.total = waterTotal
dz.data.water.lastTime = currentTime
end
}
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
In terms of script-logic I don't see a problem but you assume here an accuracy that is simply not there.
The watermeter total is not updated every second let alone milliseconds and even if that would be the case, the performance optimized way dzVents and Lua bundles information from all devices to be processed in the scripts causes the real time data to be off by sometimes more then a second.
So for the sake of understanding the process it's ok but please don't take it to serious.
Another thing to consider here is that you now write the complete dzVents time object as a table to persistent data.
This will write 189 lines 4150 bytes to disk every run. In the original script it was 7 lines / 150 bytes
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Yes i know accuracy is off but in the old situation it was even worse.
old situation Watermeter update once every 60 seconds: resolution 1 liter
new situation Watermeter updates with usage of every liter :resolution better than 1 liter(but it still fluctuates with a delta of 2 liters)
is there anything i can do to avoid flooding memory and still get a little better accuray than 1 liter or 1 second?
if not i might go back to the old situation.
i like it that the Watermaeter changes instantly on usage but the flow functionality is not more accurate, just faster in updating the real flow
old situation Watermeter update once every 60 seconds: resolution 1 liter
new situation Watermeter updates with usage of every liter :resolution better than 1 liter(but it still fluctuates with a delta of 2 liters)
is there anything i can do to avoid flooding memory and still get a little better accuray than 1 liter or 1 second?
if not i might go back to the old situation.
i like it that the Watermaeter changes instantly on usage but the flow functionality is not more accurate, just faster in updating the real flow
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Not with domoticz.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
ok, clear.
i however noticed that the compare function can be used to compare on a millisecond level but the outcome is still on a second resolution base
eg it is comparing 2 times but the difference is not measured in milliseconds but in seconds/1000
This is the reason i still get 8,57L or 10 liter as outcome
i noticed that when you use data with history is true you can compare 2 timestamps and get the difference in milliseconds by using the msAgo option.
Tried something but i lack the knowlegde
if this works on the current data we can get low memory usage and still get better resolution
The only thing i want is something more accurate than 1 liter or 1 second
eg 8,57 or 10 liter means the real usage is probably more towards the 10 liter but missing 1 pulse drops the outcome to 8,57
i however noticed that the compare function can be used to compare on a millisecond level but the outcome is still on a second resolution base
Code: Select all
local pastTime = tonumber (t.compare(dz.data.water.lastTime).ms)
This is the reason i still get 8,57L or 10 liter as outcome
i noticed that when you use data with history is true you can compare 2 timestamps and get the difference in milliseconds by using the msAgo option.
Tried something but i lack the knowlegde
if this works on the current data we can get low memory usage and still get better resolution
The only thing i want is something more accurate than 1 liter or 1 second
eg 8,57 or 10 liter means the real usage is probably more towards the 10 liter but missing 1 pulse drops the outcome to 8,57
-
- Posts: 147
- Joined: Thursday 13 August 2015 13:36
- Target OS: NAS (Synology & others)
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Hello all,
I have try to use the script but I run into problems, I can't get it to work.
From what I found the value dz.data.water.total always stays nil
2021-01-28 17:55:46.718 Status: dzVents: Info: Handling events for: "Watermeter", value: "18446744073709453933"
2021-01-28 17:55:46.718 Status: dzVents: Info: ------ Start internal script: Waterflow-1-1: Device: "Watermeter (Dummy)", Index: 141
2021-01-28 17:55:46.718 Status: dzVents: Info: ------ Finished Waterflow-1-1
2021-01-28 17:55:46.718 Error: dzVents: Error: (3.0.2) An error occurred when calling event handler Waterflow-1-1
2021-01-28 17:55:46.718 Error: dzVents: Error: (3.0.2) ...ticz/scripts/dzVents/generated_scripts/Waterflow-1-1.lua:21: attempt to concatenate a nil value (field 'total')
I have try to use the script but I run into problems, I can't get it to work.
From what I found the value dz.data.water.total always stays nil
2021-01-28 17:55:46.718 Status: dzVents: Info: Handling events for: "Watermeter", value: "18446744073709453933"
2021-01-28 17:55:46.718 Status: dzVents: Info: ------ Start internal script: Waterflow-1-1: Device: "Watermeter (Dummy)", Index: 141
2021-01-28 17:55:46.718 Status: dzVents: Info: ------ Finished Waterflow-1-1
2021-01-28 17:55:46.718 Error: dzVents: Error: (3.0.2) An error occurred when calling event handler Waterflow-1-1
2021-01-28 17:55:46.718 Error: dzVents: Error: (3.0.2) ...ticz/scripts/dzVents/generated_scripts/Waterflow-1-1.lua:21: attempt to concatenate a nil value (field 'total')
Code: Select all
return
{
on =
{
devices =
{
'Watermeter', -- change to name of your watermeter
},
},
data =
{
water =
{
initial = { 0 },
},
},
execute = function(dz, item)
dz.log (' waterTotal= ' .. dz.data.water.total, dz.LOG_FORCE)
if dz.data.water.total ~= nil then -- first reading does not update the flowmeter
local pastTime = dz.time.dDate - dz.data.water.lastTime -- seconds since last time
if pastTime > 55 then
local factor = 1 -- this might need to be changed depending on if your meter is in liters or m3 or different.
local waterFlow = dz.devices('Waterflow')
local waterTotal = item.counterToday * factor -- watermeter can be of type counter or custom sensor sValue works for both
dz.log (' waterTotal= ' .. waterTotal, dz.LOG_FORCE)
local waterFlowValue = dz.utils.round((( waterTotal - dz.data.water.total ) * 60) / pastTime, 2) -- liter / min
dz.log (' waterFlowValue= ' .. waterFlowValue, dz.LOG_FORCE)
if waterFlowValue > 0 then
waterFlow.cancelQueuedCommands()
waterFlow.updateWaterflow(waterFlowValue)
waterFlow.updateWaterflow(0).afterSec(70) -- if no new data within 60 seconds the reset flow to 0
end
dz.data.water.total = waterTotal
dz.data.water.lastTime = dz.time.dDate
end
end
end
}
Best regards Bert
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
the Watermeter in my situation is a dummy counter(not incremental)
after that i have set it to water.
so it is not a waterflow device
i do not use this script anymore
i use the esp to give me both the counter and waterflow(in 0,1 liter)
so basically the esp holds the complete countertotal and sends that value to domoticz
this way i always get the correct value
the same goes for waterflow.
it turns out the esp pulsecounter sends out a time between pulss in ms. i use this number to calculate the exact flow and send this value over to domoticz.
so not more problems regarding timing and fast/slow calls
after that i have set it to water.
so it is not a waterflow device
i do not use this script anymore
i use the esp to give me both the counter and waterflow(in 0,1 liter)
so basically the esp holds the complete countertotal and sends that value to domoticz
this way i always get the correct value
the same goes for waterflow.
it turns out the esp pulsecounter sends out a time between pulss in ms. i use this number to calculate the exact flow and send this value over to domoticz.
so not more problems regarding timing and fast/slow calls
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
The changes made to the script is causing it to fail and that 's why the persistent data is not set / updated ever.
Can you try with this one?
Code: Select all
return
{
on =
{
devices =
{
'Watermeter', -- change to name of your watermeter
},
},
data =
{
water =
{
initial = { },
},
},
execute = function(dz, item)
dz.log (' waterTotal= ' .. ( dz.data.water.total or 'not set yet'), dz.LOG_FORCE)
if dz.data.water.total ~= nil then -- first reading does not update the flowmeter
dz.data.water.lastTime = dz.data.water.lastTime or os.time()
local pastTime = os.time() - dz.data.water.lastTime -- seconds since last time
if pastTime > 55 then
local factor = 1 -- this might need to be changed depending on if your meter is in liters or m3 or different.
local waterFlow = dz.devices('Waterflow')
local waterTotal = item.counterToday * factor -- watermeter can be of type counter or custom sensor sValue works for both
dz.log (' waterTotal= ' .. waterTotal, dz.LOG_FORCE)
local waterFlowValue = dz.utils.round((( waterTotal - dz.data.water.total ) * 60) / pastTime, 2) -- liter / min
dz.log (' waterFlowValue= ' .. waterFlowValue, dz.LOG_FORCE)
if waterFlowValue > 0 then
waterFlow.cancelQueuedCommands()
waterFlow.updateWaterflow(waterFlowValue)
waterFlow.updateWaterflow(0).afterSec(70) -- if no new data within 60 seconds the reset flow to 0
end
dz.data.water.total = waterTotal
dz.data.water.lastTime = os.time()
end
else
dz.data.water.total = 0
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 147
- Joined: Thursday 13 August 2015 13:36
- Target OS: NAS (Synology & others)
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Hi,
I tried the new code and this is what it is telling me.
I hope you can help me a bit with this.
I tried the new code and this is what it is telling me.
- Spoiler: show
I hope you can help me a bit with this.
Best regards Bert
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Sure,
I updated my earlier posted version (the one at 20:00 hr.) It should now only give this message once.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 147
- Joined: Thursday 13 August 2015 13:36
- Target OS: NAS (Synology & others)
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Hi Waaren,
Indeed the new code prevented only gives the message once.
But now i'm running into new problems. The lastTime variable is nil.
Indeed the new code prevented only gives the message once.
But now i'm running into new problems. The lastTime variable is nil.
- Spoiler: show
Best regards Bert
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Sure,
This type of errors occur usually because a variable is not initialized yet. That's also why you get this error here.
It should be solved by below line where the value of dz.data.water.lastTime is initialized with current time (in seconds from 1/1/1970) when stil nil
Code: Select all
dz.data.water.lastTime = dz.data.water.lastTime or os.time()
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 147
- Joined: Thursday 13 August 2015 13:36
- Target OS: NAS (Synology & others)
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: how to copy data from watermeter to waterflow
Thanks once more, now I'm getting values in.
Many thanks for your quick replies and your great help.!
Many thanks for your quick replies and your great help.!
Best regards Bert
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
-
- Posts: 36
- Joined: Monday 17 February 2014 15:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: how to copy data from watermeter to waterflow
I think you could better use
instead of
because value is calculated relative to previous value. No difference in displayed flow value, but counterToday is daily set to 0 at nighttime and results in a negative flow.
Code: Select all
item.counter
Code: Select all
item.counterToday
-
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Re: how to copy data from watermeter to waterflow
Hello, I hope you are still monitoring this thread. Could elaborate on your esp setup? What esp are you using, etc. Thank youGravityz wrote: ↑Thursday 28 January 2021 18:20 the Watermeter in my situation is a dummy counter(not incremental)
after that i have set it to water.
so it is not a waterflow device
i do not use this script anymore
i use the esp to give me both the counter and waterflow(in 0,1 liter)
so basically the esp holds the complete countertotal and sends that value to domoticz
this way i always get the correct value
the same goes for waterflow.
it turns out the esp pulsecounter sends out a time between pulss in ms. i use this number to calculate the exact flow and send this value over to domoticz.
so not more problems regarding timing and fast/slow calls
Debian buster on NUC and three RPi with buster.
Who is online
Users browsing this forum: No registered users and 1 guest