Tag Archives: CCTV

Deter burglars with a Raspberry Pi chatbot

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/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!

The post Deter burglars with a Raspberry Pi chatbot appeared first on Raspberry Pi.

Global sunrise/sunset Raspberry Pi art installation

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/global-sunrise-sunset-raspberry-pi-art-installation/

24h Sunrise/Sunset is a digital art installation that displays a live sunset and sunrise happening somewhere in the world with the use of CCTV.

Image by fotoswiss.com

Artist Dries Depoorter wanted to prove that “CCTV cameras can show something beautiful”, and turned to Raspberry Pi to power this global project.

Image by fotoswiss.com

Harnessing CCTV

The arresting visuals are beamed to viewers using two Raspberry Pi 3B+ computers and an Arduino Nano Every that stream internet protocol (IP) cameras with the use of command line media player OMXPlayer.

Dual Raspberry Pi power

The two Raspberry Pis communicate with each other using the MQTT protocol — a standard messaging protocol for the Internet of Things (IoT) that’s ideal for connecting remote devices with a small code footprint and minimal network bandwidth.

One of the Raspberry Pis checks at which location in the world a sunrise or sunset is happening and streams the closest CCTV camera.

The insides of the sleek display screen…

Beam me out, Scotty

The big screens are connected with the I2C protocol to the Arduino, and the Arduino is connected serial with the second Raspberry Pi. Dries also made a custom printed circuit board (PCB) so the build looks cleaner.

All that hardware is powered by an industrial power supply, just because Dries liked the style of it.

Software

Everything is written in Python 3, and Dries harnessed the Python 3 libraries BeautifulSoup, Sun, Geopy, and Pytz to calculate sunrise and sunset times at specific locations. Google Firebase databases in the cloud help with admin by way of saving timestamps and the IP addresses of the cameras.

Hardware

The artist stood infront of the two large display screens
Image of the artist with his work by fotoswiss.com

And, lastly, Dries requested a shoutout for his favourite local Raspberry Pi shop Gotron in Ghent.

The post Global sunrise/sunset Raspberry Pi art installation appeared first on Raspberry Pi.