Can't hang your air conditioner outdoors? Here's how you collect the condensed water, HA style!

published Sep 05, 2022, last modified Feb 15, 2023

In an urban environment, you may not always have a choice of placement for your A/C unit. But human ingenuity can be very fun — and Home Assistant certainly helps with that ingenuity.

Can't hang your air conditioner outdoors? Here's how you collect the condensed water, HA style!
The mighty bucket!

This is a very easy beginner level setup that anyone can do with Home Assistant.  It will be useful primarily in the odd intersection of circumstances that (i) you live in an apartment (ii) you run a split unit and the compressor cannot be outside your apartment (iii) you are not contractually or legally allowed to pump A/C condensate outside your apartment, so it has to go in a bucket.  While you can also use a purpose-built condensate pump to drain into the bucket — look into that first! — there may be reasons why you can't get or use a condensate pump, so I hope this post is helpful in that case.

Bill of materials

  1. A ZigBee relay switch.  I went with a SONOFF one.
  2. A ZigBee water leak sensor.  My choice was Aqara.
  3. A a decorative water stream pump / a fishtank pump.
  4. A buffer tank.
  5. A large bucket for water collection.
  6. Some Scotch tape.
  7. Something to prop your compressor above the buffer tank.
  8. A short length of garden hose.
  9. Something to hold the hose tight in the bucket.

Assembly

  • Place the pump inside the buffer tank, level with the floor. This pump will be immersed in the water — and it should never be run dry.
  • Connect the hose to the pump outlet.
  • Place the buffer tank below the prop-up. Make sure the hose can escape it.
  • Place your A/C compressor above the prop-up. Line it up so that the run-off valve drips into the buffer tank.
  • Connect the pump to the ZigBee relay, and connect the ZigBee relay to power. Pair the relay in ZHA.
  • Pair the water leak sensor in ZHA, and tape it so that it floats sort of level with the water as it rises.
    • In this scenario I have it taped such that the tape is stuck to the belly of the sensor it (not covering the metal contacts) then snakes above and both ends stick to the prop-up. I used this method because it was easy to shove the sensor in vertically while holding both sides of the tape, then when the sensor was fully through the slats, I could flatten it by wiggling the tape.
    • The idea of the sensor here is that the water will touch both contacts roughly at the same time and activate the sensor, when it rises sufficiently.
  • Put the bucket nearby.
  • Put the other end of the hose in the bucket, affixing it to the top rim. You never want the tip of the hose to go into the water as the bucket fills up. If that happens (bonus points if you can figure out why that's bad) you are having a bad day and you will not go to space today.

That is all you need to do for assembly.

Preliminary test

Fill up the buffer tank with water, then run the pump manually using the switch / button in your relay.  You should see water come out from the buffer tank and into the bucket through the hose.  When the pump begins to sound funny, shut it off — that means it's running dry and you could damage it.

Automation

For actual automation software, the simplest choice is two automations:

  1. Turn the pump relay off when the sensor changes from anything to wet. The same automation should wait ~15 seconds (you calibrate this according to your buffer tank) and turn the pump relay off. This prevents the pump from running with a dry buffer tank.
  2. Turn the pump relay on every 5 minutes if the sensor is stuck in wet state. This covers the case when there is copious runoff from the air conditioning unit, and 15 seconds weren't enough to dry up the sensor.

I have a Node-RED automation slightly more complex. This is the logic (I hope it's self-explanatory):

The Node-RED automation. Simple logic that covers all bases.  The JSON code for this automation is here.

How do you test this automation?  Simple: pour water in the buffer tank.  When the water reaches the sensor, your automation should fire and a sufficient amount of water should be pumped from the container.