I’ve seen multiple requests on the forum and Reddit regarding camera integration with Home Assistant. Most of them appear to be outside of the scope of what can reasonably be accomplished, e.g. using HA as a central point of monitoring for motion detection. As someone that’s used BI and has multiple PoE cameras around the house, I figured I’d share my setup. BI acts as the “brain” to the cameras and offers a massive amount of customization around detection, alerting, storage, etc. I don’t believe there’s anything that remotely compares to the functionality that is offered with BI.
- Cameras obviously. I’m partial to Hikvision PoE Dome Cameras. I’ve had zero problems with them and the image quality is pretty damn amazing for the price. I wired my home with a PoE switch and Cat6 a while back, so there’s drops outside where the cameras are mounted.
- Blue Iris. It’s $60 and I haven’t found anything remotely close to functionality for the price. To be honest, I’m amazed it doesn’t cost a whole lot more. Please note that BI configuration is way outside the scope of this article, so the assumption is you already have it up and running.
- Windows running 24/7. I know people will hate this part, but BI only runs on Windows. My desktop is always turned on so I just have it running on there.
One of the great features of BI as that it can act as a central point for displaying your cameras. You don’t have to screw around with camera-specific features. It basically acts as the central hub for “everything camera”. In BI, simply go to
Settings -> Web server and enable LAN access. I’m using a random port on mine, so we’ll assume it’s running on
38500 for the rest of the article.
You’ll also need to disable “advanced” authentication in Blue Iris since we’re just doing basic authentication. Go to Settings -> Web Server -> Advanced and uncheck the option Use secure session keys and login page.
Each camera can be added like this in the HA configuration:
camera: - platform: mjpeg mjpeg_url: http://bi.homenetwork.local:38500/mjpg/FDC name: FDC username: !secret bi_username password: !secret bi_password authentication: basic
Replace the hostname in the URL with the IP or hostname of your Windows host running BI. See that
FDC at the end of the URL? Replace that with the short name of the camera in BI. It’ll work for any of them, so even if you have 5 different camera types, BI will abstract it into an mjpg stream.
Of course you’ll want to display this in your fancy Lovelace setup. It’s just as easy. Put something like this in your Lovelace UI:
- cards: - camera_image: camera.fdc camera_view: live entity: camera.fdc show_info: true title: FDC type: picture-entity icon: 'mdi:camcorder' title: Cameras
Displaying the camera is nice, but most people will also want to be alerted if motion is triggered. I can’t emphasize this enough: BI beats the crap out of everyone for fine-tuning motion detection. I rarely get a false alert and have a few automations tied to it. Best of all, BI supports MQTT for alerting, with the assumption being that you already have MQTT configured with HA. To enable MQTT integration in BI, simply go to
Settings -> Digital IO and IoT -> MQTT -> Configure and plug in your MQTT server:
You’ll then need to configure motion alerts for each camera. Again, way outside the scope of the tutorial, but the help files for BI are incredibly well documented. To configure camera motion alerting, right-click on the camera and select the following:
Camera properties -> Alerts -> On Trigger -> + -> Web Request or MQTT
Camera properties -> Alerts -> On Trigger Reset -> + -> Web Request or MQTT
It’s configurable, but I’m using
blue_iris/binary_sensor/fdc_motion/state as the topic and
OFF for the values.
You then create the corresponding MQTT entry in HA:
binary_sensor: - platform: mqtt name: "FDC Motion" state_topic: blue_iris/binary_sensor/fdc_motion/state payload_on: "ON" payload_off: "OFF" device_class: motion
…and that’s it. You can configure it however you’d like in Lovelace, but mine looks like this:
- title: Contact and Motion icon: mdi:door cards: - type: entities title: Camera Motion entities: - binary_sensor.fdc_motion
Hope this helps!