I’m not sure if this works with Hassio, but try this on the command line:
alsamixer -c 1
I’m not sure if this works with Hassio, but try this on the command line:
alsamixer -c 1
Thanks. Doesn’t appear as though alsamixer is available on HassIO
I install mopidy as described and it’s working. I can open web-client and play mp3 stored in share/mopidy map. But I have a problem with google tts. When i call service with message i get error in mopidy log and no sound from speaker:
WARNING Download of u'https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3' failed: HTTPSConnectionPool(host='xxxx.duckdns.org', port=8123): Max retries exceeded with url: /api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x74a25ff0>: Failed to establish a new connection: [Errno 111] Connection refused',))
INFO Unwrapping stream from URI (https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3) failed: error downloading URI https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3
WARNING Problem looking up https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3
WARNING Download of 'https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3' failed: HTTPSConnectionPool(host='nightbodom.duckdns.org', port=8123): Max retries exceeded with url: /api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x71292ad0>: Failed to establish a new connection: [Errno 111] Connection refused',))
INFO Unwrapping stream from URI (https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3) failed: error downloading URI https://xxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3
WARNING Track is not playable: https://xxxxx.duckdns.org:8123/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d_en-uk_-_google.mp3
I read about problems TTS have with let’s encript and duckdns… I try with different base_URL options, but no success…
Any help would be appricated
I have the opposite problem. Done the Modipy installation as described above. The TTS is working on my local USB speakers but I battle with playing a local mp3 file.
I load an mp3 file in the directory /share/mopidy/media/
And a playlist file with one of the mp3’s in /share/mopidy/playlists/
Tried a couple of options but no sound on the usb speaker
entity_id: media_player.mpd
media_content_type: music
media_content_id: /share/mopidy/media/test.mp3
or
entity_id: media_player.mpd
media_content_type: playlist
media_content_id: testlist
The only option that played the mp3 on the speaker was:
(In this test the mp3 for this test was in the www directory)
media_content_id: https://my-domain.duckdns.org:8123/local/test.mp3
Does it mean I can only play a local mp3 if I have an internet connection?
I disable let’s encript, duckdns, etc. but still the same problem… mopidy is working through web-client but tts just don’t work.
I try to play mp3 with service in HA but it generate error:
Error doing job: Task exception was never retrieved
20:57 components/media_player/mpd.py (ERROR)
Ok I finaly found solution. It was problem with base_url and NAT loopback. My router doesn’t support NAT loopback so it was problem when mopidy try to play tts from xxxx.duckdns.org:8123…
I don’t know how to deal with NAT loopback problem (any sugestions?) so I try somethig else:
I change base_url to hassio_IP:8123 and mopidy has no problem playing tts.
Well… a don’t know if changing base_URL to hassio_IP:8123 instead of xxx.duckdns.org:8123 will affect any other devices in HA but for now it looks good?!?
Another thing is playing mp3 in services…
This also didn’t work for me… produce some errors because it couldn’t find file
This works for me:
{
“entity_id”: “media_player.mpd”,
“media_content_type”: “music”,
“media_content_id”: “local:track:test.mp3”
}
Hope it’s useful for someone…
Thanks a lot, it also worked for me
Thanks, this notation also worked for me to play mp3s, I looked at the docs for media_player.play_media
and I see that the format is component dependent, so I’d really like to know where you found that.
I’m adding some tips because it took me long enough to stumble through and I’d like to save the next soul.
I did not have a NAT loopback issue, my config is still:
http:
base_url: xxxxx.duckdns.org
I have HA using the default port internally (8123) but forwarded to port 443 in my router on it’s way to the outside world. I did not confirm (but it is my current hunch) that Mopidy doesn’t actually pick up server_port
, and requires the port tacked on to the end of the base_url
. This part gets rather confusing, because after going through the router the external and internal ports are not necessarily the same number.
Look for errors in Hassio>Mopidy>Logs (hit Refresh).
If your tts is not playing there will be some error here that might help narrow it down.
You can see what URI mopidy is trying to access, copy that and paste it into your browser for a quick test/troubleshooting.
Most critically: it appears that changes made to the file system (like your /share/mopidy/media) and Home Assistant variables (base_url
, maybe server_port
) do not take effect in Mopidy until you restart the add-on. This is why I cannot say for sure how it picks up the port number.
So as painfully slow as it seems, don’t rule out restarting HA and then restarting Mopidy to be sure any changes were actually grabbed.
Also, it seems this startion works as music
and not playlist
, which I thought was odd.
{
"entity_id": "media_player.mpd",
"media_content_type": "music",
"media_content_id": "http://www.primcast.com/asx/listen265935.m3u"
}
Finally, thanks to everyone in this thread, wouldn’t have had tts working at all without ya!
heya, i’ve followed the instructions, Mopidy is working fine, but my mediaplayer.MPD is unavailable.
if i open the Web Ui to the modify server and start streaming a radiostation it works fine over my RPI2 audio jack.
however, any media i try to play through mediaplayer.MPD fails (also tts) even tho the Mopedy logs don’t show up any errors.
any idea’s as to what’s wrong? i’ve tried the following hosts with the same results:
https://192.168.x.xxx:8123
https://xxx.duckdns.org
https://xxx.duckdns.org:8123
Have you tried looking at the HA logs? Some errors (like file not found
) end up there instead of making it to the mopidy logs.
Also, I saw it mentioned that the https://
was not necessary in base_url
, I’m not sure if that’s having an effect.
The linked github issue thread TTS.google_say not working with HTTPS is a pretty good place to look for some more answers.
in the Hass.io logs aren’t any errors either after calling the tts service.
i’ve tried the host options without https://, also without succes:
host: xxxxx.duckdns.org:8123
host: xxxxx.duckdns.org
host: 192.168.x.xxx:8123
host: 192.168.x.xxx
the weird thing is that through the Web UI of Mopify plays my radiostation stream just fine… i’ve tried calling the tts service both while playing the radio and without the radio… it all has no effect
Edit: i just received an error while trying tts:
Error doing job: Task exception was never retrieved
21:37 components/media_player/mpd.py (ERROR)
it’s the first time it produces an error though
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.
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.
i got it to work, but the quality is really poor. i hope that this will offer a solution eventually:
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