Lost TTS capability in current automations

Greetings all, I have recently updated to 2021.3 (running on ubuntu) and the update went well except for broken Synology Cameras which was expected and resolved.

However, just noticed that none of my previous tts automation/reminders are working.

Eg. at 1800hrs on Sunday night the entity - media_player.all_speakers - will broadcast “put the garbage out”

I havent changed anything for these automations for a long time so Im guessing that the update broke something at my end. Has anyone else seen this or can offer any advice.

Cheers

Peter

Please post the automation(s) in question. It’s hard to provide any feedback when we’re left to guess what your automations might contain.

Hi PHil,

Its not just automations, I havent had time to do a thorough check but running a service call in dev tools fails.

entity: media_player.all_speakers  (tried this on individual entities)
message: test
error:    failed to call service tts/google_say

my configuration.yaml file (which is unchanged for over 12 months is

# Text to speech
tts:
  - platform: google_translate
    service_name: google_say

i am not sure it is i related but i started from scratch on my back up Pi with the latest version of HA 2021.3.4

usually to get the tts working, all i would need to do is at the following lines to the configuration.yaml,

tts:
  - platform: google_translate

reboot and it would give an option to use service tts.google_translate_say. But i am not seeing this service in any of the drop downs in Automatons or developer tools.

Hi orc.trial,

concur I am only seeing services tts.clear_cache and tts.google_say

Just noticed this in the logs

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 141, in handle_call_service
await hass.services.async_call(
File “/usr/src/homeassistant/homeassistant/core.py”, line 1488, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1523, in _execute_service
await handler.job.target(service_call)
File “/usr/src/homeassistant/homeassistant/components/tts/init.py”, line 188, in async_say_handle
base = tts.base_url or get_url(hass)
File “/usr/src/homeassistant/homeassistant/helpers/network.py”, line 117, in get_url
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError

Hello Peter
i am not seeing any tts related service available in the drop downs.

possible resolution.

I just added this line into my configuration.yaml file. I am not seeing the error when running the service now or seeing it in the logs. However, Im not at home and cant hear it from 10kms away. I will advise when home.

===
base_url: https://myaddress.duckdns.org:8123

orc do you have this in your configuration.yaml

tts:
  - platform: google_translate
    service_name: google_say

If you have two browser windows open then you can have the mediaplayer on lovelace and one with the TTS.
Send the TTS and look at the other window. You should see it play a file.

I have always used just the following and it has worked for me (stilling working on another PI with 2020 HA release.


tts:
  - platform: google_translate

thanks Hellis81 got home to see your post. that worked and the base_url line resolved the issue.

Guess update must have changed something.

thanks all

for me adding this line seems to have fixed the issue (at least i see the tts_google_say option in the drop downs for call services)

service_name: google_say

@peternest- what media player are you using with this tts service? I cant get the mpd to work in the latest version of HA. entity media_player.mpd shows unavailable. i have the following lines in my config. i am just trying make announcements through local audio port on the Raspberry. It works well on the 2020 version of HA i have running on another Pi. no errors in the log related to the mpd


media_player:
  - platform: mpd
    host: 192.168.2.32

getting a bit confused here…

I use

tts:
  - platform: google_translate
    service_name: google_say
    base_url: https://myaddress.duckdns.org:8123

This enables the Text to Speech ability then calls it a service (to my very limited knowledge). Please anyone jump in if that is incorrect.

Then, to test functionality, I go to Dev Tools - Services
here I select service and type tts and it will then provide the tts option
entity is where I select what media entity I want to send the service too. These are devices I have installed in my house eg sonos speakers or google home mini, etc.
Message is what I want the service to say

then call service

“The mpd platform allows you to control a Music Player Daemon from Home Assistant.” this may be a different thing entirely but Im not an expert in this arena.

Hope that helps.

1 Like

thanks Peter that is correct… I am able to use the tts portion now with google home …however this is probably an unrelated issue but the media_player.mpd entity allows playing the messages on local speaker connected to the audio port-- the problem i am facing is media_player.mpd entity is showing unavailable for some reason. it works on my other pi running a couple versions older HA so not sure what i am missing - but hoping it something simple that i am forgetting.

ok, add base url to tts

tts:
  - platform: google_translate
    base_url: https://myaddress.duckdns.org 
    #my router open port fordward (nat port) 443 to 8123

because hass not use base_url in http config
see in log file ‘home-assistant.log’ :

WARNING (MainThread) [homeassistant.components.http] The ‘base_url’ option is deprecated, please remove it from your configuration

For those still facing this issue on the latest version of HA (2021.11.x) then you just need to configure an external URL on your Home Assistant configuration.yaml:

homeassistant:
  ...
  external_url: "https://www.example.com"
  internal_url: "http://homeassistant.local:8123"

See the docs here: Setup basic information - Home Assistant

2 Likes