Google Home media_player connect problem after upgraded

So I noticed after upgrading HA, the tts service stops working… my google Home stops announcing things hapenning around the house.

I checked the log and see this error, any one has similar issue??? help! :wink:

Mar 06 16:50:29 raspberrypi hass[20330]: 17-03-06 16:50:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1978224336-16, service_data=message=‘hello’, entity_id=media_player.kitchen_home, domain=tts, service=google_say>
Mar 06 16:50:29 raspberrypi hass[20330]: 17-03-06 16:50:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1978224336-17, service_data=media_content_id=https://nguyenha.duckdns.org/api/tts_proxy/afef6840d5f38128127d70eb9c8f729a56297104_en_-_google.mp3, media_content_type=music, entity_id=[‘media_player.kitchen_home’], domain=media_player, service=play_media>
Mar 06 16:50:29 raspberrypi hass[20330]: 17-03-06 16:50:29 WARNING (MainThread) [homeassistant.core] Unable to find service media_player/play_media

You’ll get that error when there was an error that stopped the platform from initializing. If you check earlier in your log - probably close to boot - do you see an error when initializing the media_player for kitchen_home?

I will do another restart and see if I could see anything … I noticed in States Page, there is no longer any media_player; so there must be something wrong…

Okay, so I restored my 0.39.0 version and I can see my media_player.kitchen_home in the States page.

I manually trigger the TTS command again and I hear my Google Home initiated but says nothing. Checked the log and saw this:

Mar 07 01:50:52 raspberrypi hass[641]: 17-03-07 01:50:52 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=tts, service=google_say, service_data=entity_id=media_player.kitchen_home, message=‘hello’, service_call_id=1979158704-2>
Mar 07 01:50:54 raspberrypi hass[641]: 17-03-07 01:50:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=play_media, service_data=media_content_id=https://nguyenha.duckdns.org/api/tts_proxy/afef6840d5f38128127d70eb9c8f729a56297104_en_-_google.mp3, entity_id=[‘media_player.kitchen_home’], media_content_type=music, service_call_id=1979158704-3>
Mar 07 01:50:54 raspberrypi hass[641]: 17-03-07 01:50:54 INFO (Thread-1) [pychromecast.controllers] Receiver:Launching app CC1AD845
Mar 07 01:50:54 raspberrypi hass[641]: 17-03-07 01:50:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1979158704-3>
Mar 07 01:50:54 raspberrypi hass[641]: 17-03-07 01:50:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1979158704-2>
Mar 07 01:50:54 raspberrypi hass[641]: 17-03-07 01:50:54 INFO (Thread-10) [homeassistant.components.cover.command_line] Running state command: /home/pi/hass.shell.commands/garage/checkG2Sensor.sh
Mar 07 01:50:55 raspberrypi hass[641]: 17-03-07 01:50:55 INFO (MainThread) [homeassistant.components.http] Serving /api/states/sensor.gogogate2 to 192.168.1.1 (auth: True)
Mar 07 01:51:04 raspberrypi hass[641]: Exception in thread Thread-26:
Mar 07 01:51:04 raspberrypi hass[641]: Traceback (most recent call last):
Mar 07 01:51:04 raspberrypi hass[641]: File “/usr/lib/python3.4/threading.py”, line 920, in _bootstrap_inner
Mar 07 01:51:04 raspberrypi hass[641]: self.run()
Mar 07 01:51:04 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 338, in run
Mar 07 01:51:04 raspberrypi hass[641]: if self.run_once() == 1:
Mar 07 01:51:04 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 403, in run_once
Mar 07 01:51:04 raspberrypi hass[641]: function(data)
Mar 07 01:51:04 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 824, in
Mar 07 01:51:04 raspberrypi hass[641]: self._block_till_launched(app_id))
Mar 07 01:51:04 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 836, in _block_till_launched
Mar 07 01:51:04 raspberrypi hass[641]: app_id, self.launch_failure.reason))
Mar 07 01:51:04 raspberrypi hass[641]: pychromecast.error.LaunchError: Failed to launch app: CC1AD845, Reason: CANCELLED

I have no idea what’s happening…

UPDATED: I noticed tts_proxy in the api URL …would that be related to this issue?

As I clicked “Turn On” media_player for other Chrome casts in the house, it connects fine and works… but for Google Home on HA, I got exception in the log.

I am still searching for solution!!

Mar 07 18:07:46 raspberrypi hass[641]: 17-03-07 18:07:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=turn_on, service_data=entity_id=media_player.kitchen_home, service_call_id=1979158704-34>
Mar 07 18:07:46 raspberrypi hass[641]: 17-03-07 18:07:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Mar 07 18:07:46 raspberrypi hass[641]: Traceback (most recent call last):
Mar 07 18:07:46 raspberrypi hass[641]: File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
Mar 07 18:07:46 raspberrypi hass[641]: result = coro.throw(exc)
Mar 07 18:07:46 raspberrypi hass[641]: File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/core.py”, line 1001, in _event_to_service_call
Mar 07 18:07:46 raspberrypi hass[641]: yield from service_handler.func(service_call)
Mar 07 18:07:46 raspberrypi hass[641]: File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/init.py”, line 365, in async_service_handler
Mar 07 18:07:46 raspberrypi hass[641]: yield from getattr(player, method[‘method’])(**params)
Mar 07 18:07:46 raspberrypi hass[641]: File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
Mar 07 18:07:46 raspberrypi hass[641]: yield self # This tells Task to wait for completion.
Mar 07 18:07:47 raspberrypi hass[641]: File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
Mar 07 18:07:47 raspberrypi hass[641]: value = future.result()
Mar 07 18:07:47 raspberrypi hass[641]: File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
Mar 07 18:07:47 raspberrypi hass[641]: raise self._exception
Mar 07 18:07:47 raspberrypi hass[641]: File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
Mar 07 18:07:47 raspberrypi hass[641]: result = self.fn(*self.args, **self.kwargs)
Mar 07 18:07:47 raspberrypi hass[641]: File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/cast.py”, line 267, in turn_on
Mar 07 18:07:47 raspberrypi hass[641]: CAST_SPLASH, pychromecast.STREAM_TYPE_BUFFERED)
Mar 07 18:07:47 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/controllers/media.py”, line 466, in play_media
Mar 07 18:07:47 raspberrypi hass[641]: callback_function=app_launched_callback)
Mar 07 18:07:47 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 805, in launch_app
Mar 07 18:07:47 raspberrypi hass[641]: self.update_status(lambda response:
Mar 07 18:07:47 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 796, in update_status
Mar 07 18:07:47 raspberrypi hass[641]: callback_function=callback_function_param)
Mar 07 18:07:47 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/controllers/init.py”, line 84, in send_message
Mar 07 18:07:47 raspberrypi hass[641]: self.namespace, data, inc_session_id, callback_function)
Mar 07 18:07:47 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 602, in send_platform_message
Mar 07 18:07:47 raspberrypi hass[641]: inc_session_id, callback_function_param)
Mar 07 18:07:47 raspberrypi hass[641]: File “/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py”, line 589, in send_message
Mar 07 18:07:47 raspberrypi hass[641]: raise NotConnected(“Chromecast is connecting…”)
Mar 07 18:07:47 raspberrypi hass[641]: pychromecast.error.NotConnected: Chromecast is connecting…

Some one on reddit suggested to manually specify the media_player instead of letting HA discover it and that did the trick… I finally got my Google Home connected and functioning again.