A Raspberry Pi sprinkler that detects people and sprays them

Oct 20, 2026 Last reply: 3 hours ago 4 Replies
Jump to replies (4)

Most garden watering runs on a timer and soaks everything whether or not anyone is nearby. This build flips that around: a Raspberry Pi watches the yard through a camera and only fires the sprinkler when its detection model actually spots a person. For keeping feet off a patch of freshly seeded dirt, that seems a far more targeted approach than any schedule-based system, and a much funnier one.



The hardware chain is easy to follow. A Wyze Cam V2, picked because the V3 cannot stream over RTSP, was flashed with custom firmware and strapped to a porch railing, feeding frames over WiFi into the home network. Python with opencv then decodes each frame and passes it to a YOLOv3-tiny model that decides whether a person is in view. A positive detection drives the GPIO pins, which switch a relay on a 12 volt circuit to a sprinkler controller that opens the valve and lets water reach an impact head on a spike out in the grass. Ryder Calm Down began on a Pi Zero and later moved to a Raspberry Pi 4 for more processing power.



Two details stand out to me. The maker wrote a pypi library called rtsparty that manages the latest camera frame; multithreading was already used to grab only fresh frames and fix lag caused by the buffer, and packaging that into a library seems a tidy move. There is also a Flask web server with /on and /off endpoints, which allowed manual triggering from a browser during testing.



One thing stays open: whether that grass strip is legally walkable as a public easement, a question the maker never settled. On top of that, the maker has said the whole thing was built for entertainment, calling it a super-villainy excuse, and would not recommend anyone actually copy it. Even so, as a demonstration of tying a camera, a model and a valve together, it is genuinely neat work.



Project by Ryder Calm Down. Watch it on their YouTube channel:

formatting link


Picking the V2 over the V3 seems like the smart call to me. Since the V3 does not support RTSP, going with the older model and flashing custom firmware onto it keeps a native stream in play. The trade-off is sourcing older hardware and maintaining modified firmware, but for a build that depends on timely frames I think it is worth it.

How does the sprinkler decide when to stop spraying once someone has walked off the lawn? Is the shutoff handled inside the same detection loop that watches the stream, or does the code run a separate countdown after the last sighting?

Once a person leaves the frame, a timer runs for 3 to 5 seconds before the sprinkler shuts off. Whether that countdown sits inside the detection loop or runs separately is something the maker has not said.

A variation worth trying would be mounting the impact head on a servo. Right now the water lands on one fixed spot, meaning anyone crossing elsewhere gets a pass. With the head able to swivel, the spray could follow a person across the yard and cover the whole strip instead of a single line.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required