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:
Re: Domoticz 17592 . Waterflow devices not triggered if flow = 0
OK thanks, I will see what I can do to turn around this bug. But for me, if it's not a bug, it's a bad regression.
-
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
Maybee i can help you out.
i used to use espeasy also for a watermeter.
at first i tried to calculate the flow also until i found out that the pulscounter not only counts pulses, total but also time.
this time can be used to represent the flow/minute
this is the script i used but of course i do not know anymore which devices i specified(besides the pulsecounter).
it also collects the total value again in case there was an outage and the esp was reset.
i did this by initiating a mqtt broadcast so domoticz sends out the total through mqtt which is collected by espeasy
I migrated everything to a new watermeter using esphome.
that one is way better than the one i used with espeasy since it sends out everything over MQTT so no more dummy devices.
i used to use espeasy also for a watermeter.
at first i tried to calculate the flow also until i found out that the pulscounter not only counts pulses, total but also time.
this time can be used to represent the flow/minute
this is the script i used but of course i do not know anymore which devices i specified(besides the pulsecounter).
it also collects the total value again in case there was an outage and the esp was reset.
i did this by initiating a mqtt broadcast so domoticz sends out the total through mqtt which is collected by espeasy
I migrated everything to a new watermeter using esphome.
that one is way better than the one i used with espeasy since it sends out everything over MQTT so no more dummy devices.
Code: Select all
on Pulsecounter#Count=1 do // When Pulse is detected
if [Watermeter#Total] != 0 // and watermeter was not reset
TaskValueSet 3,2,60000/[Pulsecounter#Time] // set Water#Flow
timerSet,1,16
TaskValueSet 3,1,[Pulsecounter#Total]
SendToHTTP 192.168.1.50,8084,/json.htm?type=command¶m=udevice&idx=344&nvalue=0&svalue=[Watermeter#Total]
SendToHTTP 192.168.1.50,8084,/json.htm?type=command¶m=udevice&idx=338&nvalue=0&svalue=[Watermeter#Flow]
//Publish domoticz/in,'{"idx":344,"nvalue":0,"svalue":"[Watermeter#Total]"}'
//Publish domoticz/in,'{"idx":338,"nvalue":0,"svalue":"[Watermeter#Flow]"}'
if [Watermeter#Flow] > [Watermeter#MaxFlow]
TaskValueSet 3,3,[Watermeter#Flow] // copy Flow to MaxFlow
endif
endif
if [Watermeter#Total] = 0 // in case watermeter is still 0
SendToHTTP 192.168.1.50,8084,json.htm?type=command¶m=switchlight&idx=334&switchcmd=On //initiate mqtt broadcast
endif
endon
on System#Boot do // When the ESP boots, do
TaskValueSet 3,2,0 // Reset the Flow counter to 0
endon
on MQTTimport#Connected do
if [Watermeter#Total] = 0
SendToHTTP 192.168.1.50,8084,json.htm?type=command¶m=switchlight&idx=334&switchcmd=On //initiate mqtt broadcast
endif
endon
on DomoticzWatermeter#Total do
if [Watermeter#Total] = 0
TaskValueSet 3,1,[DomoticzWatermeter#Total]
SetPulseCounterTotal,[DomoticzWatermeter#Total],1
endif
endon
on Clock#Time=All,00:00 do
TaskValueSet 4,1,[Watermeter#Total]
endon
on Rules#Timer=1 do // When flow Timer 1 expires, do
TaskValueSet 3,2,0 // reset flow to 0
SendToHTTP 192.168.1.50,8084,/json.htm?type=command¶m=udevice&idx=338&nvalue=0&svalue=0
//Publish domoticz/in,'{"idx":338,"nvalue":0,"svalue":"0"}'
timerSet,1,0
endon
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![]()