I discovered that Blue Iris has URLs that you can access directly to pull images from. This means I no longer need to use a camera entity and I can pass the image from the BI URL directly into the notification.
Just thought I’d share my solution for this.
Each camera is configured like this for alerts:
MQTT Topic: BlueIris/&CAM/alert
Post/payload: {“id”:"&ALERT_DB",“object”:"&MEMO",“camera”:"&CAM",“name”:"&NAME"}
I then created an automation in Home Assistant that grabs the variables, attaches the image and sends the notification. Bonus is that clicking on the notification will open the BI URL to a clip of the alert as well.
- id: 'blueiris_notification'
alias: 'Blue Iris Notification'
description: ''
trigger:
- platform: mqtt
topic: BlueIris/+/alert
variables:
camera_name: "{{ trigger.topic.split('/')[1] }}"
condition: []
action:
- service: notify.mobile_app_pixel_7_pro
data:
message: >-
A {{ trigger.payload_json.object.split(":")[0].strip('%') }} was detected on the {{ trigger.payload_json.name }} camera.
data:
ttl: 0
priority: high
clickAction: "http://<BI_IP>:81/ui3.htm?maximize=1&tab=alerts&cam={{ trigger.payload_json.camera }}&rec={{ trigger.payload_json.id }}"
image: "http://<BI_IP>:81/alerts/{{ trigger.payload_json.id }}&fulljpeg"
actions:
- action: "URI"
title: "Live View"
uri: http://<BI_IP>:81/ui3.htm?maximize=1&cam={{ trigger.payload_json.camera }}
- action: "URI"
title: "View Clip"
uri: http://<BI_IP>:81/ui3.htm?maximize=1&tab=alerts&cam={{ trigger.payload_json.camera }}&rec={{ trigger.payload_json.id }}
mode: queued