As I ranted about in this post I really struggled with my Reolink RLC-820A and Reolink RLC-810A cameras with Blue Iris. This was particularly frustrating as so many quality you tubers recommended the cameras and Blue Iris but failed to mention that the two together are not a great combination.
My hardware set up was am Intel i7 NUC with proxmox running HA OS, Windows 10 and Open Media Vault sharing a large external HDD using Samba share. The idea was that Win 10 would run Blue Iris saving streaming video to the hard drive and I would then be able to trigger automations in Home Assistant using MQTT. An alternative was to also use Frigate in Home Assistant for the object recognition and automations and to keep Blue Iris purely for the 24/7 recording.
- I could not get quality streams recoding on Blue Iris despite many attempts
- I could not get pass through for a USB coral accelerator which I bought to improve Frigate performance.
- I started to get performance issues in Home Assistant due to the extra resources required by Frigate. I probably had my proxmox allocations set up incorrectly.
Under the guidance of Pavol, a very helpful member of the Home Assistant Face Book group, I decided to go down a different path:
Use Frigate and forget Blue iris!
The main benefit of this is that I no longer need Windows 10 on the NUC, allowing me to install Home Assistant without using Proxmox, making it much easier to access the Coral accelerator, for example.
However an issue with Frigate when it is installed in Home Assistant supervisor is that the video is saved to the media folder and not to a USB or SAMBA drive. This meant the the best method for me was to install Frigate not on supervisor, but on Portainer on the same machine that runs home assistant. So these were the steps.
- Install the beta firmware on the reolink cameras by contacting reolink support. This may not be necessary now as they may have changed their firmware. The cameras will only wrk on Frigate up to 2.7k not the full 4k, again this may be fixed by the time you read this. Here are my Reolink settings for your guide:
- Backup home assistant and copy the files somewhere safe
- Wipe the entire NUC
- Instal Debian 11 on the NUC
- Install cockpit for easy access to Debian using SSH and Terminal
- Share USB hard drive connected to the NUC using SAMBA on Cockpit
- Install Home assistant Supervised on Debian
- Restore backup of home assistant and test
- Remove Portainer from home assistant supervisor if you use it (I had it to run the excellent RAKOMQTT)
- Install Portainer on Debian
- Create a stack in Portainer for Frigate
My one, for guide looks like this, you will need to change the source to where you want to save the video stream
version: "3.9" volumes: config: services frigate: container_name: frigate privileged: true # this may not be necessary for all setups restart: unless-stopped image: blakeblackshear/frigate:0.9.0-rc3-amd64 shm_size: "256mb" # update for your cameras using formula: (2560 width * 1440 height * 1.5 * 9 + 270480)/1048576 * 4 cameras = 190 ~= 256 devices: - /dev/bus/usb:/dev/bus/usb - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware volumes: - /etc/localtime:/etc/localtime:ro - config:/config:ro - source: /mnt/HDD_10TB/Frigate target: /media/frigate type: bind - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear target: /tmp/cache tmpfs: size: 1000000000 ports: - "5000:5000" - "1935:1935" # RTMP feeds
- created a config.yml file in /var/lib/docker/volumes/frigate_config/_data. My one looks like this for 4 cameras I have changed some passwords for security, your IP addresses for cameras and MQTT client will be different. I am assuming you already have an MQTT client installed. If you want different objects being detected, cars for example, make sure you add them too and entities for those will be created.
mqtt: host: 192.168.1.11 user: homeassistant password: MQTTPASSWORD #database: #path: /frigate.db #https://blakeblackshear.github.io/frigate/configuration/advanced#logger #logger: #default: debug #info detectors: coral: type: edgetpu device: usb detect: width: 640 height: 360 fps: 7 objects: track: - person - dog filters: person: # Optional: minimum width*height of the bounding box for the detected object (default: 0) min_area: 8000 # Optional: maximum width*height of the bounding box for the detected object (default: 24000000) #max_area: 100000 # Optional: minimum score for the object to initiate tracking (default: 0.5) #min_score: 0.5 # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: 0.7) threshold: 0.75 record: enabled: True retain_days: 30 events: max_seconds: 300 pre_capture: 10 post_capture: 10 retain: default: 30 snapshots: enabled: True timestamp: True bounding_box: True crop: True retain: default: 30 rtmp: enabled: True birdseye: enabled: True width: 1280 height: 720 quality: 8 mode: continuous #objects #motion timestamp_style: format: "%m.%d.%Y %H:%M:%S" ffmpeg: global_args: -hide_banner -loglevel warning #panic #info hwaccel_args: -hwaccel qsv -qsv_device /dev/dri/renderD128 #input_args: #https://ffmpeg.org/ffmpeg-formats.html #-avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 output_args: #detect: -f rawvideo -pix_fmt yuv420p record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy #-an removed to hear sound #rtmp: -c copy -f flv cameras: front: #REOLINK RLC-810A ffmpeg: inputs: - path: rtsp://USERNAME:PASSWORD@192.168.1.22:554//h264Preview_01_sub roles: - detect - rtmp - path: rtsp://USERNAME:PASSWORD@192.168.1.22:554/ roles: - record gate: #REOLINK RLC-820A ffmpeg: inputs: - path: rtsp://USERNAME:PASSWORD@192.168.1.21:554//h264Preview_01_sub roles: - detect - rtmp - path: rtsp://USERNAME:PASSWORD@192.168.1.21:554/ roles: - record side: #REOLINK RLC-810A ffmpeg: inputs: - path: rtsp://USERNAME:PASSWORD@192.168.1.23:554//h264Preview_01_sub roles: - detect - rtmp - path: rtsp://USERNAME:PASSWORD@192.168.1.23:554/ roles: - record back: #REOLINK RLC-820A ffmpeg: inputs: - path: rtsp://USERNAME:PASSWORD@192.168.1.24:554//h264Preview_01_sub roles: - detect - rtmp - path: rtsp://USERNAME:PASSWORD@192.168.1.24:554/ roles: - record
12. Install Frigate NVR Proxy on Supervisor to give entities in Home Assistant
That should pretty much be it! 4 cameras all streaming to the HDD with entities for persons detected at each camera. I can recommend Frigate HASS card to display on Lovelace.
- Here is a sample automation to send me a message to my phone if a person is at the gate.
action: - service: notify.mobile_app_petes_12 data: title: Gate notification message: Person at gate data: entity_id: camera.gate_person - service: notify.mobile_app_pete_s_ipad_pro data: data: entity_id: camera.gate_person message: Person at gate title: Gate notification mode: single
Thank you again to Pavol for all the help on getting this up and running