Issues replacing deprecated tts base_url

Hi all,

Just now, I have the following config in place which works fine and I’m able to call the tts.google_translate_say service and hear the output via the speaker.

tts:
  - platform: google_translate
    base_url: https://ha.mydomain.com:12121/

Both external_url and internal_url are set in the config.

homeassistant:
  external_url: "https://ha.mydomain.com:12121/"
  internal_url: "https://ha.mydomain.com/"

If I remove the base_url from the config (as it’s now deprecated) and restart Home Assistant, the call to the tts.google_translate_say service succeeds however I hear no output from the speaker.

When I view the state attributes from within Developer Tools, it shows the below with an idle state:

media_content_id: >-
  https://ha.mydomain.com/api/tts_proxy/xxxxxxxxx_en_-_google_translate.mp3

From what I can see, this is using the internal_url (without the port number) whereas previously using the base_url, it required me to use the same FQDN as I’ve set for the external_url.

Is there a way for the tts integration to use the external_url?

A few points to note:

  • The domain ha.mydomain.com resolves to a public IP from the outside world however internal DNS resolves this to it’s private IP when inside the network hence both URLs are the same.
  • I’m using SSL as per the config states therefore using an FQDN
  • The certificate is signed by public CA (Let’s Encrypt) therefore no self-signed certs being used.

Any help would be appreciated.

Cheers,
Kev

Keep in mind that Google devices are hard coded to use Google’s DNS servers. To do the split DNS approach you need to ensure that you’ve blocked that.

@Tinkerer Thanks for the reminder.

Added a rule to masquerade DNS requests from the Google Nest to force it through to PiHole. Working now! :slight_smile:

Cheers again!

1 Like