-
Notifications
You must be signed in to change notification settings - Fork 86
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
Camera crashes when going from "off" state to "on" state #23
Comments
@kwirk Great suggestion, thanks. A pull request will make it happen quicker :) |
@kwirk Thank you. I will merge when back at home. |
I will add a semaphore to run only one imggrabber session. |
If you have multiple clients polling for snapshots that may not be ideal, limiting it to just one. But maybe a sensible limit would be better (which may depend on camera model). |
Another way: add a timeout using 2 threads. |
Yeah, I think it makes sense to have a timeout. |
[Fix] Snapshot return service unavailable when camera off
I pushed a new commit. |
I had issues when camera goes from "off" to "on" state (via settings), causing camera to freeze. I found that numerous imggrabber processes were being created and hanging, caused by calls from Home Assistant trying to update the current snapshot.
I suspect issue is all those processes waiting for the next frame, and then them all trying at once to pull the frame when the camera is turned on again.
As a work around (or maybe an acceptable solution?), I've changed
snapshot.sh
to return error JSON when camera config is in off state:The text was updated successfully, but these errors were encountered: