Closed brickman7713 closed 1 year ago
Frigate isn't meant to be used with cameras that don't support 24/7 RTSP. This is not a supported use case.
A requested feature https://github.com/blakeblackshear/frigate/issues/1911 may make this more doable, but in general I (personally) don't think battery cameras are going to be officially supported.
Similarly, the ring MQTT docs also say that it isn't meant to be used with frigate and other nvrs:
!!!! Important note regarding camera support !!!! The ring-mqtt project does not turn Ring cameras into 24x7/continuous streaming CCTV cameras. Ring cameras are designed to work with Ring cloud servers for on-demand streaming based on detected events (motion/ding) or interactive viewing, even when using ring-mqtt, all streaming still goes through Ring cloud servers and is not local. Attempting to leverage this project for continuous streaming is not a supported use case and attempts to do so will almost certainly end in disappointment, this includes use with NVR tools like Frigate, Zoneminder or others and there are significant functional side effects to doing so, most notably loss of motion/ding events while streaming (Ring cameras only send alerts when they are not actively streaming/recording). While you are of course welcome to use this project however you like, questions about use of such tools, or issues opened about these tools, will be locked and deleted.
Thanks for the quick response! And yeah I should have mentioned, I know these aren't meant to work together and I'm not expecting this to be a 100% full proof system. I guess my main goal of this thread is to figure out if Frigate determines the time between connection retries, or if that is done in the ffmpeg proccess?
It's done here https://github.com/blakeblackshear/frigate/blob/dev/frigate/video.py#L127
The delay is mostly going to be ffmpeg waiting for a stream from the source. There's not much delay between ffmpeg fail and starting it again.
On line 240 of that file I see time.sleep(10)
, so I forked the project and changed that to time.sleep(1)
, but there is still 10 seconds between every log results. Searching through the repository I found there is also a time.sleep(10)
in the watchdog.py file, which I figured must be it, but that also did not change the fact that there is a 10 second delay between each error.
The wait here also adds 10 second delay https://github.com/blakeblackshear/frigate/blob/dev/frigate/video.py#L241
I noticed that too and changed it to 1 second but it also did not affect the delay between errors. These are the changes I have made.
frigate/video.py
...
time.sleep(1)
while not self.stop_event.wait(1):
...
frigate/watchdog.py
...
def run(self) -> None:
time.sleep(1)
while not self.stop_event.wait(1):
...
@brickman7713 confirmed it working on my end. Now I get errors every second if no motion is detected on the camera.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any updates on this?
Can a Ring Doorbell (battery) be used just to detect motion and record those clips?
Describe the problem you are having
I am running Frigate in Docker with 5 cameras that stream consistently, but I would also like to record video from my Ring doorbell when it sees motion. I have set up RTSP streaming from the doorbell using the Ring-MQTT with Video Streaming addon in HomeAssistant, and I have it streaming to a server running an RTSP proxy. I would stream the video directly from the doorbell to Frigate, but the doorbell battery would die within a couple of hours, so to save battery I have HomeAssistant start the RTSP proxy when Ring.com tells HA that it sees motion. Everything is working, but there is a 10-15 second delay from the time the RTSP proxy starts to the time the Frigate picks up the stream. So my question... is there any way to decrease the retry time that Frigate will try connecting to a camera? I assume this will lead to more server resources being used by Frigate, but my server is only using about 50% ram and CPU currently so I don't think it will affect me. I included the startup logs from Docker, and 4 cycles of Frigate trying to connect to the doorbell (which wasn't streaming at the time). Also included my config general and Doorbell camera config.
Version
0.11.1-2EADA21
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
Debian
Install method
Docker Compose
Coral version
CPU (no coral)
Network connection
Mixed
Camera make and model
Ring Doorbell Gen 2
Any other information that may be helpful
No response