bestlibre / hassio-addons

173 stars 110 forks source link

mopidy addon does not trust the HA server #138

Open kentloving opened 4 years ago

kentloving commented 4 years ago

The tts platform asks the media_player.mpd to play the mp3 file that google_translate generated.

I'm using the nginx addon, and I have certificates from ssl-for-free.

The platform gives a URI to the media_player of the form "https://my.public.dns/tts_proxy/something.mp3"

When mpd attempts to get the file, the attempt fails, I think because the mopidy addon does not trust the certificates of the HA web server.

Is there a way to either: 1) tell mpd to not check the server's certificate, like the verify=false option to session.get(), or 2) pass the server's trust chain to the mopidy addon

I found this that could be part of 2) From https://stackoverflow.com/a/33717517/1695680

To make python requests use the system ca-certificates bundle, it needs to be told to use it over its own embedded bundle

export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt Requests embeds its bundles here, for reference:

/usr/local/lib/python2.7/site-packages/requests/cacert.pem /usr/lib/python3/dist-packages/requests/cacert.pem

a-x- commented 4 years ago

Folks says, we should use mopidy from https://github.com/assada/hassio-addons instead

kentloving commented 4 years ago

I did not see that one, so I cloned this repo ( to https://github.com/kentloving/hassio-addons ) and made it work.