Media player not appearing

Hi all, I have a question\problem with media_player section.
I have a ChromeCast on my network (I use it everyday), but I cannot see it under HA.
I tried different configurations without luck…here are my tries:

-1-
configuration.yaml

media_player:
- platform: cast


-2-
configuration.yaml
[…]

group: !include groups.yaml
media_player: !include media__players.yaml

media__players.yaml

- platform: cast
  name: "CCast"

groups.yaml

media:
name: "Media"
view: yes
icon: mdi:raspberrypi
entities:
- media_player.ccast

Started HA without problem. Looking in the log file I can see

homeassistant.bootstrap Setting up discovery
homeassistant.loader Loaded media_player.cast from homeassistant.components.media_player.cast
homeassistant.components.media_player: Setting up media_player.cast

and all related command services (media_play_pause, media_next_track and so on)
until

Event component_loaded related to media_player

Both tries without errors but, I see no ChromeCast controls in main panel or in Logbook…am I missing something?
Same thing if I use an LG media players (webos)…

PS: discovery enabled in configuration.yaml

I have been having this problem since getting google home devices, some but not all cast devices show up. After one recent update hass wasn’t able to boot with - platform: cast enabled in the media players at all.

Taking it out completely worked for me and my media players were found again automatically. I think I powered cycled all my casts just prior to hass restart to make sure they were on.

Thanks for your response!
I noticed errors on queries very first time I tried but after a hass reboot they disappeared. I also tried to boot ChromeCast before starting hass but same result.
I just retried just for fun and I can see ChromeCast only under Logbook…I cannot understand why now it appeared. Anyway it is only in Logbook entries, no panel or control under States section…

@Nerkyator did you solve your problem? If yes how?

The cast device don’t show up in HA if I didn’t turn them on. But once I turn on the cast device it will show as media player in HA. This happen to me since 0.59

media_player:
- platform: cast

There is definately something dodgy going on with cast… and I am not the only one… Media player not appearing

I would recommend annotating the cast component until all these bugs have been ironed out…

This whole issue is also a relativly hot topic at the moment which may or may not be related…

Regardless of if this is related or not, until such time as we (as a community) are 100% that a component is working, we shoud update (with a caveat) the notes in the component page… if we know there are issues, these should be called out, otherwise new users will simply lose faith in the prodct as a whole…

Be honest… This is a google issue, not yours… but instead of newbie’s trying and failing to connect because of hardware, and then losing faith in HA, we should call it out that it is work in progress…

I’m having problems out of the blue aswell. I have a bunch of cast devices, Chromecast Ultra, Chromecast Audio, Google Home, Google Home Mini, Cast enabled speaker. All of them dropped out of my HA today with connection errors in the logs.

Setup of platform cast is taking over 10 seconds.
3:12 PM core.py (WARNING)
Failed to connect, retrying in 5.0s
3:12 PM components/media_player/cast.py (ERROR)
Failed to connect, retrying in 5.0s
3:10 PM /srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/pychromecast/socket_client.py (ERROR)

Ive been using them in HA for months with no problems. My first thought was @uiguy suggestion about the wifi bug update.

I dont think that this is a related bug… I recon the bug has crept in with the update in frimaware of chromecast devices… compounded by the updates to pycast https://github.com/home-assistant/home-assistant/pull/11410

What I am calling out here is that as a centralised home control system, we need to have a transparent comms system in place when 3rd party Sh#t hits the fan so that while it is being worked on, newbies don’t lose faith in the platform…

@uiguy I just had an idea - theoretically it could be possible that the changes in pychromecast would cause the cast components to have a different name. Could you check in the entities panel if they are just there under a different name and entity_id? Thanks so much.

but surely as entities, running under discovery, they should appear anyway regrdless of entity name?

Well yes, if you’re using the default layout - but if you define a custom default_view, they might not immediately show up.

and no, it does not appear… btw, just counted and I have close on 900 entities, all of which are working… except for pycast… did you get my dump on github… happy to give you remote connection into my network to debug…

i always keep default view, then create tabs for focused views… for exactly this reason…

Yeah, that confused me when I started with Home Assistant too. Anyway, yes I received the dump, but apparently the logging python module didn’t pass on the log output. Could you maybe instead open the http://IP_OF_YOUR_CAST_DEVICE:8008/setup/eureka_info?options=detail URL in a browser as I described in the github issue? Just replace the IP_OF_YOUR_CAST_DEVICE with the IP of your device - the Google Home app should display that somewhere in the details screen of the device. That would really help. (And sorry for potentially causing this - I made this PR to fix another device, the Google Home, which didn’t work before with Home Assistant)

just pm’d you incase there is some sensitive sh*t in there :slight_smile:

and don’t stress… this platform is one of the best I have seen in 20 years… we just need to make sure that newbie’s aren’t put off when configuring “tier 1” components… :slight_smile:

hello
I have MI android tv box which is connected to home-assistant via suggested integrations, so everything works but the state of android tv changes sometimes and third-party apps don’t work.
For this, I have checked the internet and found a solution via addon in ha ie ADB so, I have installed everything and also done with configuration but the problem comes here
I cannot see the new entity in states :frowning: don’t know why.
I have checked addon logs and also home assistant logs and restarted many times, everything is ok and they say connected but no entity
And by the way after addon installation, I removed previous media player integration so now even that is not coming I am struck here

how can my problem be solved, please help