No Products in the Cart
Watch the video here https://youtu.be/qG-dnAN8HMY
Camera Integration with Home Assistant was one of the first items I wanted to get working after the first build as I had a number of IP camera’s installed at home each from different manufacturers meaning their own management application which had to be installed to my own and wife’s mobile phones for monitoring, motion sensors etc.
The integration of the IP camera’s was relatively straight forward in the sense of obtaining the RSTP link for each camera together with their respective username and password. This was then added to the configuration.yaml file in Home Assistant together with a description and before you know it we have camera entities available which could be displayed on a central dashboard!
Fast forward a couple days after the camera integration with Home Assistant it quickly became evident that this platform was fine for having a live view of what was going on around the house but when there are motion sensors involved or wanting to get back to record history it pretty much stops you in your tracks and we were left having to reach for the phone to jump on the manufacturer app to manage that.
Enter Blue Iris…
There had to be a way to simplify this process ! and that lead to the introduction of an NVR…
With a bit of sifting through Home Assistant related forums it quickly became apparent that I would have my hands full as there are quite a few options out there. An open source option called MotionEye was one of the first that I tested out and not long after lead to iSpy and so my search continued changing with the goal of finding something that offer ease of use, as it was not only myself making use of the platform but the wife and kids as well.
After a month or so I found a write up on Blue Iris which a lot of community members rated as one of the most preferred for the exact reason I was but the unfortunate part was that it came with a price tag. This is usually a big NO in my books and a deal breaker but after much deliberation and soul searching I opted for the BI solution.
I will be honest up front, the supporting installation documentation from BI was not the best but with a bit of trial and error the installation was relatively straight forward and the integration with Home Assistant not much different from adding the usual IP camera’s as described before to enable you having that live view. I have also spent a lot of time since on motion sensors, alerts etc. and yes my colleagues will most likely never let me live this down but since the installation of BI, I have not looked back!
This Blue Iris instance has been installed on a standard PC which is running Windows 10 and become the NVR.
Adding the Camera is relatively straight forward in Blue Iris.
Note: The camera should already be added to the network and you should have the RSTP link at this stage.
Note: A live display of the camera on the Blue Iris Dashboard.
Integrate the Blue Iris Camera with Home Assistant
Start by navigating to the configuration.yaml file in Home Assistant. You will require the following lines to get the camera integrated. This needs to be customized to your instance configuration. Once completed save the changes and restart Home Assistant.
#Blue Iris Integrated Cameras
camera:
– platform: mjpeg
mjpeg_url: {http://Blue Iris Server IP: Port}/mjpg/TestCamera
username: !secret BI_username
password: !secret BI_password
name: Milney Demo Camera
Note: The mjpeg_url will be custom to what your BI server and port is and the “TestCamera” to what your camera shortname was configured to.
Preparing Blue Iris for Facial Recognition
First we need to setup a location for the snapshot files that will be taken and processed for face recognition first.
Note: Next we need to add the camera which will be performing the snapshots, so we have to create a new camera.
Note: You will be specifying the Aux folder created earlier so don’t miss this setting.
Deepstack and AI Tool Setup
There are two items that need to be completed as part of the configuration. AI tool that will be processing and forwarding the new images placed by the camera motion sensor in our specified folder to another service called Deepstack which will essentially be processing the images and making sense of the objects.
I won’t be covering the installation and config as there is already a very good article on the process to follow.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
Home Assistant Facial Recognition Setup
Assuming you already have the Home Assistant Community Store installed let’s head over there and get the Deepstack Face Custom Integration by @robmarkcole added.
Please check out the link for more configuration information: https://github.com/robmarkcole/HASS-Deepstack-face
#Deepstack Image Processing for AI and Face Recognition
image_processing:
– platform: deepstack_face
ip_address: “Your Deepstack Instance IP”
port: “Your Deepstack Instance Port”
timeout: 10
detect_only: false
save_file_folder: /config/www/“Custom Folder”/
save_timestamped_file: True
save_faces_folder: /config/www/“Custom Folder”/
show_boxes: True
source:
– entity_id: “Your Camera”
name: face_counter
Note: The State is unknown and no faces detected at this point so the next step will be to perform an image scan to get the service working.
Deepstack Service Performing Scan