It's all too easy to fall into the trap of using smart home automation tools like Home Assistant to only manage those devices that already have some level of "smarts." All too easy indeed, and this was me when I first started getting to grips with how the operating system works. Yes, I said operating system, because the full installation of Home Assistant (HAOS) is no less complex than OPNsense or the OS running your laptop. But we might also want to monitor the other devices in our homes, the "dumb" ones that might not even be connected to Wi-Fi, let alone have any sort of algorithms onboard to control them.
Well, HAOS can do that too, with a little help from a simple IP camera and powerful object and motion detection and tracking inside Frigate, our favorite self-hosted NVR solution for home monitoring. My colleague Adam took some inspiration from Cloudflare's wall of lava lamps to build a random number generator using an IP camera and Frigate and that got me thinking about the possibilities of what a home security system that's not locked down by the vendor could be used for.
Now one problem I have is that my office is on the first floor of our townhouse, while the bedrooms are on the top floor. That's not really the issue, but the TV is also in that room, and I have a kindergarten-age kid. Anyone reading this who has also had this setup knows exactly what's up -- sometimes they'll go watch TV before we're awake and not knowing they're up is a problem. Now we've got a TV that goes from dark to bright very quickly when the remote is pressed, an IP camera, and some AI movement recognition tools, and together they make a house-wide notification system.
I created the ultimate home surveillance system with this $40 server
You don't need to spend big to create a Frigate NVR.
Posts 1
Home Assistant to the rescue (again)
Sure, Frigate does the heavy lifting, but HAOS is the glue that binds it all together
In all honesty, I don't know how I managed my smart home before I found Home Assistant. It's the closest thing to the platform-agnostic smart home future that I was promised decades ago, before appliance manufacturers realized there was more money in operating from walled gardens and API access. It's needed because, while Frigate can use the WebPush protocol to pass messages to a web browser, that's not going to wake me up, so I need a notification on my phone. Home Assistant plus an already-designed blueprint does all the heavy lifting for me, so I don't have to spend hours wresting with YAML, and I can get on with gathering the necessary things.
* Home Assistant OS
* IP-based camera connected to Frigate
* A TV to point it at
* Frigate
So, we've got Frigate running in one container, Home Assistant in another, and it's time to connect the two. Thankfully, my colleague Ayush had already figured out how to get Frigate to send notifications to my phone. I already had HACS installed, so it was a matter of finding the Frigate add-on, and downloading it to add it to the server. I installed the Frigate integration, entered the IP address of the Frigate server, and hit Finish, putting the camera on my dashboard.
Then it was over the the Blueprints tab in Automations & scenes, where I added the following URL and hit Preview.
https://github.com/SgtBatten/HA_blueprints/blob/main/Frigate_Camera_Notifications/Stable.yaml
After importing the blueprint, the Home Assistant app on my iPhone would get a notification every time that Frigate detected motion, and as the only camera hooked up to Frigate was pointing at the TV in the office, it would tell me that I really should get up as the munchkin was awake.
Having motion and object detection is huge
And it's much more configurable than my Ring doorbell ever was
Frigate gives you the pro-level tools your home needs, without vendor lock-in, subscription fees (the Frigate+ subscription gives you package detection, and better recognition of objects, but you don't need it to use AI motion or object tracking). And you're in charge of your video data, not some faceless company that often offshores its support staff.
Enabling motion detection through a camera pointed at my TV is trivial, by adding a zone in Frigate, and setting it to track all objects. We don't have pets and nobody goes downstairs at night, so there's only one pair of feet that will set the detection off. But camera-only tracking is only so good (ask any Tesla owner), and I found I needed to do a different way. Adding a motion mask to only track motion on the TV did the trick, by using Mask/zone editor to click around the TV to create a mask to reduce false positives. That adds the relative coordinates to your config file like the example below:
motion:
mask: "0.000,0.427,0.002,0.000,0.999,0.000,0.999,0.781,0.885,0.456,0.700,0.424,0.701,0.311,0.507,0.294,0.453,0.347,0.451,0.400"
I think the next logical step would be to add ablueprint that turns on my bedroom lightswhen Frigate detects motion from that office camera. Or maybe it flashes the lights in the office to remind someone they should still be in bed. Or both. I'm not quite sure yet, and it's still a work in progress, but it is progress.
I turned my old webcam into a security camera for my home office -- here's how you can do it too
Repurpose your old webcam as a surveillance tool
Posts 1
Your smart home is only as smart as its owner
One initial problem, and a series of headaches later, and I have a simple detection routine to know if the smallest member of our household is awake before us and watching TV. There's only so much of making my home smarter I can take before I start to feel really dumb. It might not be the most elegant notification system, and there's probably some way I can make the Apple TV down there start the ball rolling without having to run motion detection constantly with another service, but that's for another day to figure out.