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

Google Chromecast devices undiscoverable after Home Assistant startup #13881

Closed
benjamin1492 opened this issue Apr 14, 2018 · 4 comments
Closed

Comments

@benjamin1492
Copy link

Home Assistant release with the issue:

0.67.0

Last working Home Assistant release (if known):
Guessing it last worked flawlessly around mid-December 2017

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

home-assistant in virtualenv python3.6, Windows 2012 Server R2 running ubuntu 16.04 on Virtualbox

Component/platform:

https://www.home-assistant.io/components/media_player.cast/

Description of problem:
Since mid-December 2017, I cannot run home assistant without losing my devices as cast targets in Pandora, Google Play Music, or Google Home app. The only devices that show as cast targets are an Insignia speaker and a Sony speaker, as well as any group that contains either or both of those speakers. I assume it's because the are running much older firmware. Google Homes (4), Chromecast Audios (10), Nvidia Shields (2), and gen 1 Chromecast Video (1) are not available as cast targets.

With the exception of the Google Homes, the Insignia speaker, and the Sony speaker, the rest of the cast devices are connected via Ethernet. Also all the devices are DHCP reserved. I'm (now) using an Edgerouter Lite and Unifi AP, but was using Google Wifi mesh and encountering the same problem. The reason I've tolerated for so long is because I assumed this was an issue of the mesh network not playing well with a cast CC firmware update.

Interestingly, even with home assistant running, I can still tell a Google Home to listen to something on any individual Chromecast, and that will work fine. If I request Google Home to play to a group, only one set of speakers will play, which I'm guessing is whatever the "lead" CCA in the group was. But my wife prefers to select her music from her phone (on Pandora, for instance) and then hit a cast button. That doesn't work because none of the options (aside from Sony and Insignia) show up as targets.

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

configuration.yaml entries
Discovery off

#Discover some devices automatically
#discovery:

media_player: !include media_players.yaml
zeroconf:

the logger entry for attached log:

logger:
  default: error
  logs:
    pychromecast.socket_client: debug
    pychromecast: debug
    homeassistant.components.media_player.cast: debug

And the entire media_players.yaml

# Chromecast Audios
 
  - platform: cast
    name: Den
    host: 192.168.85.30

  - platform: cast
    name: Kitchen
    host: 192.168.85.145

  - platform: cast
    name: Dining Room
    host: 192.168.85.149

  - platform: cast
    name: Living Room
    host: 192.168.85.144

  - platform: cast
    name: Patio
    host: 192.168.85.173

  - platform: cast
    name: Master Bedroom
    host: 192.168.85.146

  - platform: cast
    name: Master Bathroom
    host: 192.168.85.143

  - platform: cast
    name: Master Closet
    host: 192.168.85.147

  - platform: cast
    name: Playroom
    host: 192.168.85.142

  - platform: cast
    name: Office
    host: 192.168.85.141

  - platform: cast
    name: "Sloane's Speaker"
    host: 192.168.85.125



#Google Home
  - platform: cast
    name: Office Home
    host: 192.168.85.160

  - platform: cast
    name: Master Bedroom Home
    host: 192.168.85.115

  - platform: cast
    name: "Sloane's Alarm Clock"
    host: 192.168.85.147

  - platform: cast
    name: Kitchen Home
    host: 192.168.85.118

  - platform: cast
    name: Den Home
    host: 192.168.85.128

#Chromecast Videos
  - platform: cast
    name: Den Chromecast
    host: 192.168.85.100

  - platform: cast
    name: Den Shield
    host: 192.168.85.204

  - platform: cast
    name: Playroom Shield
    host: 192.168.85.203

#Chromecast Groups
  - platform: cast

Traceback (if applicable):


Additional information:
Chromecast platform is finicky enough even without Home Assistant. I'm not saying it runs perfectly even with all Google Cast components commented out. Things will drop in and out from time to time for reasons unknown. But this home assistant effect is consistent and immediate - all google cast devices except the ones noted in description drop out. I can restart them, restart the router, and get them back for a few minutes, but that's it.

I have not seen anyone else report this issue. It may be just the sheer scale 18 cast devices causing the problem, but I thought the whole idea is that this was scale-able. Google Chromecast customer service has basically given up at this point with me.

I included a debug logger in the attached.

The first screenshot is a list of cast targets available just after home assistant startup. The second group is a set of scrolling screenshots of available cast targets from 5 minutes earlier before starting up home assistant. My cast targets went from 28 (individual devices + groups) to 3.

home-assistant.log

2018-04-14 12 14 31
2018-04-14 12 06 35
2018-04-14 12 06 23
2018-04-14 12 06 17
2018-04-14 12 06 05

@benjamin1492
Copy link
Author

benjamin1492 commented Apr 14, 2018

Update 15-Apr-18
Disregard everything below in italics. I didn't have home assistant running at the time, which is why everything showed as available to cast. As soon as I started up home assistant, the devices disappeared again. I guess the good news is that I've confirmed this isn't a hardware issue.

14-Apr-18
I just spent the better part of the day troubleshooting every aspect of my chromecast implementation. I discovered that this is probably not anything to do with Home Assistant. I had a rats nest of wires and switches in the primary wiring closet related to the CCA's needed to drive whole home audio. When I pulled the whole home audio switch out of the mix, everything else worked fine. So I just spent the day detangling, separating, and testing every single piece in that area. Ultimately, I think there was too much electrical interference for everything I had jammed in the same space. CCA's had fallen off the rack and were dangling right next to the speaker outputs on the amp. After I got everything straight, I started back up. I've been running now for about an hour with no issues. If I wake up in the morning and everything is still ok, I'll close this case.

@benjamin1492
Copy link
Author

After further troubleshooting today, I've determined that this is related to cast groups. As long as I exclude the cast groups from pychromecast discovery, I won't lose any cast targets from spotify, pandora, gpm, google home, etc. I have a lot of automations that depend on visibility into cast group status, but I've commented everything related to groups out of my configuration for now. Hopefully this will narrow down where to look for the enterprising soul that decides to take this on, or at least help anyone else who runs into this problem.

@benjamin1492
Copy link
Author

Now that I've determined that this is related cast groups, I'm closing this case. Issue #13530 is close enough that I think any resolution there will probably solve my issue as well.

@Spartan-II-117
Copy link
Contributor

I believe you should re-open this isue, it appears tat the issue you are having is separate from the issues in #13530

@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants