Blue Iris motion alerts to notification with image in Home Assistant

tumblr_8498d03cb8f1a9a769604f42b73bf7ab_1616742c_250

Everyone who is also trying to figure this out… stop here…

No need to decode a Base64 string.

No need to save off an image via screenshot to HA first.

Simple Notificaion with Options!!.

Based on the MQTT message… Send a notification with all the reference URLs back to BI!

Brilliant. This community is awesome.

My full Automation script:

alias: BI MQTT - Any Camera Trigger
description: The Blue Iris Notification Replacement
triggers:
  - trigger: mqtt
    topic: BlueIris/+/alert-image
    variables:
      camera_name: "{{ trigger.topic.split('/')[1] }}"
#This part is optional, but i only wanted alerts when the sun was out. 
conditions:
  - condition: sun
    before: sunset
    after: sunrise
    enabled: false
actions:
  - action: notify.james_devices
    data:
      message: >-
        {{ trigger.payload_json.type }} was detected on the {{
        trigger.payload_json.name }} camera.
      data:
        channel: BlueIris
        ttl: 0
        priority: high
        clickAction: >-
          http://<BI_EXTERNAL_IP>:81/ui3.htm?maximize=1&tab=alerts&cam={{trigger.payload_json.camera}}&rec={{trigger.payload_json.db}}
        image: http://<BI_EXTERNAL_IP>:81/alerts/{{trigger.payload_json.id}}
        actions:
          - action: URI
            title: Live View
            uri: >-
              http://<BI_EXTERNAL_IP>:81/ui3.htm?maximize=1&cam={{trigger.payload_json.camera}}
          - action: URI
            title: View Clip
            uri: >-
              http://<BI_EXTERNAL_IP>:81/ui3.htm?maximize=1&tab=alerts&cam={{trigger.payload_json.camera}}&rec={{trigger.payload_json.id}}
      title: Blue Iris
  - action: notify.des_devices
    data:
      message: >-
        {{ trigger.payload_json.type }} was detected on the {{
        trigger.payload_json.name }} camera.
      data:
        channel: BlueIris
        ttl: 0
        priority: high
        clickAction: >-
          http://<BI_EXTERNAL_IP>:81/ui3.htm?maximize=1&tab=alerts&cam={{trigger.payload_json.camera}}&rec={{trigger.payload_json.db}}
        image: http://cams.1930networks.com:1930/alerts/{{ trigger.payload_json.id }}
        actions:
          - action: URI
            title: Live View
            uri: >-
              http://<BI_EXTERNAL_IP>:81/ui3.htm?maximize=1&cam={{
              trigger.payload_json.camera }}
          - action: URI
            title: View Clip
            uri: >-
              http://<BI_EXTERNAL_IP>:81/ui3.htm?maximize=1&tab=alerts&cam={{
              trigger.payload_json.camera }}&rec={{ trigger.payload_json.id }}
      title: Blue Iris
mode: queued
max: 10

Update: Its also worth noting that each device is limited to 500 pushes a day. So if you’re testing and notifications stop working – check on the companion app how many notificaitons you have left…

Great idea and nice it works but blueiris is not hardened for external access, it’s a security risk exposing your instance to the public, especially over plain http

My pfSense router is Proxying for me. However after finding out about the 500 daily message limitation i decided against this route and just use the Push notifications directly from BI – ive reached back out to Support over at BI to see what the Notification issue status was and reported some new ones of my own.