Page 1 of 2
Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 11:19
by domcars0
Hi
Since I upgrade to Domoticz 2026.1 (and later to Beta 17592) my waterflow devices are no more triggered if device.flow = 0 (in LUA nor in Dzvents) ? Anything I can do ?
Thank you very much.
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 12:27
by waltervl
Can you explain more?
How do you trigger on device.flow = 0?
Do you trigger on device change and then check if flow=0?
Sample code?
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 14:20
by Gravityz
i am running 17561
i have a Flow device which triggers a script
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and flow == 0 ) then
this works for me
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 22:13
by domcars0
waltervl wrote: Thursday 02 April 2026 12:27
Can you explain more?
How do you trigger on device.flow = 0?
Do you trigger on device change and then check if flow=0?
On the GUI I can see when the device is updated (every 30 secs) . When it's updated, a dzVents (or LUA) trigger shoud be executed, but it's executed only if the flow has changed. As the flow is often = 0, the trigger is rarely call....
waltervl wrote: Thursday 02 April 2026 12:27
Sample code?
Code: Select all
local eauChaudeIdx = 40 -- Compteur Eau Chaude
local fluxIdx = 154 -- Capteur de flux eau chaude
return {
on = {
devices = {
fluxIdx
}
},
logging = {
level = domoticz.LOG_INFO,
marker = 'Compteur Eau Chaude',
},
execute = function(dz, device)
-- Le device flux eau chaude indique le flux en litres (chaque 30 sec)
-- on multiplie par 10 car le compteur attend des 1/10 de litres
-- (incremente par un entier)
local Iflux = math.floor( device.flow * 10 )
dz.log("Incrément du "..dz.devices(eauChaudeIdx).name.." de "..Iflux.." 10e de Litres.",dz.LOG_INFO)
dz.devices(eauChaudeIdx).updateCounter(Iflux)
end
}
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 22:17
by domcars0
Gravityz wrote: Thursday 02 April 2026 14:20
i am running 17561
i have a Flow device which triggers a script
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and flow == 0 ) then
What is the var 'flow' ?
it should be :
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and device.flow == 0 ) then
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 22:29
by waltervl
I am not completely sure but dzvents is only triggered when the value is changed, not when the same value eg 0 is sent.
So it should work when going from eg 10 to 0 and from 0 to 5 but not when the value is updated from 0 to 0.
If that is not the case there is possible a bug so please check.
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 23:09
by Gravityz
that should work also but i have flow defined as local
Code: Select all
local flow = domoticz.devices('Flow').flow
i have several checks on device.name and device is not always a flow device.
this is the reason i declared it as local to keep the checks uniform
domcars0 wrote: Thursday 02 April 2026 22:17
Gravityz wrote: Thursday 02 April 2026 14:20
i am running 17561
i have a Flow device which triggers a script
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and flow == 0 ) then
What is the var 'flow' ?
it should be :
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and device.flow == 0 ) then
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 23:12
by domcars0
@Gravityz : Is 17561 a beta of 2006.1 ? Is it possible to download a specific build? If yes , how ?
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 23:13
by domcars0
@waltervl: Trigger is call when the device is updated, despite the values of svalue and nvalue.
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 23:27
by Gravityz
yes it is.
i use docker and with docker it is easy to load any specific build.
however you are using 17592 and i can not remember any changes after 17561 which could break a flow device so that it does not trigger anymore.
having said that, i had similar issues when upgrading from 2025.1 to 2025.2
lots of changes there regarding both hue and MQTT.
after that i had some devices who did not trigger scripts anymore, mainly thermostat and temp devices.
quote=domcars0 post_id=332550 time=1775164360 user_id=15750]
@Gravityz : Is 17561 a beta of 2006.1 ? Is it possible to download a specific build? If yes , how ?
[/quote]
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Thursday 02 April 2026 23:30
by waltervl
domcars0 wrote: Thursday 02 April 2026 23:13
@waltervl: Trigger is call when the device is updated, despite the values of svalue and nvalue.
So what is the problem? You do not see the below log line in the log when value of flow is 0? You do see the log line when value is not 0?
Code: Select all
dz.log("Incrément du "..dz.devices(eauChaudeIdx).name.." de "..Iflux.." 10e de Litres.",dz.LOG_INFO)
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Friday 03 April 2026 15:06
by domcars0
waltervl wrote: Thursday 02 April 2026 23:30
domcars0 wrote: Thursday 02 April 2026 23:13
@waltervl: Trigger is call when the device is updated, despite the values of svalue and nvalue.
So what is the problem? You do not see the below log line in the log when value of flow is 0? You do see the log line when value is not 0?
Code: Select all
dz.log("Incrément du "..dz.devices(eauChaudeIdx).name.." de "..Iflux.." 10e de Litres.",dz.LOG_INFO)
To be more clear, I've removed lot of code from this script. The problem of course is not that I don't see the log when the flow is zero, but that the script is no more triggered when flow = 0 since I upgraded to 2006.1 build 17592.
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Friday 03 April 2026 17:08
by Gravityz
so how do you update the flowmeter
do you send it nvalue=0&svalue=!value!
you need to send both values all the time
in case you do sent both values, do you see the flowmeter update(value was 0 and is updated by 0) but this flowmeter device does not trigger your script right.
is your device a MQTT-AD device, if it is try to see if it recognises it again as a new device when you swirch detect new hardware on in settings.
they changed some mqtt things a while back which changed devices in my setup
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Friday 03 April 2026 17:11
by waltervl
But do you never see a log line with flow is 0?
In a household the water flow is 0 for a lot of time. So the script will only be triggered when the flow changes.
If the flow is 0 and in the next device update the flow is still 0 then the script will not be triggered. That is new in 2026.1
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Friday 03 April 2026 18:11
by Gravityz
that could lead to problems
agreed when the flow is 0 and it is updated there is no need to trigger a script(because you already triggered it before when the flow returned to 0)
however what if you regularly want to update other counters based on the current flow and that flow is running a steady 5 liters all the time.
if what you say is true then there is no change and you can not use the flow meter to trigger a script.
my flowmeter is based on a esp32 device
it sends out the total meter counter as well as the flow but only when there is a change.
in esphome you can define a certain timeout so that when there are no pulses for a certain time the flow is reset to 0
waltervl wrote: Friday 03 April 2026 17:11
But do you never see a log line with flow is 0?
In a household the water flow is 0 for a lot of time. So the script will only be triggered when the flow changes.
If the flow is 0 and in the next device update the flow is still 0 then the script will not be triggered. That is new in 2026.1
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Saturday 04 April 2026 8:53
by gizmocuz
You can always get the lates 'flow' or state from any devices.
You can use a timer and update devices with other device states, or let the script react on devices and use the values from other devices in that script and so on.
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Saturday 04 April 2026 18:08
by domcars0
After some investigations it looks like the problem occurs (trigger not call) when the flow device is updated with the same value as the previous.
Example :
Previous value | New value | trigger call
0.01 | 0.02 | Yes
0.01 | 0.00 | Yes
0.01 | 0.01 | No
0.00 | 0.03 | Yes
0.00 | 0.00 | No
The svalue must change to call the trigger .
So it's not really possible to use anymore this device to trigger any script

Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Saturday 04 April 2026 18:19
by waltervl
It triggers on a device change, not when it is just updated with the same value.
What is your use case to have it triggered every update?
Perhaps there is an alternative possible?
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Saturday 04 April 2026 19:44
by domcars0
I need to know how much water has been consumed and for how long from the moment the water starts to flow. The device is updated every 30 seconds by ESPEasy. Timer trigger every 30 seconds is not possible

Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
Posted: Saturday 04 April 2026 21:05
by waltervl
domcars0 wrote: Saturday 04 April 2026 19:44
I need to know how much water has been consumed and for how long from the moment the water starts to flow. The device is updated every 30 seconds by ESPEasy. Timer trigger every 30 seconds is not possible
So what is the issue then? As long as the flow value is not changed it is the last reported flow value.
Once it changes to the new flow level you know how long it was on the previous flow level....