SOLVED: No TTS output from Google Home

I am running hassio 0.66.0, having just upgraded from 0.65.5 in an effort to resolve the problem.
Also, I just installed a new router which may or may not be relevant…

I am seeing repeated messages like the following in the logs:

2018-04-01 07:48:57 WARNING (MainThread) [homeassistant.core] Unable to find service media_player/play_media

All media player entities on the network are added using discovery, though I have also tried manually specifying IPs for those as well (all have static IPs on the network).

The behavior is as follows: when calling the tts.google_say service with some test data, the target device is activated (the chime on the device sounds, so I know that it’s being turned on successfully), but the message is not played.

Other possibly relevant information from the logs follows:

2018-04-01 07:49:01 WARNING (SyncWorker_5) [netdisco.ssdp] Error fetching description at http://192.168.1.1:8200/rootDesc.xml
2018-04-01 07:49:09 ERROR (SyncWorker_13) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-04-01 08:08:31 WARNING (Thread-10) [pychromecast.socket_client] Heartbeat timeout, resetting connection
2018-04-01 08:08:38 ERROR (Thread-10) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
2018-04-01 08:08:46 ERROR (Thread-39) [pychromecast.socket_client] Error reading from socket.
2018-04-01 08:08:46 ERROR (Thread-41) [pychromecast.socket_client] Error reading from socket.
2018-04-01 08:08:46 ERROR (Thread-40) [pychromecast.socket_client] Error reading from socket.
2018-04-01 08:08:47 WARNING (Thread-39) [pychromecast.socket_client] Error communicating with socket, resetting connection
2018-04-01 08:08:47 WARNING (Thread-41) [pychromecast.socket_client] Error communicating with socket, resetting connection
2018-04-01 08:08:47 WARNING (Thread-40) [pychromecast.socket_client] Error communicating with socket, resetting connection
2018-04-01 08:08:47 ERROR (Thread-39) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
2018-04-01 08:08:47 ERROR (Thread-41) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
2018-04-01 08:08:47 ERROR (Thread-40) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
1 Like

As an additional troubleshooting step, I turned on debug logging for both homeassistant.components.media_player and homeassistant.components.tts.

For media_player, I see a lot of successful connections and no errors in the log:

2018-04-02 10:50:02 DEBUG (MainThread) [homeassistant.components.media_player.cast] Connection successful!

The tts component is not generating any log entries, even when I manually call the service. Still no idea what’s going on here…

Another thing: mp3s a ARE being generated and stored in config\tts, so the failure does appear to be associated with the message in the OP regarding the missing media_player/play_media service.

I’m debugging the same problem. Has not worked for me for a while on any of my media devices, so I’m not sure what broke when. I recently added one of those little google assistant pods to our house and it has the same behave you report…turns on, no errors, files saved in config directory.

Any other troubleshooting would be helpful. I have automations that announce things to tts and would like them to work again.

Yeah, I’m not really sure how to proceed at this point. I swapped back to the old router and it started working again, and disabling https and accessing the UI locally also solved the problem.

So it doesn’t seem to be a problem with the HA software itself, but rather a networking issue that I apparently lack the skills to troubleshoot effectively.

Maybe we can put our heads together and make some progress. have you made any changes in your network topography recently? What happens if you disable https? Do you get the same behaviour where the GH chimes and then… nothing?

The really annoying thing about this issue is that it’s really hard to pinpoint when it started happening. I just noticed one day that the notifications stopped.

I’m seeing this error now…

2018-04-07 18:09:14 ERROR (Thread-3) [pychromecast.socket_client] Exception caught while sending message to controller ReceiverController: Message urn:x-cast:com.google.cast.receiver from receiver-0 to *: {‘requestId’: 92, ‘status’: {‘applications’: [{‘appId’: ‘CC1AD845’, ‘displayName’: ‘Default Media Receiver’, ‘isIdleScreen’: False, ‘launchedFromCloud’: False, ‘namespaces’: [{‘name’: ‘urn:x-cast:com.google.cast.debugoverlay’}, {‘name’: ‘urn:x-cast:com.google.cast.broadcast’}, {‘name’: ‘urn:x-cast:com.google.cast.media’}], ‘sessionId’: ‘e0837c9d-5eb0-4438-aa2c-51c3e207fb7a’, ‘statusText’: ‘Ready To Cast’, ‘transportId’: ‘e0837c9d-5eb0-4438-aa2c-51c3e207fb7a’}], ‘userEq’: {‘high_shelf’: {‘frequency’: 4500.0, ‘gain_db’: 0.0, ‘quality’: 0.707}, ‘low_shelf’: {‘frequency’: 150.0, ‘gain_db’: 0.0, ‘quality’: 0.707}, ‘max_peaking_eqs’: 0, ‘peaking_eqs’: }, ‘volume’: {‘controlType’: ‘master’, ‘level’: 0.6200000047683716, ‘muted’: False, ‘stepInterval’: 0.019999999552965164}}, ‘type’: ‘RECEIVER_STATUS’}
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 460, in _route_message
message, data)
File “/usr/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 775, in receive_message
self._process_get_status(data)
File “/usr/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 917, in _process_get_status
self.app_launch_event_function()
File “/usr/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 476, in app_launched_callback
subtitles_mime, subtitle_id)
File “/usr/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 529, in _send_start_play_media
self.send_message(msg, inc_session_id=True)
File “/usr/lib/python3.6/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/usr/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 619, in send_app_message
inc_session_id, callback_function_param)
File “/usr/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 601, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…

Yup, I get the same error (I won’t post it now because I’m on mobile). You’re using DuckDNS and accessing over https, yes?

And you can trigger this error by sending a command to media_player.play_media, correct?

It might have started when i implemented DuckDNS. I’m reading this thread now…

Pretty old.issue, and I’ve definitely had it working over https pretty recently. Worth a read for sure though.

cdybdahl, I’m now following this issue… https://github.com/home-assistant/home-assistant/issues/13442

Ah, interesting… that definitely looks familiar. Not a lot of activity in the past couple of weeks though… I’ll chime in over there a bit later on today, and encourage you to do the same.

Have you tried removing the port from base_url? I use ssl and when using a port in base_url, I get the sound from the google home but no message. When I remove the port it works fine.

2 Likes

Holy shit, that solved the problem for me! Assuming it had something to do with the cert matching the *.duckdns.org domain…

THANKS!

@cdybdahl Are you using 8123 forwarded to your Hass.io instance? Could you possibly share your whole ‘http’ config?

I tried this and it did not work for me Google TTS does not working when SSL is enabled · Issue #13442 · home-assistant/core · GitHub. Any other pointers?

Are you forwarding 443 to 8123?

My http config:

http:
  api_password: !secret http_password
  base_url: !secret public_url
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

Base URL is REDACTED.duckdns.org (no port), and 443 is forwarded to 8123 in my router config.

1 Like

@cdybdahl Thanks. I’ve now got the correct path (?) being shown in the developer/states page as below but I still get no speech. Media player turns on but nothing spoken. Now running 0.67.0.

volume_level: 0.7272727489471436
is_volume_muted: false 
media_content_id: https://mydomain.duckdns.org/api/tts_proxy/2e871554f1f3e466dshjy282f6b2f308141e40112f_en_-_google.mp3 
media_position: 0 
media_position_updated_at: 2018-04-15T23:47:38.644053+00:00 
app_id: CC1AD845 
app_name: Default Media Receiver 
friendly_name: Gaming Room Home 
supported_features: 21437

What is your ‘media_content_id’ after you’ve got it to say something?

Hi, I’m running hassio 0.73.3 w/ SSL enabled via DuckDNS and Let’s Encrypt. I have removed port 8123 from my base URL and have port 443 forwarding to 8123 in my router’s config.

Also, I can see that the Google TTS mp3 files are being created and stored in 'config/tts". Finally, I can even see my Sonos speakers queue the TTS mp3 files to play. But for whatever reason, they won’t actually play.

Any ideas for troubleshooting?

@matthewk

I was having the same issue as you, solved it by adding this to the tts: config

tts:
  - platform: google
    base_url: https://<yours>.duckdns.org

I didnt, and still dont use “base_url” in the http component