-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Retry onvif session #16544
base: dev
Are you sure you want to change the base?
Retry onvif session #16544
Conversation
✅ Deploy Preview for frigate-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right approach. Onvif has retry logic built in, and if that fails there is no indication that a camera will come back online soon. I can see it being better to wait until a user tries to interact with onvif then retry
But that does not really happen ever. This happens only once on init (or in auto tracking):
so self.cams will never get the offline camera in its list and any request like for example cam_name/ptz/info will return only empty dict as that camera is just not in self.cams. Or I am missing on ways that user can interact with onvif of that camera once it is back online |
that's exactly the point, if a camera has onvif enabled then when a user (for example) opens the WebUI to that cameras view the webUI will call to get the cameras onvif capabilities. If the camera is not in self.cams but does have onvif defined then we know it failed to initialize and we can try to re-run that at that moment |
I seemed to have failed to find how this happens in a code :( (if not too much trouble, please point me in the direction where this call is happening). Of course I opened the Web UI and selected the camera but nothing really happened and when I made a API call to {cam}/ptz/info this always stayed empty dict {} so PTZ just never got to work unless I restarted frigate and then the ptz capabilities and presets were populated. |
the retry part that I am referring to is me suggesting how this code should work. The webui part already exists, I am saying this PR should be adapted to try and reconnect in the case that I described above |
Aaaah ok.. I got you.. OK. that makes sense. I will amend my approach then.. Thanks!! |
Proposed change
If camera is offline for any reason when frigate starts up first time, onvif session will not get established and PTZ will not work
Type of change
Additional information
Checklist
ruff format frigate
)