Skip to content

kramttocs/ha-blueiris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blue Iris logo Blue Iris

HomeAssistant Maintenance HA Version

Home Assistant integration for Blue Iris Video Security Software.

This is/was designed (original design by elad-bar), heavily reviewed any changes not made by my keyboard, and tested by me. AI assisted with some design, code review and doc.

I've been writing/maintaining Blue Iris integrations for the last 16 years and have really enjoyed seeing the capabilities of HA + BI. Please feel free to make suggestions - happy to discuss feature ideas.

This integration allows Home Assistant to interact with your Blue Iris server, providing cameras, sensors, profile control, motion event tracking, snapshot support, and automation-friendly entities.

Warning

Do not install this over elad-bar's version. Remove that Blue Iris integration (both from the Integration page as well as from your HACS list) Both integrations use the same Home Assistant domain, so they cannot coexist.

Important

This integration also changes how the MQTT messages/topics are setup in Blue Iris to allow for multiple Blue Iris servers. Please see the linked Manual

📄 Changelog
CHANGELOG.md

📄 Manual
docs/bi-manual.md


Table of Contents


Credit

Really appreciate the support team at Blue Iris Software.

This integration builds upon the excellent work originally created by elad-bar.


Installation and Setup

Requirements

  • A Blue Iris server accessible from Home Assistant
  • A user account configured in Blue Iris
  • A Server Name configured in Blue Iris settings
  • To control Profiles, the user must have Admin permissions
  • MQTT integration (optional) for real-time event updates

Installation via HACS Custom Repository

Note

This integration is currently installed through HACS as a custom repository. It is not yet available in the default HACS repository list.

  1. Open HACS

  2. Open the three-dot menu in the top-right corner

  3. Select Custom repositories

  4. Add this repository URL:

    https://github.com/kramttocs/ha-blueiris
    
  5. Set the category to Integration

  6. Click Add

  7. Search for Blue Iris in HACS

  8. Install the integration

  9. Restart Home Assistant if prompted


Integration Configuration

Basic Setup

Configuration → Integrations → Add Integration → Blue Iris

Field Type Required Default Description
Host Textbox Yes None Hostname or IP address of the Blue Iris server
Port Textbox Yes 81 HTTP port used to access the Blue Iris server
SSL Toggle Yes Disabled Whether SSL is enabled
Verify SSL Toggle Yes Enabled Whether to verify the SSL certificate
Username Textbox No Username for Blue Iris
Password Textbox No Password for Blue Iris

Integration Options

Configuration → Integrations → Blue Iris → Options

Field Type Required Default Description
Log Level Drop-down Yes Default Sets integration logging level
Stream Type Drop-down Yes H264 Defines the stream type
Enable Camera Streaming Toggle Yes False Enables Home Assistant Stream component
Allowed Cameras Multi-select No Controls which Blue Iris cameras are exposed as camera entities
Allowed Profiles Multi-select No Controls which profiles are available in the Profile select
Allowed Schedules Multi-select No Controls which schedules are available in the Schedule select

AI Label Mapping

Configuration → Integrations → Blue Iris → Options → Second Page

This page is only visible if at least one Motion Sensor camera is selected on the previous page.

Field Name Type Required Default Description
Person Labels Drop-down (multi) No person Defines which model labels should be classified as Person
Vehicle Labels Drop-down (multi) No bicycle, car, motorcycle, bus, train, truck, boat, airplane Defines which model labels should be classified as Vehicle
Animal Labels Drop-down (multi) No bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe Defines which model labels should be classified as Animal

Labels are case insensitive but must match exactly.

Example:

bear → matches
polar-bear → does not match

Entities and Components

Binary Sensors

Camera-based sensors include:

  • Motion (General, Person, Vehicle, Animal)
  • Audio
  • Connectivity
  • DIO
  • External

Server sensors:

  • Alerts

Last Motion Event Sensors

Each camera configured with Motion Sensors also provides a Last Motion Event sensor.

Example entity:

sensor.driveway_last_motion_event

Example state:

Person detected

Example attributes:

Attribute Description
event_type Motion event type
last_detection Timestamp of the most recent event
memo Raw memo from Blue Iris
labels AI labels detected
matched_labels Labels matching configured AI categories
snapshot_url Blue Iris still image URL
stored_path Path to the locally saved snapshot, if one has been saved

When a new event occurs, the stored snapshot path is cleared until a new snapshot is saved.

Why Last Motion Event Sensors Matter

These sensors are designed to be automation-friendly and work especially well for notifications, camera-specific logic, and alarm-aware workflows.

If you want a ready-to-use notification setup based on these sensors, see the motion-focused blueprint below.

Update Sensors

The Server device includes an Update sensor that allows Home Assistant to detect when a newer Blue Iris version is available.

This sensor can also trigger a Blue Iris update.

Because Blue Iris is outside of Home Assistant there's not really any indication that anything is happening once clicked. It will also remain as the old version for awhile until it has to perform a new login.

Will try to improve this in the future.

Camera Entity

Camera entities represent each selected Blue Iris camera.

Default state:

Idle

Profile and Schedule Selects

The Server device provides admin-only select entities for Blue Iris profile and schedule control.

  • Profile select: changes the active Blue Iris profile.
  • Schedule select: changes the active Blue Iris schedule.

The available choices are controlled by the Allowed Profiles and Allowed Schedules options.

Hold Profile Changes Switch

The Server device also provides a Hold Profile Changes config switch.

This switch does not immediately call Blue Iris when toggled. Instead, it controls how future profile changes behave:

  • When off, selecting a profile sends the profile change normally.
  • When on, selecting a profile uses Blue Iris hold behavior so the selected profile is held instead of being overridden by the schedule.

Services

Latest Motion Event Snapshot

Fetch the latest snapshot for a camera and optionally save it locally.

Field Required Description
entity_id Yes Camera entity
filename No Optional filename stored under <config>/www/blueiris/

If filename is omitted, the integration automatically uses:

<camera_id>_latest_motion.jpg

Example:

service: blueiris.latest_motion_event_snapshot
target:
  entity_id: camera.driveway

Saved file:

<config>/www/blueiris/driveway_latest_motion.jpg

Accessible in Home Assistant as:

/local/blueiris/driveway_latest_motion.jpg

Trigger Camera

Triggers a camera or camera group manually.

Move to Preset

Moves a PTZ camera to a configured preset.

Reload

Reloads the integration without restarting Home Assistant.


Blueprint

Blue Iris - Last Motion Event Notifications

I strongly suggest checking out this blueprint if you want to see one way the last motion event sensor can be used.

The blueprint uses the integration’s:

  • Last Motion Event sensors
  • camera entities
  • latest motion event snapshot service

to create alarm-aware and camera-specific motion notifications with optional mute support.

What the Blueprint Adds

  • Notifications from multiple Blue Iris *_last_motion_event sensors using one automation
  • Filtering by motion event_type values such as:
    • motion_person
    • motion_vehicle
    • motion_animal
    • motion_multi
    • motion
  • Camera-specific suppression by alarm state:
    • armed_home
    • armed_away
    • armed_night
    • armed_vacation
  • Snapshot image support using the integration’s saved latest motion-event image
  • Optional dynamic dashboard navigation per camera
  • Optional mute action support using a helper and companion automations

Install Blueprint

Import Blueprint

Full Blueprint Documentation

For full setup instructions, inputs, examples, and optional companion mute automations, see the blueprint documentation in the ha-blueprints repository:

Notes

  • The blueprint assumes the following naming relationship:
    • sensor.<camera_object_id>_last_motion_event
    • camera.<camera_object_id>
  • The blueprint supports notifications with or without a locally saved snapshot image.
  • If you use the optional mute action, follow the companion automation setup in the blueprint documentation.

Example Automation

If you want a simple automation instead of the blueprint, here is a basic example that sends a notification when a motion event occurs and includes the latest snapshot. It's not setup to be generic but just an example.

alias: Blue Iris - Driveway notification
mode: queued

trigger:
  - platform: state
    entity_id: sensor.driveway_last_motion_event

condition:
  - condition: template
    value_template: >
      {{ trigger.to_state.state not in ['unknown','unavailable','none','idle','No event'] }}

action:
  - service: blueiris.latest_motion_event_snapshot
    target:
      entity_id: camera.driveway

  - service: notify.mobile_app_your_phone
    data:
      title: "Blue Iris: Driveway"
      message: "{{ states('sensor.driveway_last_motion_event') }}"
      data:
        image: "/local/blueiris/driveway_latest_motion.jpg?v={{ now().timestamp() }}"

Cache Busting

Adding a timestamp ensures the newest snapshot is always displayed:

?v={{ now().timestamp() }}

About

Home Assistant Integration with Blue Iris Video Security Software

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages