Hello All -
It has been awhile since I’ve posted. I’m having a hard time with a situation and was hoping to have others think through my logic.
Setup:
[ol][li]I use PLEG to monitor water usage (via Arduinos) and monitor the sprinkler system (controlled by Open Sprinkler)[/li]
[li]I alert on a few conditions:[/li]
[li][list]
[li]The water has been running too long and the sprinklers aren’t running (stuck valve, etc)[/li]
[li]The bypass (sprinkler) meter is detecting water flow but the sprinklers aren’t running[/li]
[/list][/ol]
The issue is that, during the switch from one zone to the next, the system is technically not running. So I need to debounce the detection of the system running to give it time to start the next zone. I thought I implemented it properly but I guess not.
Triggers/Properties
SprinklerZone01 = Front PopUps(01) is turned on <----Similar for the rest of the zones
UseBypassForSprinkler = Virtual Switch - True/False
WaterBypassRequested = Virtual Switch - True/False
BypassWaterMeterFlow = Flow
Conditions
SprinklersAnyZone = SprinklerZone01 OR SprinklerZone02 OR SprinklerZone03 OR SprinklerZone04 OR SprinklerZone05 OR SprinklerZone06
SprinklersRunning = SprinklersAnyZone OR (!SprinklersAnyZone AND (!SprinklersAnyZone;NOW < 2:00)) <<------ Here’s where I tried to debounce for 2 minutes
SprinklerBypassWaterEnable = SprinklersRunning AND UseBypassForSprinkler
SprinklerBypassWaterDisable = (!SprinklersRunning AND (!SprinklersRunning; NOW > 1:00)) AND !WaterBypassRequested
BypassWaterFlowing = BypassWaterMeterFlow > 0.00
BypassAlert = (BypassWaterFlowing AND (BypassWaterFlowing; NOW > 1:00)) AND !WaterBypassRequested AND !SprinklerBypassWaterEnable
WaterFlowingTooLong = (WaterFlowing AND (WaterFlowing; NOW > 20:00)) AND !SprinklersRunning
The issue is I am triggering notifications for BypassAlert and WaterFlowingTooLong during zone change. This upsets the WAF as the sprinklers run in the middle of the night! Haha!
Thoughts?