Can a Smart Home Stop Raccoons?

How I used a smart home automation to stop raccoons and other animals from destroying my yard, including what you need and how to set it up.

Can a Smart Home Stop Raccoons?

Introduction

Have you ever had animals causing trouble in your yard?

At my home, we get raccoons, fox, possum, and about a hundred stray cats. Our backyard is like an eight-lane highway for these animals most nights. They dig up the yard, and leave their droppings all over.

The raccoons are the biggest nuisance. At first, I considered more conventional methods to chase them away: repellents, motion-activated lights, a fake owl. But when they started defecating directly on the owl, I knew I needed to get more creative. That’s when I turned to my smart home.

My backyard has an in-ground irrigation system with smart home control using a Rachio 3 Pro in my garage. I also have UniFi Protect cameras around my property. Each camera has a motion sensor. I realized that I could use the cameras to detect animal motion at night, and use that as a trigger to run my irrigation system for a brief moment. I figured the water or sound of the irrigation turning on would send them running.

Let’s take a look at how I did this using Home Assistant, and if it actually worked.

🍿
Don't feel like reading? Watch it on YouTube.

Main Points

To set this up, you’ll need two things:

  1. Motion sensor
  2. Smart irrigation system or sprinkler

Let’s start with the motion sensor. I have UniFi Protect G4 Bullet cameras pointing at different angles of my backyard. Using the UniFi Protect integration in Home Assistant, I’m able to get all kinds of data from these cameras, including different types of motion and audio detection. For this use case, the automation triggers when one of two cameras detects motion.

However, you don’t have to use a UniFi security camera, or any camera at all — you could just use a standalone, outdoor motion sensor.

I then have a series of conditions to ensure this automation only runs when I want it to. To start, I don’t want it running when my family is playing outside. There would be an all-out mutiny against my smart home if I drenched the family in water every time they entered the yard! That’s why I only have the automation run during hours when no one is out there.

For the rare occasion that someone does need to go into the yard late at night, which 99% of the team would be me anyway, I have an input boolean that I can toggle on quickly in my smart home dashboard. If it’s off, then the automation will run.

I have another condition to not run this automation if my sprinkler is already running, and one more input boolean that, if on, disables all automations in my home.

If all that passes the test, I get a notification on my phone with an image from the camera at the time of the animal intrusion, and then my irrigation system starts up.

Now, I have a five-zone irrigation system around my property, but I don’t want all five zones turning on at once. Instead, I just have one zone turn on where the animals tend to be.

After just 10 seconds, the irrigation system turns off. I’m not looking water my lawn here — just send the raccoons on their way.

You don’t need an entire in-ground sprinkler system to do this though. You can get a smart hose timer, and if the hose is attached to a regular sprinkler, you can achieve a similar automation.

Final Thoughts

So, did it work? Or is this just a losing battle?

I ran this automation in the spring, summer, and fall of 2023. Since I live in an area that get temperatures below freezing, my irrigation system and outdoor water pipes are turned off in the winter. So, depending upon where you live, this may not be a year-round solution.

For the seven months of the year that I was able to run this, the sound of the irrigation system rising out of the ground was enough to chase the animals away. The raccoons and the rest of their friends were consistently scared away by this smart home automation.

Watch on YouTube

What I'm Using

Rachio 3, 8-Zone Smart Sprinkler: https://amzn.to/3TPdwYm

UniFi Protect G4 Bullet: https://amzn.to/4cJqSOl

UniFi Protect G4 Pro: https://amzn.to/43VyNUU

Alternatives

Rachio Smart Hose Timer: https://amzn.to/3TOwyhh

Philips Hue Outdoor Motion Sensor: https://amzn.to/43PY3M4

Eve Indoor/Outdoor Motion Sensor: https://amzn.to/3PTyZyb