TTS is generating wrong URL to remote play services

Hello.
I finally installed mopidy into a rpi and I am trying it.
Previously I used the TTS service against other media players and it never worked, now I think I know why.
If I check the logs of mopidy I can see this:

Nov 07 19:37:50 raspberrypi mopidy[465]: WARNING  [StreamBackend-5] mopidy.internal.http Download of 'http://192.168.0.112:8123/api/tts_proxy/b4ca94a4c778a70eb04349072c72119f233a7f56_es-es_a9c18110b0_cloud.mp3' failed: HTTPConnectionPool(
Nov 07 19:37:50 raspberrypi mopidy[465]: INFO     [StreamBackend-5] mopidy.stream.actor Unwrapping stream from URI (http://192.168.0.112:8123/api/tts_proxy/b4ca94a4c778a70eb04349072c72119f233a7f56_es-es_a9c18110b0_cloud.mp3) failed: error
Nov 07 19:37:50 raspberrypi mopidy[465]: WARNING  [Core-6] mopidy.core.tracklist Track is not playable: http://192.168.0.112:8123/api/tts_proxy/b4ca94a4c778a70eb04349072c72119f233a7f56_es-es_a9c18110b0_cloud.mp3
Nov 07 19:37:50 raspberrypi mopidy[465]: INFO     [Core-6] mopidy.core.playback No playable track in the list.

Where is the problem? Well, the IP is not the IP of my home assistant server (in fact, there is no server on that IP). If I substitute that IP with the real home-assistant IP I can reach the MP3 file no problem.
I don’t know where that IP is coming from, because I don’t have any IP setup on any configuration.

# Text to speech
tts:
    - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

homeassistant:
    packages: !include_dir_named packages # this allow to group configurations by integration-type
    media_dirs:
        media: /media
        recording: /config/snapshots

That is not the whole configuration, but the one I consider relevant. If the full one is needed, I can provide it.

Hi can you try the tts config like below.

tts:
  - platform: google_translate
    service_name: google_say
    base_url: http://192.168.xx.xx:8123

Hello @sheminasalam, thanks for the answer.
I saw the documentation, an while that is a nice workaround to make it work (in fact, it does) I still want to be able to fix the root cause.
The reason is because my local URL and the remote one (the nabu-casa service) are not the same, and… o wait, that doesn’t matter, both computers will always be on my local network.
In any case, I would love to fix the root cause of the problem :sweat_smile:

1 Like