Deter burglars with a Raspberry Pi chatbot

How to improve upon the standard burglar deterring method of leaving lights switched on? Dennis Mellican turned to Raspberry Pi for a much more effective solution. It actually proved too effective when a neighbour stopped by, but more on that in a bit.

Here you can see Dennis’s system in action scaring off a trespasser:

Good job, Raspberry Pi chatbots!

The burglar deterrent started out as Dennis’s regular home automation system. Not content with the current software offerings, and having worked in DevOps, Dennis decided to create his own solution. Enter Raspberry Pi (well, several of them).

Chatterboxes

Dennis has multiple Raspberry Pi–powered devices dotted around his home, doing things such as turning on lights, powering up a garden sprinkler, and playing fake dog barks on wireless speakers. All these burglar deterrents work together and are run by a chat bot.

A simulation of the chatbots responding to Dennis’ commands

Each Raspberry Pi controls a single automated item in Dennis’s home. All the Raspberry Pis communicate with each other via Slack. Dennis issues commands if he, for example, wants lights to turn on while he is away, but the Raspberry Pis can also talk to each other when a trigger event occurs, such as when a motion sensor is tripped.

Smart sound

speaker, chromecast device, cctv camera and the Raspberry Pi connected for the anti burglary chatbot
Speaker, Google Chromecast, CCTV camera and Raspberry Pi

Google Chromecast enables ‘dumb’ speakers to be smart. Dennis has such speakers set up inside, close to windows at the front and back of the house, and they play an .mp3 file of a fake dog bark when commanded.

The security cameras Dennis uses in his home setup are a wireless CCTV variety, and the lights are a mix of TP-Link and Lifx smart bulbs.

Here’s all the Python code running Dennis’ entire security system.

Too effective?

Dennis’s smart system has backfired on him a few times. Once a neighbour visited while he was out and thought Dennis was rudely not answering the door, because she saw the lights go on inside, making it appear like he was home. Awkward.

The fake dog barking has also startled the postman and a few joggers — Dennis says it adds to the realism.

You’re cute, but you wreck stuff, so get out

The troupe of Raspberry Pis has also scared away an Australian possum (video above). These critters are notorious for making nests in roof cavities, so Dennis dodged another problematic home invasion there.

Future upgrades

Dennis is a maker after our own hearts when explaining where he’d like to go next with his anti-burglary build:

“I feel like Kevin McCallister from Home Alone, with these home security ‘traps’. I’m still waiting to catch the Wet Bandits for the sequel to this story. So far only stray cats have been caught by the sprinkler. Perhaps the next adventure of the chat bot is to order pizza and have Gangster ‘Johnny’ complete the transaction when the pizza delivery triggers the sensors.”

Go for it, Dennis!

9 comments

Avatar

I love it. Burglars are scum.

Avatar

This is not a bad idea at all. But it is better to use sound from a more dangerous dog.

Avatar

The sound of Cujo would be scary. But in my case, I found the sound of a smaller dog breed more convincing on cheap speakers.

Avatar

Hardened burglars are not really afraid of dogs, dangerous or not – they have well established ways of dealing with them. But they do mostly look for unoccupied by human homes with security weakness, so dogs and humans present is better. A yapping dog followed by a variety of human replies telling it to shut up would work very well.

Avatar

What I mean to say is, a dog detecting an intruder as an alerting system is how they should work. It is wrong and cruel to expect a dog to physically defend your home.

Avatar

That dog sounded big enough to bite your head clean off!!

Avatar

The intruder that is not deterred by an occupied and alerted house is not a burglar at all, that’s something else entirely. Fortunately, I think also pretty rare.

Avatar

Thanks for posting Ashley. Funny thing, I was accused on Reddit that the CCTV footage was fake. I assured the Redditor the only thing fake was the dog. But then I got thinking, if a skeptic is fooled despite revealing the wizard behind the curtain, I know I’m onto something good and that’s all that matters – my automation works as intended and my home remains secure. Happy to answer any questions from your readers here.

Ashley Whittaker

That’s how you know it’s good!

Leave a Comment

Comments are closed