This post may contain affiliate links. Please see our disclaimer for more info.

I’ve previously written about my automated sump pump solution to keep me up to date on sump pump health and get notified when problems are encountered. One morning, I walked down to a flooded basement and had no idea what had transpired. Now I’m notified when/if there is a problem and have an instant pulse on my system. In this post, I’m detailing the enhancements I’ve made to my automations to be more resilient.

I’ve been pretty happy with this setup as it has been pretty reliable. However, I have noticed that the TP Link HS-110 Switches can go offline for stretches of time. I’m not completely sure why and haven’t gone through the trouble of troubleshooting this as it’s still 98% uptime (my own estimate).

Project Goal

Build redundancy in sump pump system to actively handle problem situations and notify me

Ingredients

See my previous post for a more detailed equipment walk through. We aren’t introducing any new equipment in this post, just enhancing automations.

Automation

During the past 6 months that I’ve used this setup, it’s been pretty reliable. However I have found 2 common failure routes that could cause problems:

Tp-link outlets become unavailable. This is due to the connection between the TP Link Kasa service and HA. Don’t know the cause, but it goes offline for a minute or two sometimes a few times a day. Tp-link outlets are switched off. This could be done via a handful of means: within the TP Link Kasa app, HA interface, on the physical outlet, via a rouge automation (triggering all switches for example). In my setup, the main pump switch should never turn off.

Luckily, we can use HA automations to handle these situations for us. Below is some pseudo code to explain the logic. Download my node red setup here.

With this, I will be notified anytime the main pump isn’t getting power, and backup systems are automatically enabled as a precaution.

Trigger: If main switch status is not on (e.g. states of: ‘off’ or ‘unavailable’) and the previous state was on

If main switch status is not on (e.g. states of: ‘off’ or ‘unavailable’) and the previous state was on Loop until: main pump switch’s state is ‘on’ again Wait 15 min (reduces notifications for short disruptions) Call service to switch main pump on again Wait 30 seconds If main pump switch is still not on Send notification alerting me Turn on backup pump for 1 min

main pump switch’s state is ‘on’ again Anytime the backup pump runs (indicating main pump failure), notify me

If backup pump runs, keep on indefinitely

Next Steps

Ultimately I’d like to incorporate rainfall and wet snowfall into account to determine roughly how much my sump pump should be running. In other words, if there was recently a lot of rainfall and my pump isn’t running much or at all, there could be a problem.

Another nice feature would be able to simulate main pump failure to test that the backup pump is operational. This would need some design (reminders on when to test, fail-safes).

Lastly, installing a water sensor would be a great fail-safe add on. Simple yet it would alert me when there is a major problem that hasn’t triggered my other automations.