To measure the waterusage, I have implemented the watermeter as described here
Initially I used the 'puls counter' in ESPEASY as described by the obove example, but this generated false readings.
The false reading, are caused by the debounce timer. This timer is not restarted when a puls is received during the debounce time.
Therefor I changed the counting to normal switches, using rules.
Code: Select all
On System#Boot do
timerset,6,30 // Data send Timer
Endon
On Rules#Timer=6 do //send data to domoticz
timerset,6,10 // reset data send timer
SendToHTTP <domoticz-ip,port>,/json.htm?type=command¶m=udevice&idx=<meterIDX>&svalue=[Waterteller#Count] //send update to domoticz
TaskValueSet,2,1,0 //reset waterpuls counter
Endon
On Waterpuls#State do
timerset,7,1
endon
On Rules#Timer=7 do
TaskValueSet,2,1,[Waterteller#Count]+1
endon
PS how to configure domoticz is not included yet