Blue Iris Integration Tutorial

It wouldn’t be through MQTT since BI only pushes events and does not listen for them. You’d likely have to mess with the BI API to make an HTTP call from Home Assistant that triggers recording.

Making a web call to BI to trigger the camera is possible. This works for me.

http://X.X.X.X:Y/admin?camera=CameraName&trigger&user=BI_Username&pw=user_password

Where X.X.X.X:Y is the IP address and port for your BI instance

I’m currently sending this from NodeMCU-based motion detectors and it works just fine. It is on my workstack to change this to a call from HASS but I have not done this yet.

1 Like

Thats not hard i do something simular to know which camera had motion and flash a color . Not exactly what you wanted but close enough that you should get the concept. https://github.com/Vasiley/Home-Assistant-Main/blob/4c7a5c6f674f64695f04e57b7a2fddab953a9f78/packages/blue_iris.yaml

Fun fact: You can use Index as the camera name and get a view showing all cameras in one feed (Useful for notifications!)
eg:

  - platform: mjpeg
    mjpeg_url: http://172.16.0.110:81/mjpg/Index
    name: Index

9 Likes

Is there a way to get the snapshot of the camera 3 secs after trigger instead of the first frame captured once triggered?

It can be done in BI 4.xxx. I have not yet upgraded to 5 so I can’t say if the same applies, but it likely does. Can’t see why Ken would remove the ability to do that.

shell_command:
  ptz_firepit: 'curl  "http://192.168.1.105:81/admin?camera=Cam2&preset=3"'

You will have to substitute your blue iris URL, camera name and preset number of course.
Also take a look here for adding it on a lovelace card:

1 Like

This is the perfect thread for my latest project, thanks for the integration info!

One question.
I’m trying to have HA enable/disable some indoor dog cams when we leave/arrive.
The preset is one part of the system (aim the camera at a corner when we’re home to show it’s not active)
The other part I’d like is to enable/disable the camera entirely to save clutter on the web interface and avoid any issues of listening in.
Anyone know the magic curl to disable a camera?

Have a look here. I don’t believe you can disable the camera directly, but you could create a profile and switch to that.

I’ve been doing a bit of hunting and found a couple of things.
First: GitHub - magapp/blueiriscmd: Python cmd tool that talk with Blue Iris Camera surveillance software
A python script that chats to BI and gives commands, can eliminate the curl commands. (and doesn’t need user/password after a quick edit)

$ bin/blueiris.py --host 192.168.1.8:81
Connected to 'Home'
Profile 'Profile 1' is active
Schedule 'Default' is active
Signal is green

$ bin/blueiris.py --host 192.168.1.8:81  --help
usage: blueiris [-h] [--version] --host HOST [--user USER]
                [--password PASSWORD] [--debug] [--list-profiles]
                [--set-profile profile-name] [--set-schedule schedule-name]
                [--set-signal signal-name] [--trigger camera-short-name]
                [--ptzbutton ptz-button-name] [--ptzcam ptz-cam-name]

Second, from JSON interface

camconfig

Get (and optionally set) the state of many camera properties:

reset:true reset the camera

enable :true or false enable or disable the camera


So, looks like it can be done, just need to sort out the format of the command (or modify the python script)

There’s also this one but I haven’t tried it.

@skywise http://ip:port/admin?camera=<cam#>&enable=1&user=user&pw=password
that enables it and enable=0 disables it

2 Likes

First of all thank you to everyone providing useful input, specially @TaperCrimp. I used this guide when setting up BI and HA. Works great!

I do however wonder if any of you have a good solution for showing the latest movement (recording) from BI as a camera in HA. Currently I am taking a snapshot from the camera in HA (using Node Red) and show this as a local file camera. However, it would be nice to have either a time lapse or a video of the latest recording rather than just a still image.

I would also like this recording/time lapse to be from BI so that I am getting the few seconds before motion is detected. I am currently pre-recording 3 or 5 seconds in BI.

My setup is a Win 10 PC with BI and a Linux PC running Hass.io in Docker. Both are on the same LAN.

is anyone running blue iris in docker? in particula on unraid in a docker?

Blue Iris only runs on Windows. There isn’t a docker container for it.

I run it in a Win 10 VM on unRaid.

@TaperCrimp https://hub.docker.com/r/jshridha/blueiris/

I’d be interested in seeing how well that performs. BI can use quite a bit of resources when you’re dealing with multiple cameras. I’ve got BI hooked into 5 of them, and it’s constantly using at least 25% of my I7 setup running Windows. I don’t know how well that’d translate when you’re going through a virtualization layer running in Docker.

I don’t use Blue Iris, I was just pointing out there is ways to run it on a non Windows machine.

I use shinobi, it uses under 10% CPU usage on an i5 2400, with 4 cameras, running in docker. Far less taxing on the machine than MotionEye or Blue Iris.

I’m trying to get this working and cannot get it to work for some reason. Anyone have any ideas? I’ve tried with limit IP addresses and just removed it so I could diagnose why I can’t get an mjpeg stream. This is what I see in Home Assistant:
image

This is the configuration
image

And Blue Iris
image

image

You can try disabling authentication for Home Assistant. On the advanced tab where it says “Limit IP Addresses”, add your range starting with a + sign, e.g. +192.168.10.*