You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
2.7 KiB

2 years ago
Title: Fake Dog for Home Security
Date: 2022-06-27
Category: Creations
Summary: Fake dog barking for home security while on vacation.
Short: 7
I set up a fake dog that barks if my surveillance cameras are triggered while I'm out of town on vacation. It's a pair of computer speakers plugged into a Raspberry Pi, which is an inexpensive single-board computer. One speaker faces the front door and the other faces the side door.
When the front door camera is triggered my surveillance camera system sends a message to the Raspberry Pi. A simple program plays an audio clip of a big dog barking through the side speaker and then the front speaker. The change in speakers simulates a dog moving towards the front door. The opposite happens if the side door camera is triggered.
You can find the [source code](https://git.tannercollin.com/tanner/woof) on my Gitea.
![[fake-dog.jpg]]
## Technical Details
My surveillance cameras sit on a separate network without internet access and their RTSP streams are consumed by the Blue Iris NVR software running on a dedicated Windows box. When an object is detected moving through a defined area for certain cameras, Blue Iris is configured to send an MQTT message to the `iot/cameras` topic via the Mosquitto broker running on my media server.
A Python script kept alive by Supervisor runs on the Raspberry Pi and listens to the topic using the `asyncio-mqtt` module. It receives and tries to decode a json message like `{"serial": "SE-N-ZoneB"}`. If the camera's serial is found in a dict at the top of the script, the corresponding audio file is played using Pygame. Controlling which speaker barks is done by muting the left or right channel in the stereo audio file.
![[fake-dog2.png]]
## Efficacy
According to [former burglars](https://news.t0.vc/TRMA), barking dogs and security cameras are some of the best deterrents to home invasions. The dog sounds fake to me, but I know it isn't real. I'm hoping that a rushing burglar won't spend time pondering if the barking is from an elaborate speaker setup and will just move on to a different house. Of course the internet now knows that it's a fake dog, but "the reader does not steal and the thief does not read".
2 years ago
I already caught a prowler who went in my backyard and checked my garage door handle to see if it was locked. He then broke into my neighbour's truck and garage after. He gets to have his face on my website:
2 years ago
![[fake-dog3.jpg]]
The extra peace of mind while I'm away is worth the evening it took to set up. It was very easy to make because I reused the code I wrote for [[Protospace]]'s PA system doorbell that you can find on [GitHub](https://github.com/protospace/doorbell). It operates similarly by playing an audio file based on which 433 MHz doorbell is pressed.