TTS using built in RPi3 analogue audio output with Hassio?

Just to confirm, when you say host you mean you’re putting the URL in http: or media_player:?

# configuration.yaml
http:
  base_url: xxx.duckdns.org:ppp # for me ppp is omitted because my outside port is 443
                                # If you're using something other than 443 as your 
                                # outside world port then put it here
  server_port: xxxx # The internal port that Hass.io is available on
                    # (defaults to 8123, and likely ignored by Mopidy )

media_player:
  platform:mpd
  host: 192.168.x.xxx # This is where you are able to connect to the Web UI of Mopidy
                      # Test it by going to 192.168.x.xxx:6680 
                      # (unless you changed the web UI ports)

tts:
  - platform: google

I had to create ./mopidy/media in /share, I did this in ssh, maybe samba would have worked too?
mopidy Options:

{
  "local_scan": true,
  "options": [
    {
      "name": "local/media_dir",
      "value": "/share/mopidy/media" 
    }
  ]
}

Also something that might be useful, I noticed that the mpd card in the Home view has a simple way to test tts. (Click the three dots for more options on a card).

I’m surprised that none of the logs hold anything useful for you. I wasn’t always sure what they were trying to tell me, but there was usually something there.

1 Like
  • to confirm: it’s the host of the media_player i was referring to.

  • accessing the Web UI of Mopify works perfect

  • i created the /media and /share folder manually, Mopify doesn’t give me any errors, it says it’s working

as you see in the picture the media_player.MPD is greyed out and give status: unavailable, so whatever service i call on the media_player does nothing

Edit 1: this morning i rechecked my mopidy log and sew that my errors from yesterday are coming in, don’t know why it took so long, when i went to bed there was nothing in the log… anyhow, here it is:

INFO     New MPD connection from [::ffff:192.168.1.11]:36670
WARNING  Download of u'https://xxxxxxxxxx.duckdns.org:8123/api/tts_proxy/977453de759b12dca458f52e72b7bee1df7dbd29_en_-_google.mp3' failed due to connection timeout after 4.995s
INFO     Unwrapping stream from URI (https://xxxxxxxxxx.duckdns.org:8123/api/tts_proxy/977453de759b12dca458f52e72b7bee1df7dbd29_en_-_google.mp3) failed: error downloading URI https://xxxxxxxxxx.duckdns.org:8123/api/tts_proxy/977453de759b12dca458f52e72b7bee1df7dbd29_en_-_google.mp3
WARNING  Problem looking up https://xxxxxxxxxx.duckdns.org:8123/api/tts_proxy/977453de759b12dca458f52e72b7bee1df7dbd29_en_-_google.mp3
INFO     New MPD connection from [::ffff:192.168.1.11]:36712

Edit 2: i tested this url in my chrome browser and it gives an error404. If i take the portnumber out of the url: https://xxxx.duckdns.org/api/tts_proxy/etc. , then it loads in my chrome browser.
What i don’t understand is that i never ask to redirect to that port… here’s my setup:

http:
  base_url: https://xxx.duckdns.org

media_player:
  platform: pmd
  host: xxx.duckdns.org

Strange that the logging took so long.
If that’s the URL it’s generating I’d give restarting mopidy another shot. You should see logs related to the startup:

INFO     Starting Mopidy 2.1.0
INFO     Loading config from builtin defaults
INFO     Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO     Loading config from command line options
INFO     Creating dir /root/.config/mopidy
INFO     Enabled extensions: mpd, http, file, stream, m3u, softwaremixer, moped, local, local-sqlite
INFO     Disabled extensions: spotify, gmusic
WARNING  Found gmusic configuration errors, the extension has been automatically disabled:
...
...
etc

This is the complete log, i see nothing out of the ordinary

INFO Starting Mopidy 2.1.0
INFO Loading config from builtin defaults
INFO Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Creating dir /root/.config/mopidy
INFO Enabled extensions: mpd, http, file, stream, m3u, softwaremixer, moped, local, local-sqlite
INFO Disabled extensions: spotify, gmusic
WARNING Found gmusic configuration errors, the extension has been automatically disabled:
WARNING gmusic/username must be set.
WARNING gmusic/password must be set.
WARNING Found spotify configuration errors, the extension has been automatically disabled:
WARNING spotify/username must be set.
WARNING spotify/client_secret must be set.
WARNING spotify/password must be set.
WARNING spotify/client_id must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO Found 1 files in media_dir.
INFO Checking 0 tracks from library.
INFO Removing 0 missing tracks.
INFO Found 1 tracks which need to be updated.
INFO Scanning…
WARNING Failed local:track:test.mp3: Timeout after 1000ms
INFO Scanned 1 of 1 files in 1s.
INFO Done scanning.
INFO Starting Mopidy 2.1.0
INFO Loading config from builtin defaults
INFO Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Enabled extensions: mpd, http, file, stream, m3u, softwaremixer, moped, local, local-sqlite
INFO Disabled extensions: spotify, gmusic
WARNING Found gmusic configuration errors, the extension has been automatically disabled:
WARNING gmusic/username must be set.
WARNING gmusic/password must be set.
WARNING Found spotify configuration errors, the extension has been automatically disabled:
WARNING spotify/username must be set.
WARNING spotify/client_secret must be set.
WARNING spotify/password must be set.
WARNING spotify/client_id must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO Starting Mopidy mixer: SoftwareMixer
INFO Starting Mopidy audio
INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend
INFO Audio output set to “autoaudiosink”
INFO Loaded 0 local tracks using sqlite
INFO Starting Mopidy core
INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
INFO MPD server running at [::ffff:0.0.0.0]:6600
INFO HTTP server running at [::ffff:0.0.0.0]:6680
INFO Starting GLib mainloop

Anyone have any luck with the volume in hassio? with the volume down on the physical speaker it is to quiet and with the speaker turned up there is to much white noise.

1 Like

i got it to work, but the quality is really poor. i hope that this will offer a solution eventually:

1 Like

Hi Lentron, I have the same issue that you (MPD status: unavailable), how you fix it?

In my configuration yaml I have:

media_player:
- platform: mpd
host: 192.168.0.105

Hi Lentron

How id you get it to work … i have the same issue as u had. Mopidy tells me that the download has timed out!

kind regards
c_bb

Is there any chance anybody could help me use either TTS or mopidy notifications for example a light or switch is turned on? ie; Your Tv is On, or your light is off.

im running Hassio im very new to all of this and have been trying this for days.

i was successful getting AH to call the service and announce what i placed in

{
“entity_id”:“media_player.mpd”,
“message”:“Hello Brian, how are you today?”
}

in the post near the top of this thread. So i know it works but how do i get it to automatically speak upon actions?

im starting to feel like ill never get this down :frowning:

Did someone already found a solution for the problem with the noise?

I tried the media_player.volume_mute thing, but it doesn’t solve the white noise problem.

if MPD states unavailable is Hassio… In configuration.yaml change port to 6600.
It uses the server port of modipy and not the http port. :slight_smile:

that solved it for me

1 Like

mpd using usb or Bluetooth … searched everywhere does not seem a solution exits apart from audio jack with a lot of white noise since the volume cannot be controlled.

So it is posible to use mpd in Hassio with jack 3.5 mm speaker or with a bluethoot speaker?

Did you find a solution for the white noise?

1 Like

I can´t even install the addon…I hit “install” but nothing happens, not an error, nor a log.
I´m on HassIO 0.77.2…any ideas?

Sorry, I get…
Can’t install bestlibre/aarch64-mopidy:0.2.4 -> 404 Client Error: Not Found (“manifest for bestlibre/aarch64-mopidy:0.2.4 not found”).

1 Like

I think it is more about the 3.5mm speaker. That works for me.

i follow your instruction but i got errors - ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall tts.google_say (c:5dd076ee069e450e8499d3a899ec85e7): entity_id=[‘media_player.mpd’], message=Hello Brian, how are you today?>

this is funny. looks like google has banned the phrase “Hello Brian, how are you today?”. all my TTS commands work except this one :slight_smile:
i spent few hours to understand what is wrong in my setup

When I try to start the service on my hass.io instance it generates a 400 error (Bad Request) in my browser console and nothing happens. I’m not sure how to debug it from there. The install goes fine but I cannot start the service. Even if I - refresh, still generates a 400 error. I also tried uninstalling and reinstalling the service – no dice.
image

Nothing shows in the “Log” section of the add-on page, and nothing shows in the overall hass.io log on the information page.

Not sure it matters but in the add-on details it shows as 0.1.2 for some reason, on the github page, it says Mopidy is version 0.2.6.
image