Domoticz 17592 . Waterflow devices not triggered if flow = 0
Moderators: leecollings, remb0
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Domoticz 17592 . Waterflow devices not triggered if flow = 0
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.
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.
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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?
How do you trigger on device.flow = 0?
Do you trigger on device change and then check if flow=0?
Sample code?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
i am running 17561
i have a Flow device which triggers a script
this works for me
i have a Flow device which triggers a script
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and flow == 0 ) then-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered 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 Can you explain more?
How do you trigger on device.flow = 0?
Do you trigger on device change and then check if flow=0?
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
}
Last edited by domcars0 on Thursday 02 April 2026 22:22, edited 2 times in total.
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
What is the var 'flow' ?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
it should be :
Code: Select all
if (device.name == 'Flow' and light_state == 'On' and device.flow == 0 ) then - waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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.
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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
that should work also but i have flow defined as local
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
Code: Select all
local flow = domoticz.devices('Flow').flowthis is the reason i declared it as local to keep the checks uniform
domcars0 wrote: Thursday 02 April 2026 22:17What is the var 'flow' ?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
it should be :Code: Select all
if (device.name == 'Flow' and light_state == 'On' and device.flow == 0 ) then
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
@Gravityz : Is 17561 a beta of 2006.1 ? Is it possible to download a specific build? If yes , how ?
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
@waltervl: Trigger is call when the device is updated, despite the values of svalue and nvalue.
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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]
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]
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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?domcars0 wrote: Thursday 02 April 2026 23:13 @waltervl: Trigger is call when the device is updated, despite the values of svalue and nvalue.
Code: Select all
dz.log("Incrément du "..dz.devices(eauChaudeIdx).name.." de "..Iflux.." 10e de Litres.",dz.LOG_INFO)Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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.waltervl wrote: Thursday 02 April 2026 23:30So 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?domcars0 wrote: Thursday 02 April 2026 23:13 @waltervl: Trigger is call when the device is updated, despite the values of svalue and nvalue.Code: Select all
dz.log("Incrément du "..dz.devices(eauChaudeIdx).name.." de "..Iflux.." 10e de Litres.",dz.LOG_INFO)
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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
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
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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
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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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
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
- gizmocuz
- Posts: 3025
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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.
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.
Quality outlives Quantity!
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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
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
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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?
What is your use case to have it triggered every update?
Perhaps there is an alternative possible?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
domcars0
- Posts: 20
- Joined: Thursday 03 August 2017 22:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.2
- Location: France
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
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 
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
So what is the issue then? As long as the flow value is not changed it is the last reported flow value.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![]()
Once it changes to the new flow level you know how long it was on the previous flow level....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar