-
-
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
Chromecast causing startup issues #14956
Comments
Further example, note the times...
Just completely froze from 17:27:10 - 17:28:52 . I'm certain it never used to do this. During that time I switched a few lights on and off and the changes haven't registered. |
Ugh, why is the close&comment button so close to the comment one 🙄 🤣 |
I am having the same issues with my cast devices, they are holding up startup for a long time. |
Another 4-and-a-half minutes this morning...
|
pleas let me ask, since i too have longer setup times than desired, and a few chrome casts (audio and video): are they powered on when you're starting up? |
Yeah, they're all on. Like I said the error isn't new, and I still get it occasionally throughout the day, but it's never frozen the startup process before. |
Hi, I don't have Cast and never look at this component, I just happen to see your issue when I am looking for my Roku player issue. Anyway, I think problem is coming from this code block: Actually, --- a/homeassistant/components/media_player/cast.py
+++ b/homeassistant/components/media_player/cast.py
@@ -361,7 +361,8 @@ class CastDevice(MediaPlayerDevice):
# pylint: disable=protected-access
_LOGGER.debug("Connecting to cast device %s", cast_info)
chromecast = await self.hass.async_add_job(
- pychromecast._get_chromecast_from_host, attr.astuple(cast_info))
+ pychromecast._get_chromecast_from_host, attr.astuple(cast_info),
+ 3, 2, 10)
self._chromecast = chromecast
self._status_listener = CastStatusListener(self, chromecast)
# Initialise connection status as connected because we can only |
@awarecan - thanks for the suggestion, but I think this may have been fixed (maybe on purpose, or maybe by accident 😝 ) with the move to a standalone I'm going to leave this open for a short while just to make sure though, unless anyone can specifically confirm that this isn't a fluke. |
The code I referenced is on dev branch, the new implement must move it into an async wrapper, so that it won't block the setup process. |
This is what I'm getting. Upgraded to .72.1, and I've even tried disabling cast outright. It hangs my startup, rendering HA entirely inoperable.
|
For what it's worth, I manually made the change that @awarecan listed above, and it fixed my problem. Thanks for that. |
I only figured out the problem is with the chromecast component after spending hours on the issue (my Home Assistant issue was not bringing up the web UI at all), and even reinstalling Hassbian from scratch (the issue started after a power outage, and I thought maybe something was wrong because of that - apparently, I simply never had the Chromecasts on when restarting Home Assitant before... |
@awarecan What is needed to move it into an async wrapper? It seems to already be async, at least according to what's listed here: https://developers.home-assistant.io/docs/en/asyncio_working_with_async.html |
Noticing the same issue where it seems like Chromecasts are blocking startup on 0.75.1. This also occurred on power outage for me as well. |
Experiencing the same thing, sometimes it can take quite a while for it to kick over and start. I had previously been restoring after doing this. It's happened again and I'm trying to wait it out. |
Still a problem with 0.77.3. Just ran into this and wasted more than an hour trying to figure out why HA just hangs after a restart. Turned out i had a chromecast device that wasn't powered on anymore. Luckily, the manual modifications by @awarecan got it working again. Looks like #16261 fixed it, though. |
home-assistant-frontend==20181103.3 HASS wont boot and gets stuck over here, can't seem to get hass to boot up at all. Currently running hass based off these instructions https://www.home-assistant.io/docs/installation/raspberry-pi/ on a pi3+. |
homeassistant==0.82.1 |
So sounds like the fix never actually made it in or regressed, and the issue should probably re-opened? |
Can confirm that this is still an issue, at least for me. That fix solved it, but I had to apply it manually. |
Still an issue for me 0.82 Hassio / Ubunti Docker.io and Intel NUC |
Same problem for me but with the Sonos component. Startup just hangs forever at |
I'm facing the same issue frequently. Restarting homeassistant via the frontend or SSH doesnt work. The homeassistant process is running but I cant reach the frontend. It seems that the startup process stucks on the following message:
The only thing that worked is to reboot my Pi.
@perozonp Which method are you refering to? |
I had the same problem and I think I traced it down (for some scenarios on light weight systems like the raspberry pi zero which I'm working on at the moment). It was a little tricky as there are many exceptions being caught in
I checked the entropy of Maybe this helps others. |
You may be onto something. I was having issues with zwave that would stop working almost daily for no apparent reason. I do have several chromecast devices, and I've had random issues with them in regards to HA. Anyway, I installed the |
I have 2 Speaker groups with chromecasts. these devices seem to be the problem (it can never connect because they ain't a device). |
Are you referring to @awarecan's modification? I agree, it doesn't look like this ever made it in. |
Yes that modification is exactly the one i need now. |
On version 0.86.3 and getting these errors. I have no mediaplayers manually configured.
|
I haven't had any issues whatsoever for the past 2 weeks. Only thing I did was install the |
I'm using the latest docker so I can't really install things in it
…On Fri, Feb 1, 2019 at 12:44 PM Tom ***@***.***> wrote:
I haven't had any issues whatsoever for the past 2 weeks. Only thing I did
was install the rng-tools package. That solved all kinds of weird issues
for me, like zwave devices not working anymore. Thanks
@HerrMuellerluedenscheid <https://github.com/HerrMuellerluedenscheid>!
Haven't tested the chromecast-powered-off-at-hass-startup case, though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14956 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQFpUbmHAEE91gi3Cbiydh3XIYbO8q-dks5vJKcugaJpZM4UmhWg>
.
|
I'm not using docker or home assistant so I'm not really feeling devoted to do that myself but I think it would be reasonable to ask the maintainers of the HA docker containers to simply include |
I just ran into my zwave issues again. Installing the rng-tools package helped greatly, but isn't a 100% fix unfortunately. I haven't manually patched the code as per @awarecan's post. |
Home Assistant release with the issue: 71.0
Last working Home Assistant release (if known): 71.b0
Operating environment (Hass.io/Docker/Windows/etc.): Debian venv
Component/platform: chromecast
Description of problem:
Homeassistant freezes completely on startup when chromecast can't connect
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
The error message isn't new, I was getting it quite regularly before anyway, but it's never actually stopped the startup process before this upgrade. Now restarts can take anything from the 20-30 seconds they normally take (presumably where it doesn't fail to connect), to nearly 5 minutes because it just seems to sit on that error and wait.
That is to say, prior to this upgrade I'm sure it was regularly getting fail to connect errors during startup, but it would still give me a frontend in the normal time. For some reason since this update it is now running through the startup process, getting to that error message and then nothing happens for ages, and then suddenly the flurry of activity starts again and we're back in business.
Not sure why, I can't see any mention of chromecast in the changes this version (but I'll be honest I haven't been paying as much attention these last few weeks)
Expected behaviour
Startup continues regardless of chromecast failing to connect.
@OttoWinter
The text was updated successfully, but these errors were encountered: