I’ve said many times in the past that every home ought to have a Raspberry Pi computer. And that is even truer for every smart home.
Aside from being relatively inexpensive, these sub-$50 computers can accept analog signals from sensors, are easy to use and maintain, and have a vast amount of community-based support. Given those features, the Raspberry Pi is becoming a hot piece of hardware when it comes to detecting images, objects, and specific people in a smart home. Oh, and there’s no subscription fee or private data going off to the cloud with this type of setup.
Don’t believe me that this is a hot topic? In only the past few months I’ve seen a handful of such Raspberry Pi projects shared on the web, and I’m sure I missed a few. Here are just a few of the more recent ones to illustrate my point.
This week, Tom’s Hardware published a complete tutorial on how to build a Raspberry Pi object recognition solution. The project is actually a follow-up to prior projects using a Pi for facial recognition both with and without the ever-present mask that most of us wear these days.
The older projects created image recognition models directly on the Pi, which took quite some time due to the limited processing power of the computer. For the latest project Edge Impulse, a machine learning object recognition service was used.
That speeds up the “learning” part of the process because you can’t just plug a camera into a Raspberry Pi and expect it to just know what it sees. Instead, you have to create models built to recognize specific things within a certain level of probability. More data and more processing power typically mean a higher probability of correctly identifying what’s on camera.
The Raspberry Pi foundation itself highlighted face recognition on its hardware less than two months ago.
The Pi article was more of a starter guide to give Pi owners a high-level overview, but it’s a great starting point. And unlike the former project that uses a cloud service to speed up the learning process, all machine learning is done directly on the Raspberry Pi itself. Yes, that will take longer for more accurate results as you feed images to the Pi, but at least you know nobody else will see those photos.
Also around the same time, the Maker.io blog illustrated how to build a facial recognition system using Pi to automatically unlock a door when an authorized user is seen. That project is a little more complex due to the introduction of a signal carried to a lock mechanism but you can see where I’m going here as it pertains to the smart home: If you’re a “maker”, there are more opportunities, services, and affordable hardware than ever to build your own image or face recognition solutions.
I’m not suggesting everyone rush out and do this in their smart home, of course. It’s far easier for all of us to buy an off-the-shelf webcam or security system that incorporates this type of technology. You’ll also get support and a range of device integrations too.
But there are reasons for a small set of smart home owners to consider the DIY route.
Maybe you don’t want to pay that monthly fee for person detection provided by a connected camera company. Perhaps you just like to tinker, learn and have total control over your home. Or you don’t want to have your camera feeds sent to a third party for obvious privacy reasons.
In this last regard, I should note there are some “on device” solutions in currently available smart home products.
One that comes to mind is, or was, on the Wyze cameras until the company’s ML partner was purchased by Apple last year. That one was the best of both worlds: on-device recognition models to keep your camera feed private and no subscription costs. Wyze now has a replacement service called Cam Plus that costs $1.25 a month when billed annually.
In any case, DIY image, object, and person detection is a low-cost reality today. The harder part is getting information from such a project to other smart home devices. But even that landscape has become more accessible.
A fairly standard method of IoT sensor and device communication called MQTT debuted in 1999. It stands for Message Queuing Telemetry Transport and, as its name implies, is a messaging system of sorts.
But it’s not like chat or email messaging between people; MQTT is an open standard for message communications between devices. In fact, MQTT is used by a few of the DIY smart home systems we’ve covered in the past. Home Assistant, OpenHAB, and NodeRED are a few that come to mind. Here’s an overview on using MQTT with Home Assistant for reference. You could even set up MQTT on your Raspberry Pi to bridge that image recognition project to other devices.
Do you have to use MQTT for your own image recognition solution? That’s probably the most ideal approach for a robust system. It requires some technical knowledge, however, that the average consumer doesn’t have.
Another approach could be to tie your Raspberry Pi in with IFTTT, which is exactly what the folks at ARM did.
Here’s a video showing when something is detected by a camera, the Pi reaches out to IFTTT and sends a notification that something was seen.
That’s a simple, but powerful example. Another is an open-source project called Frigate and it works with Home Assistant with a plugin. It appears to be similar to a paid service that uses person or object detection to send notifications or alerts. Although it does require you to flash an existing webcam with new firmware to use a different streaming protocol. I looked into this with Wyze cameras and they do support this flashing as well as providing a way to revert it back.
With the right learning models, you could have IFTTT or Home Assistant open that front door when your Pi sees you or sound an alarm if your webcam sees someone it doesn’t recognize in your house and you’re away. All it takes is a low-cost Raspberry Pi and some know-how.
Leave a Reply