Following up with an updated Node-RED solution to help any future lurkers who prefer Node-RED. I am on BlueIris version 5.7.5.6. To test if the image is properly coming across in the notification you must physically trigger the camera by moving in front of it; using the BlueIris UI Alerts Test button to trigger the camera will generate a notification but will not include the image in the notification.
Step 1: Set up two MQTT Alerts in Blue Iris for each camera
The prerequisite is that you have to have MQTT setup in the main BlueIris settings tab under the “Digital IO and IoT” tab.
I require both mine to have either a person or car or both as required AI objects.
MQTT topic1:
BI/&CAM/alert
Post/payload1:
{ "id":"&ALERT_DB", "object":"&MEMO", "camera":"&CAM", "name":"&NAME" }
MQTT topic2:
BI/&CAM/alert-image
Post/payload2:
&ALERT_JPEG
Step2: Setup a mqtt camera for each camera in your HomeAssistant’s configuration.yaml file
mqtt:
camera:
- unique_id: camera.garage_alert
name: garage_alert
topic: BI/garage/alert-image
image_encoding: b64
Step3: Setup Node-RED Automation
Copy the Node-RED automation below and import from clipboard in the Node-RED hamburger menu. Update nodes to reflect your HA instance and your BlueIris URLs. My automation only allows each individual camera to trigger a notification every 45 seconds at most. Any triggers that occur less than 45 seconds after a prior notification are dropped per camera. My backyard cameras are only send notifications if triggered between 11PM and 6:30AM at my preference. I am formatting the camera names in a function to have proper case in the notifications.
[{"id":"f755e494b8aeaaaa","type":"api-call-service","z":"f72992d4736dc75b","name":"BI Notifications","server":"cb755160.a7d29","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_k_phone_ha_app","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":msg.payload.objectFormatted & \" @ \" & msg.payload.cameraFormatted,\t \"data\": { \t \"channel\" : \"BlueIris\",\t \"ttl\": 0, \t \"priority\": \"high\", \t \"clickAction\": \"https://YourBlueIrisURL-RemoveHTTPSIfNeeded/ui3.htm?maximize=1&tab=alerts&cam=\" & msg.payload.camera & \"&rec=\" & msg.payload.id,\t \"url\": \"https://YourBlueIrisURL-RemoveHTTPSIfNeeded/ui3.htm?maximize=1&tab=alerts&cam=\" & msg.payload.camera & \"&rec=\" & msg.payload.id,\t \"image\": \"/api/camera_proxy/camera.\" & msg.payload.camera & \"_alert\",\t \"actions\": [\t {\t \"action\": \"URI\",\t \"title\": \"Live View\",\t \"uri\": \"https://YourBlueIrisURL-RemoveHTTPSIfNeeded/ui3.htm?maximize=1&cam=\" & msg.payload.camera\t },\t {\t \"action\": \"URI\",\t \"title\": \"View Clip\",\t \"uri\": \"https://YourBlueIrisURL-RemoveHTTPSIfNeeded/ui3.htm?maximize=1&tab=alerts&cam=\" & msg.payload.camera & \"&rec=\" & msg.payload.id\t }\t ]\t }\t }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1320,"y":120,"wires":[[]]},{"id":"29af64bd25d6636b","type":"mqtt in","z":"f72992d4736dc75b","name":"","topic":"BI/+/alert","qos":"0","datatype":"auto-detect","broker":"cd7af798304ca36c","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":100,"wires":[["927c62ca2dd76e99"]]},{"id":"1a98360942525e7e","type":"function","z":"f72992d4736dc75b","name":"format variables","func":"var vObject = msg.payload.object.charAt(0).toUpperCase() + msg.payload.object.slice(1);\nvar vCamera = msg.payload.camera.charAt(0).toUpperCase() + msg.payload.camera.slice(1);\n\nmsg.payload.objectFormatted = vObject\nmsg.payload.cameraFormatted = vCamera\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1120,"y":120,"wires":[["f755e494b8aeaaaa"]]},{"id":"73ca775ee0ce6f41","type":"api-current-state","z":"f72992d4736dc75b","name":"Garage Door Not Open","server":"cb755160.a7d29","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","entity_id":"binary_sensor.pingpong_table_area_input","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":890,"y":80,"wires":[["1a98360942525e7e"],[]]},{"id":"927c62ca2dd76e99","type":"switch","z":"f72992d4736dc75b","name":"camera switch","property":"payload.camera","propertyType":"msg","rules":[{"t":"eq","v":"doorbell","vt":"str"},{"t":"eq","v":"garage","vt":"str"},{"t":"eq","v":"backdoor","vt":"str"},{"t":"eq","v":"cococam","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":400,"y":100,"wires":[["c03afd6f965b7b44"],["9727c2e490af24a4"],["3a7759ef08dce07d"],["ca064ba86a377434"]]},{"id":"7350033368a6c12c","type":"time-range-switch","z":"f72992d4736dc75b","name":"Time Range","lat":"38.65969","lon":"-121.77244","startTime":"23:00","endTime":"06:30","startOffset":0,"endOffset":0,"x":930,"y":160,"wires":[["1a98360942525e7e"],[]]},{"id":"c03afd6f965b7b44","type":"delay","z":"f72992d4736dc75b","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"45","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":640,"y":60,"wires":[["73ca775ee0ce6f41"]]},{"id":"9727c2e490af24a4","type":"delay","z":"f72992d4736dc75b","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"45","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":640,"y":100,"wires":[["73ca775ee0ce6f41"]]},{"id":"ca064ba86a377434","type":"delay","z":"f72992d4736dc75b","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"45","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":640,"y":180,"wires":[["7350033368a6c12c"]]},{"id":"3a7759ef08dce07d","type":"delay","z":"f72992d4736dc75b","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"45","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":640,"y":140,"wires":[["7350033368a6c12c"]]},{"id":"cb755160.a7d29","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"cd7af798304ca36c","type":"mqtt-broker","name":"","broker":"http://192.168.1.57","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]