-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Generic Camera alternates between "Unavailable" and "Idle" when camera is powered off #133336
Comments
Hey there @davet2001, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) generic documentation |
Hi @MikOsle. Confirmed. I can reproduce this, and it is not the intended behaviour. The timing between the changes is not consistent though Hmmm. |
Ok, I can see what is happening. core/homeassistant/components/stream/__init__.py Lines 429 to 468 in 3560148
There is a retry loop which gradually increases its retry interval. When the connection attempt is started, it sets the status to 'True' (=available/idle), then when it fails it is set to False(=unavailable). So really, the 'idle' state means 'I have started a retry attempt and it has not returned an error yet'. A few seconds later, it returns an error and the state gets set back to 'unavailable'. Then the process loops, with a gradually increasing wait interval. |
Hey there @hunterjm, @uvjustin, @allenporter, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) stream documentation |
Ok, I have a solution that works, but it seems quite an overkill: @hunterjm I would value your thoughts on this before I go ahead with a pull request. I could have got the wrong end of the stick here. |
@uvjustin or @allenporter Do you have any thoughts on this? |
Part of the problem is we don't have a way to tell when the worker is connected or not successful in this code, but we can add some new interfaces in worker to handle this. This seems like the same change we need to make to support |
The problem
I am experiencing an issue with the Generic Camera integration. When one of my cameras is powered off, the camera entity alternates between the states "unavailable" and "idle". This behavior is unexpected, as the camera is completely powered off and cannot respond to any network requests.
The camera is one I only use occasionally, but during power-off periods, this alternating state causes problems in my automations and dashboard, where I need a clear and consistent indication of the camera is actual availability.
When the camera is powered on, it consistently remains in the "idle" state, as expected, and the camera stream works fine.
What version of Home Assistant Core has the issue?
2024.12.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Generic Camera
Link to integration documentation on our website
https://www.home-assistant.io/integrations/generic
Diagnostics information
config_entry-generic-01JF4TW7G69Q0RCW4PA16E34PN.json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: