Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add endpoint to restart Frigate #8440

Merged
merged 3 commits into from Nov 4, 2023

Conversation

coperni
Copy link
Contributor

@coperni coperni commented Nov 3, 2023

This PR:

  • Adds a new endpoint /api/restart to restarts Frigate.

The only means of restarting Frigate remotely is to issue a restart topic on the server's websocket. It's
convenient to also expose this capability via HTTP endpoint. I'm a Home Assistant user and use Frigate frequently to recast my RTSP feeds. I find that I have to restart occasionally to get the feeds back up. Adding this capability would help me automate restarting Frigate.

Open to any suggestions for a way to restart Frigate restfully if there is a better path.

The only means of restarting Frigate remotely is to issue
a restart topic on the server's websocket. It's
convenient to also expose this capability via HTTP endpoint.
Copy link

netlify bot commented Nov 3, 2023

Deploy Preview for frigate-docs ready!

Name Link
🔨 Latest commit 957471e
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/65452398faad0d0008d44f4b
😎 Deploy Preview https://deploy-preview-8440--frigate-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tpjanssen
Copy link
Contributor

Isn't it better to add some magic key in the body of the request? I foresee a lot of browsers reloading this page, resulting in unwanted restarts.

@tpjanssen
Copy link
Contributor

I see you're using a post request, that will help.

Copy link
Owner

@blakeblackshear blakeblackshear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be added to the api page in the docs

docs/docs/integrations/api.md Outdated Show resolved Hide resolved
@coperni coperni requested a review from NickM-27 November 3, 2023 16:45
@blakeblackshear blakeblackshear merged commit ac53993 into blakeblackshear:dev Nov 4, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants