Displaying Frigate's Video Feed in MainUI

I “integrate” Frigate with openhab using MQTT, not using the Frigate binding. Frigate sends detection notifications via MQTT, and openhab rules would respond accordingly, e.g. “person” or “car” detected.

In order to display the corresponding feed in my mainUI display, I used to use Frigate’s mjpeg feed inside an oh-image component, but it often suffered from lag, sometimes even up to several minutes, e.g. I can be back inside looking at the video of myself walking around outside. Using mjpeg requires an actual conversion process in Frigate which uses a lot of cpu.

I’ve only recently managed to solve this issue:

  • Set my IP Camera to provide a substream in 720p h.264. This is used in Frigate for detection, and also used by mainui to display the camera feed.
  • Use go2rtc in frigate
  • On the Frigate docker, expose port 1984 (go2rtc web interface)
  • In MainUI, use oh-webframe-cardwith src: =@@'PhotoFrame_Camera_URL'
  • Set PhotoFrame_Camera_URL to a string http://<frigate_ip>:1984/stream.html?src=driveway_720 (the src can be changed in a rule to other cameras depending on which camera detected a person)

This will display the camera feed in MainUI using go2rtc’s built in video player which enables me to listen to the audio feed from the camera.

The video feed comes from the ipcamera without undergoing any heavy processing / conversions by Frigate, and it would bypass openhab completely.

If you know a better way to display Frigate’s video feed in MainUI let me know!

2 Likes

Unsure if there’s a better way but this way works! Haha! Thank you for sharing! :smiley:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.