-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Generic camera stops working after some time, usually several hours #58425
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
Comments
generic documentation |
Short update, I've downgraded the PyTurboJPEG module to version 1.5.2 and it seems to solve the issue. At least since 26 hour now the cameras work ok and no errors are logged. So clearly something wrong with this module in version 1.6.1 which has been introduced in one of the recent HA updates (#56571) |
Unfortunately I called it a success too early. The issue is still there... So I reinstalled the 1.6.2 version hoping someone will pick this issue up. |
I have the latest release of HA: 2021.11.4 and the issue is still there. The difference is that in the logs I can see a lot of messages: |
I have the same issue, three http image fetching cameras and all of them worked fine and just stopped working all of a sudden. I tried ssl verify on and off without success. The cameras show first image after restart then all subsequent image fetches fail. |
Same issue here. After some hours generic camera stops working. Only recovers with HA restart. |
My logs: |
Interestingly, since HA restart yesterday (running 2021.12.0) and despite below errors in the log the camera stream is still working. Let's see for how long:
This error repeats irregularly not sure what is triggering it. |
The posts from before Nov and earlier (the posts from Dec don't appear to be related) may be from bugs in the httpx library. They are also causing similar issues in philips js: #49801 . |
My generic cameras also stop displaying in Lovelace after a random length of time with a lock related error, generally within a few hours of starting HA core. Restarting fixes it for a bit, rolling back to a November release fixes it entirely. The traceback is similar to the one in the beginning of this thread except that I am using the latest version of HA:
Restoring a backup from November fixes the problem. It started for me with 2021.12.1. I should note that I am chromecasting a Lovelace dashboard containing six picture-entity cards that show the cameras to a Google display device, pretty much 24x7. Maybe that accelerates the issue for me. I see the following changed in /usr/local/lib/python3.9/site-packages/anyio/_core/_synchronization.py at that point. This change was listed as "Fixed race condition when cancelling acquire() in Lock or Semaphore" on the anyio github:
So perhaps my particular issue is a side effect of that change. I don't pretend to know how this code works, but there was an additional lock related change in anyio that seems like it might be relevant. I don't think it has made its way into HA yet, I wonder if it might help: |
The PRs above should be included in the newest beta. If anyone here is on the newest beta, please let us know if the issue has been resolved. |
Does this issue still happen in 2022.2? |
My system is up for 20 hours and so far so good. Probably need to observe a little longer before closing it. |
I've checked logs from previous day and the following error is there:
Haven't been looking at cameras at that time and the restart was for a different reason. |
There's nothing in that log from generic camera - that problem seems like it's coming from ring camera. |
I'm going to update HA now so I'll be monitoring it for a couple of coming days and will report back |
Indeed, I haven't noticed that :) |
The system is up for two days now and generic cameras still work ok. Seems that the issue is solved as of HA 2022.2.0 |
Well, my problem isn't solved. I updated to 2022.2. I'm picking up a local generic camera (from HA addon Valetudo mapper) and it stops working after some time. Every time I reload generic cameras it works for some time and then stops. I was also checking the logs but there's nothing in the logs at all. Before certain update (don't remember which) this camera worked without any issue every time. |
The problem
Generic camera component stops working, usually after several hours after system restart.
What version of Home Assistant Core has the issue?
core-2021.10.6
What was the last working version of Home Assistant Core?
core-2021.9.7
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Generic Camera
Link to integration documentation on our website
https://www.home-assistant.io/integrations/generic/
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
I have 3 cameras, 2 are provided by Fully Kiosk Browser android app, 1 is a D-Link IP camera. All 3 stop working at the same time and multiple of above error messages are written to the HA log.
Never had similar issue on earlier versions of HA.
The installation is on TrueNAS jail, in python venv. Python version is 3.8.6
The text was updated successfully, but these errors were encountered: