Local realtime person detection for RTSP cameras

If you are accessing Home Assistant over HTTPS using SSL, you cannot access HTTP sites through an iframe panel.

i assume you are using ssl so likely it not work for you

i think it might be possible if you use nginx in between. But didn’t tested it.

Is it possible to run 0.9 beta as a addon in ha?
My 0.8.x is crashing several times a day…

Long topic :wink:

Anybody have nice automation or node red automation for send clip & snapshot from camera if for example nobody is at home?

Hello
Can you share how the docker run command looks for docker for windows setup?
Must i register my version for more features?

This is what i try but no luck, cannot find EDGETPU (usb or my PCIe)

docker run --rm -it --privileged --name frigate --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 --device /dev/bus/usb:/dev/bus/usb -v F:/frigate/media:/media/frigate -v F:/frigate/config:/config -v /etc/localtime:/etc/localtime:ro -e FRIGATE_RTSP_PASSWORD='password' -p 5000:5000 -p 1935:1935 blakeblackshear/frigate:stable-amd64  

@mcpaha Yeah there’s a nice blueprint for sending a notification

You need https for remote, http work only local. I have it done with nginx, also added username and password for security

I am running virtualbox, ha and a coral usb. Running 4 camera streams and my coral does work with 80ms. Can i reduce that somehow?

UPDATE!
Ended up with installing unraid on my server and now i even get the PCIe M2 device to work with Frigate instead of running it all in Virtualbox.
Skärmavbild 2021-07-26 kl. 06.22.02

I think I might just have to cron a regular restart of the container for Frigate because after a day or two it loses it’s mind and can no longer record clips. It works for a day or two, then nothing. Looking at the log entries I see a whole bunch of this:


2021-07-25T14:27:32.861098806Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627223215.122179-kzbgch. There were no cache files for this event.,
2021-07-25T14:21:37.469689625Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627222864.637523-6ntnoe. There were no cache files for this event.,
2021-07-25T14:15:44.519126050Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627222487.689057-64e1zy. There were no cache files for this event.,
2021-07-25T14:10:45.031125360Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627222203.142801-acpxsd. There were no cache files for this event.,
2021-07-25T13:57:52.444735931Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627221434.580072-npmwpn. There were no cache files for this event.,
2021-07-25T13:51:04.187826413Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627221029.596954-ovivun. There were no cache files for this event.,
2021-07-25T13:53:17.129998308Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627221162.043652-8ptx3x. There were no cache files for this event.,
2021-07-25T14:08:11.220401179Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627222055.504688-bxkrpo. There were no cache files for this event.,
2021-07-25T14:15:19.382481322Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627222485.390142-pyr2yo. There were no cache files for this event.,
2021-07-25T14:20:55.373772098Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627222818.719276-j7gu87. There were no cache files for this event.,
2021-07-25T14:28:02.055927422Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627223244.870356-gag231. There were no cache files for this event.,
2021-07-25T14:28:27.273629226Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627223267.323-bzw4wb. There were no cache files for this event.,
2021-07-25T12:59:55.146578861Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627217959.198019-w0s8za. There were no cache files for this event.,
2021-07-25T13:14:50.013813889Z frigate.events                 WARNING : Unable to create clip for out_the_back and event 1627218853.843451-v31fnt. There were no cache files for this event.,
2021-07-25T13:14:24.790269170Z frigate.events                 WARNING : Unable to create clip for out_the_back and event 1627218834.039053-1qo4el. There were no cache files for this event.,
2021-07-25T13:15:15.147069500Z frigate.events                 WARNING : Unable to create clip for out_the_back and event 1627218863.828469-rjvhr6. There were no cache files for this event.,
2021-07-25T13:23:40.519496361Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627219386.762403-xrk004. There were no cache files for this event.,
2021-07-25T13:25:20.083011998Z frigate.events                 WARNING : Unable to create clip for east_yard and event 1627219486.750808-i8prj5. There were no cache files for this event.,
2021-07-25T13:43:34.848507240Z frigate.events                 WARNING : Unable to create clip for out_the_back and event 1627220583.694203-dap07y. There were no cache files for this event.,
2021-07-25T14:30:54.964253142Z frigate.events                 WARNING : Unable to create clip for out_the_back and event 1627223423.686949-egids7. There were no cache files for this event.,
2021-07-25T14:31:20.142146779Z frigate.events                 WARNING : Unable to create clip for out_the_back and event 1627223431.518857-5bo8ip. There were no cache files for this event.

I check the container’s disk space and memory and it’s WIDE open:

root@frigate:/opt/frigate# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay         457G  116G  319G  27% /
tmpfs            64M     0   64M   0% /dev
tmpfs            63G     0   63G   0% /sys/fs/cgroup
shm             2.0G   70M  2.0G   4% /dev/shm
/dev/sdc2       1.8T   23G  1.7T   2% /media/frigate
/dev/sdd2       457G  116G  319G  27% /usr/bin/nvidia-smi
tmpfs           1.9G  1.3M  1.9G   1% /tmp/cache
tmpfs            63G   12K   63G   1% /proc/driver/nvidia
tmpfs            13G  4.8M   13G   1% /run/nvidia-persistenced/socket
udev             63G     0   63G   0% /dev/nvidia0
root@frigate:/opt/frigate#

I did notice that inside the container there are a TON of files in /dev/shm before I restart it.

I had this before and with me it was a memory and chache memory issue.

How did you solve it? I’ve allowed 2G of shared memory /dev/shm and 2G of /temp/cache and Frigate is not using much of either.

Also, why would it work to begin with and over time stop working? Seems to be more like a bug…

It is somewhere in this 5085 monstertopic… I do not exactly remember and cannot search it as I do not have access to a pc atm.

How memory is set and free in the docker container? And is this set correct:

I have just setup Frigate via Docker and i am doing some testing before purchasing any more kit so i am using the CPU detector for now.

I have YiHome camera with Yi-Hack v4 and RTSP stream into Frigate and this appears to work fine at 5fps and i have some issues/questions:

  1. The system shows it has detected a person when i view a camera via the web UI however the event page doesnt show any events, it is empty.

  2. I am using the ffmpg integration to currently bring the RTSP stream into Home Assistant, this is then also available to HomeKit. I tried to bring in the RTMP Stream from Frigate but it fails to load, which integration should i be using to see Real Time view at full FPS?

- platform: ffmpeg
  name: Camera
  input: -rtsp_transport tcp -i rtsp://CAMIP/ch0_0.h264
- platform: ffmpeg
  name: Camera_Frigate
  input: rtmp://ServerIP_of_Docker_Host:5000/live/CameraName
  1. My YiHome cameras have a high res and low res stream available. Can i use the low res for object detection and the high res for live view? If so how and where do i configure this - or would i simply continue to view the high res stream via my existing ffmpg integration?

For number 1: I can’t help.
Number 2: did you put the rtmp in your config?
Number 3: you can do both high res and low res streams. Just need to config what you’d like to do with each one.

If you post your config someone can likely help you better.

Think i fixed 1 and maybe 2

For 1 i had to enable clips in the roles - now shows events.
For 2 i have to use the port number 1935 instead of 5000. I have tested this in VLC but it seems to be pretty slow. More testing needed.
For 3 - still not sure how i use both streams in Frigate.

Did you look at the link I posted? It’s explained pretty clearly in there…just keep reading.

Hey All,

I got 8 cameras working perfectly with frigate. I have all 8 cams latest picture as buttons for each camera, now How can i play the clips for each corresponding to their latest pictures?

Yeah I don’t think it’s 100% clear but from reading more yesterday I think I just define two inputs for the camera. High res has rmtp role and the low res has the detect role.

I need to do some playing. I noticed the camera feed in HA with the integration is the 5fps feed or it appears very laggy for me.

Sorry if this has been covered before but could Frigate be used instead of Blue Iris? Or does it work better in conjunction with Blue Iris? Basically looking for something to record streams to a disk as well the detection.