Several AS; help needed. will buy BEER!!! #5 night leak det
Posted: Tue Oct 29, 2019 8:30 pm
water night leak detection using a water meter and phidgets box. hopefully would catch a runny toilet, faucet etc.
- Code: Select all
using terms from application "IndigoServer"
tell application "IndigoServer"
set Water_0 to value of variable "WaterUse_01_Today"
delay 600 --this is 10 minutes
set Water_10min to value of variable "WaterUse_01_Today"
set Water_Compare to (Water_10min - Water_0)
log "Total measured water leak is " & Water_Compare
set value of variable "WaterHouseNightLeak" to Water_Compare
--try to sort out a toilet flush (about a gallon to 1.6 gallons) vs a slow or large leak
if ((Water_Compare is greater than or equal to 1) and (Water_Compare is less than or equal to 10)) or (Water_Compare is greater than 20) then
log "possible leak"
execute group "Water Measure Night Leak Detected?"
end using terms from