We already configured our cameras in BlueIris to send an MQTT update once the software triggers an alarm. In my case this was the MQTT Topic
BlueIris/MotionAlarm/8015black/. We receive the payload
1 once an event was triggered and this alarm state falls back to
0 a few seconds later.
To use this event in Home Assistant we just have to create a Binary Sensor using the MQTT Platform inside the Home Assistant configuration:
We can now restart Home Assistant and create an Entity in the Lovelace UI that uses our sensor:
We will now be notified in Home Assistant when BlueIris triggers an alarm event and updates the alarm topic for our camera:
Now to something more useful - we can use this alarm input to switch the camera that caused the alarm into Fullscreen Mode. To do this we have to send the message payload
camera=black&fullscreen=1 when an alarm was triggered and
camera=black&escape once the alarm event ended to the BlueIris Admin MQTT Topic
BlueIris/admin (see BlueIris Admin Command Topics for more options).
blackin this payloads is the camera short name that I assigned to this camera in BlueIris - please substitute it with your cameras short name.
This can be done from the Lovelace UI by creating an Automation:
When Home Assistant receives an update with payload
1 for the topic
BlueIris/MotionAlarm/8015black/ it will now tell BlueIris to switch the camera with the short name
black (you have to adjust this according to your setup) to full screen, wait for 15s and escape back to idle.
And last but not least, let us add the live stream from our cameras. We already did this for our cameras directly by using the snapshot path. We can now extend the configuration for the BlueIris MJPEG video source:
We can now restart Home Assistant and create an Entity in the Lovelace UI that uses those cameras:
Once you save the entity you will see a list of all your BlueIris cameras with a tiny preview image. Click on those previews to open up the full video stream: