Blue Iris Motion Detection in Home Assistant (MQTT)

Blue Iris Motion Detection in Home Assistant (MQTT)

Pre Reqs

  • Basic understanding of Blue Iris
  • Basic understanding of Home Assistant
    • Understanding of how to use HACS
    • Basic knowledge of entity cards
  • IP address/Port of your Home Assistance Instance

Blue Iris User Setup

Set up a Blue Iris User to connect to Blue Iris from Home Assistant

  1. Log into Blue Iris Go to Settings>Users
  2. Click the + at the lower left-hand corner of the window to add a user
  3. Add a user with Administrator privileges
    User: BlueIris
    Password: BlueIris

    Recommendation: Make this user a “LAN only” user.

Take Note of Blue Iris IP & Port Number

  1. Log Into Blue Iris
  2. Go to Settings>Web Server
  3. Take Note of the Port you are using (Default: 80)
  4. Wright down the IP address for LAN access
    IP: 192.168.1.2010

Home Assistant Set Up

Set up a user for MQTT access. 

  1. Set up a user (not a person) and use whatever name you want for this example we will use the following:
    Username: mqtt-user
    Password: mqttt-user
  2. This account can have local access only and does NOT need to be an administrator. 
  3. Restart Home Assistant.

Setup Blue Iris NVR Integration.

  1. Go into HACS and install the Blue Iris Integration repository.
  2. Download the latest Blue Iris NVR (do not use beta versions)
  3. Restart Home Assistant
  4. Go to your Home Assistant Integrations.
  5. Click Add Integration
  6. Add your Blue Iris Info in the pop-up box
    Host: IP Address of Blue Iris
    Port: Whatever port you use to access the Web UI. (Can be found under settings>Web Server
    Is SSL: Select if you have SSL enabled.
    User Name: BlueIris
    Password: BlueIris
  7. Click Submit
  8. On the success screen, you can assign Areas to each of your cameras. Or you can do that later and scroll down to the end and click Finish.

Setting up MQTT Broker & MQTT on Home Assistant

  1. Go to settings>add-ons page in Home Assistant 
  2. Click Add-Ons Store
  3. Install Mosquitto Broker as an add-on.
  4. Enable “Start on Boot” & “Watchdog”
  5. Start the Mosquitto Broker.
  6. Restart Home Assistant just for good measure.

Setting up MQTT on Home Assistant.

  1. Go to Settings>Devices&Services>Integration
  2. Look for MQTT that was discovered. 
  3. Click Configure
  4. Click Submit
  5. Click Finish
  6. Restart Home Assistant

Add camera “Motion” entity to dashboard.

  1. On your dashboard of choice
  2. Choose entity card
  3. For entity search for Motion.
  4. Select Camera Motion Entity for the camera you want to view.

Configure MQTT in Blue Iris.

  1. Go into Settings>Digital IO and IoT
  2. Click configure under MQTT
  3. Enter configuration info
    a. Click Enabled
    b. Client ID: BlueIris
    c. Server Address: IP of Home Assistant
    d. User Name: mqtt-user (See “Set up a user for MQTT access” above)
    e. Password: mqtt-user
    f. Keep port as “1883”
    g. Don’t change Idle disconnect “90”
    h. Do not click TEST or it might crash BlueIris
    i. Click “ok”
    j. Click “ok” on the settings menu to exit.

Set up MQTT on each camera you want motion to show in Home Assistant.

  1. Right-click on the camera you want motion to show in Home Assistant. 
  2. Navigate to the Alerts Tab.
  3. Under Actions click On Alert.
  4. Click the “+” in the lower left.
  5. Select “Web Requests or MQTT”
  6. Change the “HTTP://” dropdown to “MQTT Topic”
  7. Add the following to each section:
MQTT Topic: BlueIris/&CAM/Status
Payload: { "type": "&TYPE", "trigger": "ON" }
  1. Click Ok.
  2. Select “MQTT Retain Message” so it stays on after a restart.
  3. You should be back at the “Alerts Tab”.
  4. Under Actions click “OFF Alert”.
  5. Click the “+” in the lower left.
  6. Select “Web Requests or MQTT”
  7. Change the “HTTP://” dropdown to “MQTT Topic”
  8. Add the following to each section:
MQTT Topic: BlueIris/&CAM/Status
Payload: { "type": "&TYPE", "trigger": "OFF" }

16. Select “MQTT Retain Message” so it stays after the restart.
17. Click OK on all screens until you are out of the settings menu.
18. Repeat steps 1-17 for each camera you want to collect motion on in Home Assistant.
19. Go restart Home Assistant
20. Use the entity that you set up above and walk in front of your camera to confirm that the entity changes with motion.

Testing Integration.

Create an entity card of your choice to monitor motion.

  1. Pick a dashboard of your choice.
  2. Add entity card
  3. Under entity search for Motion
  4. Select the camera that you set up in Blue Iris to send Motion. 
  5. Go walk in front of your camera to see the motion entity change.

No motion:

With motion when I walk in front of my Front Door Camera:

Author