Condensate pump alarm IoT

Just something small, and something else you may not think to put on the network, I just did because it’s there. When I had air conditioning installed there was just a chunk of PVC stretching across a walkway in the basement to the sump pump drain for condensation to trickle into, which was inconvenient but I dealt with it. Recently I was looking for projects that were easy and I had just put off as unimportant and I decided to revisit the idea of a condensate pump that would push water up across the basement ceiling and then drain back down into the sump hole like before. I settled on a pretty generic condensate pump and set about to modifying it before it was even installed.

This is before it got completely buttoned up

It came with a float switch that activated the motor to pump the water out, but there was another float switch for an alarm contact meaning to alert you if the motor or power failed and the pump reservoir was going to overflow. I added a d1 mini to that contact switch and an old phone charger served as the power supply, tapping off of the condensate pump’s internal mains. I also added a longer power cord so it could be plugged into an outlet I already had for this purpose. The rules were developed by a friend and are applicable for any button, contact, PIR sensor, or whatever that you want to squawk at mqtt.

GPIO4 9; switchmode 1
rule1
on switch1#state=0 do backlog publish stat/evan/inside/basement/condensate-pump/alarm FULL; Mem1 FULL; RuleTimer1 3$
on switch1#state=1 do backlog publish stat/evan/inside/basement/condensate-pump/alarm NOTFULL; Mem1 NOTFULL; RuleTi$
rule2
on switch1#boot=0 do Mem1 FULL endon
on switch1#boot=1 do Mem1 NOTFULL endon
on Mqtt#Connected do backlog RuleTimer1 30; publish stat/evan/inside/basement/condensate-pump/alarm %mem1%; subscri$
on Rules#Timer=1 do backlog publish stat/evan/inside/basement/condensate-pump/alarm %mem1%; RuleTimer1 30 endon
ON event#get_state do publish stat/evan/inside/basement/condensate-pump/alarm %mem1% ENDON"
rule1 1
rule2 1
restart 1

This already contains fixes for making sure it starts up in a known state, you can flip the switchmode command based on the type of contact or polarity you’re using.

One Response to “Condensate pump alarm IoT”

  1. Intro to my ESP8266 adventures | Evan's Techie-Blog Says:

    […] PIR motion sensor (same code as condensate pump alarm) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: