Going to share something embarrassing that happened hoping that others can learn from my mistake. But it lead to a cool discovery.
My tank drain system is basically a herbie with one drain being a siphon and the next being a trickle. 95% of the water goes down one drain and the other 5% goes down the second. The other drain can handle fluctuations but can not handle the same volume of water that the siphon side can. To prevent overflows due to power outages I created some Apex code which I posted before.
Code:
POWER_OUTAGE
Set OFF
If Power Apex Off 720 Then ON
The return pump has this code
Code:
RETURN_PUMP
Fallback OFF
Set ON
If Output POWER_OUTAGE = ON Then OFF
If FeedD 720 Then ON
If power failure happens the first set of code tells the pump to not turn on for 720 minutes (12 hours). This gives me time to reset my siphon manually and prevent water on the floor.
Well it had its first unsimulated test on Wednesday. In the middle of the night we had a very slight snow storm that had maybe 1-2 inches. This is nothing and should have caused no issues. But for whatever reason at 7:50am (Long after the snow storm stopped and 10 minutes after I left to drop my daughter off at day care) I get an alert on my phone that says the Apex has lost a connection to Fusion. This could mean the router went offline or the power went out at the house. I never got an update that it was restored so I figured it was just network wifi issues at home and went to work like normal. If my code should have worked it would stay off until 7:50pm and I would have time to restart everything if needed.
I get home from work and see the return pump is still pumping away and the siphon is going like normal. Must have been wifi issues.... Nope. The carpeting is slightly wet and there is a small puddle on the granite top. In my dumb stupidity I had the Return_Pump set to ON on my dashboard rather than AUTO. ON overrides all code you have setup and this failed to keep the pump turned off. The siphon and system however was running just fine and as I was dabbing up the water with a tower I noticed very little of it was actually on the floor. Maybe 1/8-1/4 gallon. It then hit me that I can do something so incredible easy to solve my overflow issue.
LOWER THE WATER LEVEL IN THE RETURN CHAMBER
If the pump can't physically pull any water there can't be any to overflow the display tank rim. This is what happened after the power failure but there was just a little bit too much water in the sump. I've found the absolute maximum amount that will make the system work every time without any code or interference from me.
In this video I used feed mode rather than unplugging the Apex or return pump but shows how the system restarts itself and doesn't overflow.