Home Assistant release (hass --version):
0.54.0, 0.55.0, 0.55.2
Python release (python3 --version):
Don't know, the one built in the docker image for the 0.55.0 release
Component/platform:
media_player.cast
Description of problem:
My Google Home isn't recognized anymore. It was working in 0.54.0, disappeared at some point (I don't know if it's exactly when I upgraded to 0.55.0 or not). Now, even rolling back to 0.54.0, it's not loading.
Expected:
It has been recognized before, it should still be here.
Problem-relevant configuration.yaml entries and steps to reproduce:
- platform: cast
host: ghome
Additional info:
I tried to set it directly in the configuration, or enabling the discovery component, it doesn't appear. It is detected by other applications (Chrome on desktop, Play Music on my phone…), and other Chromecasts are detected by HASS on my network without any issue.
I tried to add debug logs for this component and pychromecast. With the cast component enabled twice (once for the Google Home, and a second time for a nVidia Shield TV), this is what I can see:
2017-10-19 08:15:49 INFO (SyncWorker_16) [pychromecast] Querying device status
2017-10-19 08:15:49 INFO (SyncWorker_12) [pychromecast] Querying device status
2017-10-19 08:15:49 DEBUG (SyncWorker_12) [pychromecast.controllers] Receiver:Updating status
2017-10-19 08:15:49 DEBUG (SyncWorker_12) [pychromecast.socket_client] Sending: Message urn:x-cast:com.google.cast.tp.connection from sender-0 to receiver-0: {'type': 'CONNECT', 'origin': {}, 'userAgent': 'PyChromecast', 'senderInfo': {'sdkType': 2, 'version': '15.605.1.3', 'browserVersion': '44.0.2403.30', 'platform': 4, 'systemVersion': 'Macintosh; Intel Mac OS X10_10_3', 'connectionType': 1}}
2017-10-19 08:15:49 DEBUG (SyncWorker_12) [pychromecast.socket_client] Sending: Message urn:x-cast:com.google.cast.receiver from sender-0 to receiver-0: {'type': 'GET_STATUS', 'requestId': 1}
2017-10-19 08:15:49 DEBUG (SyncWorker_12) [pychromecast.socket_client] Connected!
2017-10-19 08:15:49 DEBUG (Thread-4) [pychromecast.socket_client] Received: Message urn:x-cast:com.google.cast.receiver from receiver-0 to sender-0: {'requestId': 1, 'status': {'isActiveInput': True, 'isStandBy': False, 'volume': {'controlType': 'master', 'level': 0.8666666746139526, 'muted': False, 'stepInterval': 0.019999999552965164}}, 'type': 'RECEIVER_STATUS'}
2017-10-19 08:15:49 DEBUG (Thread-4) [pychromecast.controllers] Received status: CastStatus(is_active_input=True, is_stand_by=False, volume_level=0.8666666746139526, volume_muted=False, app_id=None, display_name=None, namespaces=[], session_id=None, transport_id=None, status_text='')
Here, two queries are made to get device status. Only one gets an answer. I also tried to disabled the discovery component and the Shield TV entry:
2017-10-19 13:34:30 INFO (SyncWorker_9) [pychromecast] Querying device status
And nothing more, ten minutes later.
Note that my Docker image is able to resolve the name ghome without any problem, and to ping the Google Home successfully at the corresponding IP.
Probably goes without saying but have you power cycled your Google Home(s) and then restarted HASS? This has happened to me a few times after updates and that usually does the trick.
I did, without success. I restart the Google Home twice at different times of the day, and tried different versions (via Docker) of hass, so I restarted it a lot.
Identical setup here and I am not able to reproduce the same issue.
Things to test if you are up for it:
ghome to IP address,My Google Home is on a 5 GHz Wi-Fi, hence on a channel >11 (44). I can't check easily right now if it would work better on the 2.4 GHz. I tried to change the HASS config to use the IP address and change the Google Home address, no difference. I also upgraded HASS to 0.56.2. My Google Home firmware is 99956, Cast firmware is 1.28.99956.
Looks like the Google Home firmware is indeed the root cause: https://community.home-assistant.io/t/trouble-with-chromecast-audio-different-firmware-versions/31320
I have the same issue with my Chromecast Audios and Google Home. The Chromecast Audio running firmware 1.27.96538 is detected just fine either thru discovery or manually, but the one running 1.28.100555 is not detected either thru discovery or manually. The Google Home running cast firmware 1.28.99956 is not detected thru discovery or manually.
I've also tried in various HASS Dockerized HomeAssistant instances from 0.55 - 0.56.2.
I played around with pychromecast, I can't see much difference between both of my devices (nVidia Shield, picked up by hass, and a Google Home named "Salon", which isn't picked up by hass):
>>> cast = next(cc for cc in casts if cc.device.friendly_name == "Salon")
>>> cast.wait()
>>> print(cast.device)
DeviceStatus(friendly_name='Salon', model_name='Google Home', manufacturer=None, api_version=None, uuid=UUID('b461bb68-1182-d275-c550-60385dbbd687'), cast_type='cast')
>>> print(cast.status)
CastStatus(is_active_input=False, is_stand_by=True, volume_level=0.6163636445999146, volume_muted=False, app_id=None, display_name=None, namespaces=[], session_id=None, transport_id=None, status_text='')
>>> cast = next(cc for cc in casts if cc.device.friendly_name == "SHIELD")
>>> cast.wait()
>>> print(cast.device)
DeviceStatus(friendly_name='SHIELD', model_name='SHIELD Android TV', manufacturer='NVIDIA', api_version=(1, 0), uuid=UUID('b5ca4b1e-6811-58c0-4b0a-9df6ed8d6731'), cast_type='cast')
>>> print(cast.status)
CastStatus(is_active_input=True, is_stand_by=False, volume_level=0.8666666746139526, volume_muted=False, app_id=None, display_name=None, namespaces=[], session_id=None, transport_id=None, status_text='')
>>>
There are a couple things bothering me: is_stand_by and is_active_input are reversed between both devices, and the api_version field isn't set for the Google Home. But the only of these three fields actively used by hass is to detect if the Cast device is turned on or not. I can find the exact same properties in hass's logs for the nVidia Shield, but nothing for the Google Home.
Same issues here. I thought it had to do with the latest Home Assistant update but if a read all the comments it must be the update from Google.
It has to be the Cast firmware. My last working Chromecast Audio just randomly updated to firmware 1.28.xxx, and now it doesn't show up in HomeAssistant.
After some debugging, I'm pretty sure this is because newer chromecast/home firmwares respond to the http://CAST_IP:8008/ssdp/device-desc.xml request pychromecast uses for manual setup with a 404 Not Found error - and so pychromecast _thinks_ the cast device is not available. A potential quick fix for this might be to use http://CAST_IP:8008/setup/eureka_info?options=detail (found here: http://fiquett.com/2013/07/chromecast-traffic-sniffing/), which includes all necessary attributes for setup.
You're probably right regarding the root cause:
[kernald@protee ~]$ curl -I http://shield-tv:8008/ssdp/device-desc.xml
HTTP/1.1 200 OK
Application-URL:http://shield-tv:8008/apps/
Content-Length:1069
Content-Type:application/xml
[kernald@protee ~]$ curl -I http://ghome:8008/ssdp/device-desc.xml
HTTP/1.1 404 Not Found
Content-Length:0
Content-Type:text/html
The /setup/eureka_info?options=detail URL returns valid information for both the Google Home and the Shield TV.
@Kernald Great, I'm working on a PR to pychromecast right now...
Ah great, was wondering why my brand new Chromecast 2 was failing to show up in HASS, this must be why!
Question: Will this break integration for older firmwares? I'm seeing exceptions in my log for not finding the new URL. The old one still works (:8008/ssdp/device-desc.xml). Devices aren't showing up.
On 0.59.0 I still get this:
2017-12-04 08:50:16 INFO (SyncWorker_5) [pychromecast] Querying device status
And nothing further... did this update bump do the trick for others?
I confirm that I can see my Google Home now with 0.59, but I can't confirm anything more (I'm not home currently)
Sitting on 0.59.1 can confirm google home plays the wake sound and no TTS audio. Worked perfectly on 0.58
If your Google Home is added to hass, it's not the same issue, but probably #10926
Yes you're right, I can see all my cast devices ok! Thank you.
I have Home Assistant 0.59.2 and cannot see either of my Google Homes. My Chromecasts work fine. The cast firmware versions for the Homes are 1.29.106111. The cast firmware version for the Chromecasts is 1.29.104827.
EDIT:
I am manually setting up my cast devices, not using discovery:
media_player:
- platform: cast
host: IP1
- platform: cast
host: IP2
- platform: cast
host: IP3
- platform: cast
host: IP4
@kmlucy Same fw versions as you but for me everything works OK.
Can you check 1) if there are any errors in the logs 2) from within your virt env check what version of pychromecast is installed with pip3 freeze
1) The only relevant logs I could find are here (grep 'media_player\|cast'):
2017-12-14 19:21:05 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
2017-12-14 19:21:05 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
2017-12-14 19:21:05 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
2017-12-14 19:21:06 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
--
2017-12-14 19:21:12 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2017-12-14 19:21:14 INFO (SyncWorker_26) [pychromecast] Querying device status
2017-12-14 19:21:14 INFO (SyncWorker_46) [pychromecast] Querying device status
2017-12-14 19:21:14 INFO (SyncWorker_24) [pychromecast] Querying device status
2017-12-14 19:21:14 INFO (SyncWorker_3) [pychromecast] Querying device status
2017-12-14 19:21:14 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.living_room_tv, old_state=None, new_state=<state media_player.living_room_tv=off; friendly_name=Living Room TV, supported_features=21437 @ 2017-12-14T19:21:14.646021-05:00>>
2017-12-14 19:21:14 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.bedroom_tv, old_state=None, new_state=<state media_player.bedroom_tv=off; friendly_name=Bedroom TV, supported_features=21437 @ 2017-12-14T19:21:14.671717-05:00>>
2) PyChromecast==0.8.2
I'm guessing entity_id=media_player.living_room_tv and media_player.bedroom_tv are chromecasts, not google home. and the issue is with google homes if I understand correctly @kmlucy .
@ferdydek Yes, that is correct. The two that do not add are a Google Home and a Google Home Mini.
@ferdydek Yes, that's correct. Newer Google home (mini) firmwares disabled a certain http endpoint pychromecast used to get its manual setup data. This has been fixed with version 1.0.2, though that version included another bug, that caused cast devices only to play the chime sound. However, if you try version 1.0.3 both issues should hopefully be fixed - So could you try downloading pychromecast 1.0.3 and report whether everything works with that particular version? Thanks!
Confirmed. Running pip install --upgrade pyChromecast before starting home assistant fixes the problem.
How do we go about requesting the hass.io team to upgrade pychromecast to 1.0.3?
For what it's worth, I've been running 1.0.3 for a week or so and haven't experienced any issues.
EDIT: It seems everything is working perfect. I had issues with my home Wi-Fi network, causing that some Google Home Mini's were not always reachable. But all seems fine since 1.0.3.
Is there a issue where the upgrade to 1.0.3 is being tracked? My old chromecasts are detected fine (with 0.8.2), but my brand new google home mini isn't added. I'm running in a docker env, so I should always specify the hosts since I don't want to bridge the networks.
I don't know if there's any opened issue regarding 1.0.3, but this one should probably be reopened if there's none. As a side note, I've been using 1.0.3 for a couple of days without any issue (on Docker).
I had issues with this too, I applied the fix to set it to 1.0.3. and all my issues have vanished! Seems to work just fine, thanks a lot!
Most helpful comment
@Kernald Great, I'm working on a PR to pychromecast right now...