-
Notifications
You must be signed in to change notification settings - Fork 125
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
Turn camera entity (or entities) into unavailable once Frigate hasn't received any frames #406
Comments
dev notes: we can use the camera_fps as an indicator. In 0.12 we force its value to 0 when the stream stops having frames being decoded. |
Implementing this is really important. I have had multiple instances now where all cameras just stop loading new frames without any way of HA being able to see the cameras are disconnected. @NickM-27 The camera FPS stays at 15 even though there are no new frames coming in. I don't see any way of determining when the last frame came in so I can automate notifications/warnings for this. |
This is most likely because you are having a python bus error, please read the docs on that. Otherwise the camera_fps will be set to 0 |
Thanks, I'll look at that. It's worrying though because an error preventing someone from knowing the cameras are offline is pretty serious. Is there a way to make a timestamp of when cameras last reported their state so as a last resort people can tell via that variable becoming stale that something has stopped updating, regardless of any errors occurring? |
@ColColonCleaner or you can just wait it to be implemented here (or if you can, PRs are always welcome). |
@NickM-27 I see the usual cause of bus issues is the shm size, and mine is already increased from 64MB to cover the 3 4K cameras (no substreams), it's at 256MB (i know only 108MB is needed according to the formula, but I wanted to be safe for adding more cameras). @felipecrs I would wait, but I'd rather not have the wife distrusting the camera displays in the meantime. She's already noticed them frozen once and I tried mitigating it with some automations watching the variables but lo-and-behold the camera fps doesn't change to 0, so I went searching here |
Just run
I think there may be some confusion. The 0 fps feature is only guaranteed to work in 0.12 where we made changes to ensure it's set when the stream fails |
Looks like an update to the beta is in order. Thanks! |
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. |
Can this issue be reopened? |
I am essentially doing this by decoding the "frigate/stats" in a MQTT sensor for each camera. This gives FPS which if below "1" shows "offline" else "online". I have an HA "alarm panel" which shows the status of various doors / windows / cameras with simple green/red icons. I also have an automation that can reboot a flakey camera when it locks up. The "online" status of cameras is a very useful feature. |
This issue comes from blakeblackshear/frigate#4998. Frigate already detects when the camera is "unavailable":
It would be great if the integration could put the entity into unavailable state as well.
The text was updated successfully, but these errors were encountered: