-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Cast Devices Unavailable - 0.78 #16686
Comments
I can confirm that once I manually disconnect/restart a CC device, it will remain unavailable until I restart HA. I did not see any spontaneous dropoffs though. |
Also, a device that was offline when Home Assistant booted will not return. I'm not using discovery but have configured the IP addresses of my google home devices. |
@cicero200272 I think my case was I had some network congestion or something else. But either way, not good that after the timeout period is over that the devices will not re-appear when they are online. |
I am running a dev HA container as well as my production container. The dev container is running the latest 0.78. I reverted the changes in the PR #16471 on my production container. Both running side by side. Within a relatively short period of time I have 2 cast devices on my dev container that went unavailable. Production container with reverted changes is running fine. |
Can you try to adjust |
I have the same issue too, seems this happened after 0.78 |
maybe we should just revert the untested change and push out 0.78.1? |
If a CC device goes offline (e. g. the cleaning lady accidentally pulled the plug) and I reconnect it some hours later when I get home, the number of retries will most likely be exceeded, no matter how high I set the limit... Wouldn't it be better to just prevent somehow that the HA startup is blocked and keep the infinite number of retries? Like "skip it for now, try again later"? |
@cicero200272 it should honestly work like it did before. Anything turned on at the moment is immediately discovered. Anything else gets discovered when its brought online. The current change is honestly untested according to the PR. The best thing to do here is revert and properly test the change against several users and make sure all edge cases and issues are resolved. Cast is a very large component, this must be breaking for lots and lots of users who just did not notice it yet. I have currently reverted the change in my own environment and devices are able to reconnect just fine. We need to test a wide variety of devices here. |
@awarecan adjusting those settings will not cover all use cases. The infinite retry is a back stop for when devices go offline for x period of time due to an accident or long outage duration. I agree with @cicero200272 that it would be better to prevent the HA startup issue than change how the component behaves entirely. |
@dshokouhi old code will block the HA startup if cast is offline according #14956 I think a better way is using current code for startup, after HA start, change the parameter to
PR is welcome |
@awarecan thats not true, I have devices offline that reconnect just fine and do not block HA start up. I think we should revert the change and start over and submit once you have a sufficient amount of testers. |
Please open PR if you feel that is right. I don't have device to test either way. |
@awarecan Wait... I'm confused. You merge a PR that isn't tested that breaks a component to 'possibly' fix an edge case and instead of reverting it knowing that this change broke functionality for other users, you ask for a PR? That doesn't make sense. If you remove infinite retry, a device will NEVER come back online until a restart. That is a functionality flaw. Regardless if it prevents an issue at startup, which is yet to be determined. |
NO, I did not merged it. @balloob did that. I had called out for tester for a while. |
Ok I stand corrected, you didn't merge it. In any event, you submitted the PR and it was merged on the basis of 1 test user. And without any verification from the thread indicating an issue at startup. That issue was closed without any response from any affected users. I don't understand how that happens. |
#14956 is auto-closed due #16471 got merged, it is our process. You or other people can always ask for reopen the issue, if the fix did not resolved problem. In #14956 there are multiple users had reported that they manually applied my fix and it resolved their startup issue. I feel that it is inappropriate if I keep modify that code since I would not be able to verify the changes, so that I called out for pull request. |
Guys, calm down... :-) @awarecan is right, I indeed had the problem that HA froze at least for some minutes when a CC device happened to be offline during HA startup. No idea why you guys did not have issues but I (and obviously some other people) did. So simply reverting the change is not the best option in my opinion... Probably @OttoWinter or some other expert for the cast component could chime in? |
@cicero200272 your issue is far less severe than this issue. At least HA will start up after 5 minutes. Here we have to restart just to regain control. That is a far worse issue than what you were experiencing. In fact I bet if you unplug a device for 5 minutes you will get the same issue. So it is far worse off now than it was before. |
Agreed. Slow startup (which is only confirmed for users that posted comments in #14956) vs having to restart each time a cast devices goes offline after the retry timeout to regain control due to this latest change is not comparable. If I had slow startup, I'd take that over losing the ability to control a cast device until a restart in a heartbeat. Thankfully I reverted the change locally but not everyone who experiences this new issue will be able. I would bet the odds as time goes on over the next 24 hours, more users will be reporting this new issue. |
Agreed. I just wanted to point out that "revert that damn PR and never touch the code again" is also not a good option.
No, I already tried that. It just doesn't reconnect, that's all. Still bad enough though... @awarecan, probably you could raise a new PR for 78.1 to revert #16471 and then try to find a solution that solves all issues? EDIT: If you need a tester, try me - I run 7 CC devices of different kinds. |
All my cast devices are unavailable as well after upgrading to 0.78. I tried to rollback to older releases but still have the same issue. |
For those users have problem to "re-discover" your chromecast after device offline, could you try to set the logger to debug level logger:
default: info
logs:
homeassistant.components.media_player.cast: debug and check whether you have seen those log messages when you bring chromecast back online
|
@mehdiheidari check which cast.py you have. Is it the one from 0.77.3 or 0.78? Chances are you have a cached 0.78 version. |
Thanks @edif30! |
Hi. Same here, all devices unavailable and no spoken notification... |
Can confirm same cast issue, I've manually edited my cast.py until a fix with the connection retry limit is found. |
I am going to reopen this issue. For the users still experienced disconnection issue after 0.78.1, please post your cast config and debug log. In current implementation, the re-connection feature rely on an "internal-discovery" function, which is not depends on the general discovery components. However, this "internal-discovery" function would not be enabled for the scenario
So, I am not going to fix scenario (1) since it is deprecated (although it may be fixed as side effect of fix scenario 2). I will try to fix scenario (2) by extend "internal-discovery" to support I hope you can help to provide more information to confirm my findings. |
I logged in this morning and only 1 of my devices is unavailable. Where as many would be under 0.78.0. @awarecan I have setup the debug logs and leaving this dev instance running to hopefully capture the event. Any unplugging and waiting for 10-15 min and replugging does not replicate the issue. At least for me. |
I've added the log but won't have anything until the morning |
@awarecan What do you mean by the "deprecated cast" platform configuration method? In my yaml I have:
Is this not correct? How else should we do this? |
@ArnoutVerbeken You are good. |
@awarecan I have an event where a cast device drops off and it still shows as unavailable when it is online. I will send you a message on Discord so you can see the logs. |
here is the log unavailable from 2.45am
|
What is your cast config? Did you get any |
Added manually the ip addresses to the cast in the config file. |
Current implementation has problem with manual configured host IP. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I can confirm all is working again removed cast and allows auto discovery and installed .78.3 Cheers guys |
I updated to 0.78.3 (Hasbian) but after a while both my chromecasts become and stays unavailable. However these devices are still connected to the network and work fine. After a day I got the following errors. Could this error be related to this issue? I know it's fixed in 0.78.3 but I did not have this error till 0.78. I am using discovery to add the CC.
|
I am using 0.79.3 with debug enabled. My logging from startup to unavailable:
The last line containing 'cast' is from 2 hours ago. It says retrying in 5.0s but it doesn't... |
i too have the issue , that aftter about 12 hours or something , my chromecast is in the state unavailable are there still logs needed? can i help ? |
I know this is closed but I'm running 81.X (.6 currently) on a RP3B with HassOS 1.12 and currently when I restart HA things hang and don't seem to get past this. Sometimes I can stop and start the HA docker image and it will start OK or I have to edit my config to manually define a singe cast device which prevents HA from doing auto discovery using the cast integration to get it to boot.
|
Home Assistant release with the issue:
0.78
Last working Home Assistant release (if known):
0.77.3
Operating environment (Hass.io/Docker/Windows/etc.):
Docker
Component/platform:
Cast
Description of problem:
Not 100% sure but after #16471, almost all of my cast devices go unavailable in a very short period of time.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
No Traceback. Cast devices just drop off and will not become available until an HA restart.
Additional information:
The text was updated successfully, but these errors were encountered: