Solving the Mystery of My Leaky Garage: A Smart Automation Journey

Hey everyone, I wanted to share a bit about my recent project to automate my garage water management. It’s been a bit of a rollercoaster, but I think I’ve finally got it sorted out!

So, the issue I faced was pretty specific. I have a blocked soak-away that, during heavy rains, causes water to back up into my garage. I wanted to set up a system that would automatically turn on a pump to evacuate the water without me needing to be there. Sounds simple enough, right?

I started by adding a water leak detector using 433MHz wireless signals. I integrated it into my existing weather station setup, which logs data in InfluxDB and displays it via Grafana. Grafana was set up to send me an email alert when the leak detector triggered. That part worked like a charm!

Next, I wanted to automate the pump. I went with an Amazon Smart Plug, thinking it would be easy to control via Alexa. But here’s where things got tricky. I tried setting up a routine in Alexa to turn the plug on when the leak detector triggered. Unfortunately, it didn’t work as smoothly as I hoped.

After some research, I discovered that integrating Home Assistant with Alexa might be the solution. I set up a webhook in Home Assistant to trigger when the leak detector went off. The plan was to have Home Assistant send a command to Alexa to turn on the pump. I even created a binary sensor in Home Assistant to track the water level state, which would then trigger the pump.

There were a few bumps along the way. The webhook worked perfectly when tested with Postman, returning a 200 status code. The Smart Plug was responsive when controlled directly through the Alexa app. But when I linked everything together, it just… didn’t. I spent hours troubleshooting, checking logs, and tweaking configurations. It was frustrating, but I kept reminding myself that this is all part of the learning process!

Finally, I had an epiphany. I realized that the binary sensor state wasn’t being updated correctly in Home Assistant. Once I fixed that, everything fell into place. Now, when the water level in my garage rises, the pump turns on automatically for 15 minutes, giving me peace of mind that my garage is safe from flooding.

This project taught me a lot about the importance of thorough testing and the value of community support. If anyone else is looking to set up something similar, I’d be happy to share my configuration files or offer advice. It’s all about breaking the problem down into smaller parts and tackling each one step by step!

Happy automating everyone! :rocket: