Skip to content
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

Web frontend not showing up when HASS cannot connect to Chromecast #16101

Closed
simonszu opened this issue Aug 21, 2018 · 4 comments
Closed

Web frontend not showing up when HASS cannot connect to Chromecast #16101

simonszu opened this issue Aug 21, 2018 · 4 comments

Comments

@simonszu
Copy link
Contributor

Home Assistant release with the issue:

0.76.2

Last working Home Assistant release (if known):

0.75

Operating environment (Hass.io/Docker/Windows/etc.):
Docker on Debian Linux

Component/platform:
https://www.home-assistant.io/components/cast/

Description of problem:
Home Assistant isn't starting the web frontend when it is not able to connect to the Chromecast - also it refuses to connect to the Chromecast at all, whis is also strange.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
configuration.yaml

# Chromecast
cast: !include cast.yaml

cast.yaml

media_player:
- host: 192.168.10.9

The IP exists, is pingable, and 0.75 was able to connect to the chromecast with the above configuration. However, 0.76 shows this error in the log:

2018-08-21 15:04:04 INFO (SyncWorker_9) [pychromecast] Querying device status                                                                                                                                                                  
2018-08-21 15:04:04 ERROR (SyncWorker_9) [pychromecast.socket_client] Failed to connect, retrying in 5.0s  

As a direct consequence, the web frontend isn't starting, and is therfore not reachable. HA in general is working, i see the log file filling up with new events. However, no Chromecast related events. If i comment out the include: cast.yaml line in the main config, the web frontend becomes available again.

@djfjeff
Copy link

djfjeff commented Aug 22, 2018

I can confirm that I have the same issue here. I thought it was the database migration that was failing so I deleted my DB.

In fact, as soon as I commented the cast component, the web frontend came back working...

It seems that issue #16069 is similar. It seems that if HA failed to contact something, it hangs there forever...

configuration.yaml :
media_player: !include media_player.yaml

media_player.yaml :

- platform: plex
  entity_namespace: 'plex'

- platform: cast

@wolph
Copy link
Contributor

wolph commented Aug 27, 2018

I can verify as well. It seems to me that there are several problems:

  1. the web UI should probably never be affected by (blocking?) things such as cast discovery
  2. the pychromecast client does not have a default tries parameter configured so it should receive one

So far I've traced the issue to the _setup_internal_discovery method: https://github.com/home-assistant/home-assistant/blob/4da719f43cdc3ff747a58291e0e5a721a9bb772d/homeassistant/components/media_player/cast.py#L137-L162

Simply putting a return in at the top works around it for now (if you don't need casting).

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@balloobbot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants