HI, I’m having problems setting up any of the TTS options available. I have read what’s on the forum about it and all I can get is that for my setup: synology with docker and SSL I have to set up base_url which I did to my website of the style: xxxxx.synology.me
Now I’m trying to setup voicerrs tts and my configuration.yaml for this is:
When trying to call the service to one of my sonos, I get the mp3 created onto the tts folder of my setup: docker/homeassistant/tts and I can see it there but, from my sonos app I can see that it has tried to play the file but displays this message for a moment: "unable to play ‘xxxxxxxx.mp3’ - the connection to xxxxxxxxx.synology.me was lost"
I’m stuck at this point. It’s the exact same problem I had trying google tts. I guess it seems and authorization problem but I don’t know how to solve it. Please if anyone can help me, thank you.
If I use as base_url: xxxxxxx.synology.me I get in my sonos app the error described above:
“unable to play ‘xxxxxxxx.mp3’ - the connection to xxxxxxxxx.synology.me was lost”
but if I try to add the port: base_url: xxxxxxx.synology.me:8123 the mp3 file is not generated and the message now is:
“unable to play ‘xxxxxxxx.mp3’ - UNABLE TO CONNECT TO xxxxxxxxx.synology.me"
So I guess I should use the base_url withou the port but still not working!!
UPDATE: The service DOES work playing it to any Chromcast media playerso the issue I have must be SONOS related. Any idea why sending it to a sonos I get this message:
“unable to play ‘xxxxxxxx.mp3’ - the connection to xxxxxxxxx.synology.me was lost”
I’ve been careful to use the correct audio format so I cannot understand it. If it’s a matter of permissions what else can I do regarding this??
Now I think I have focused better my problem. It is completely related to what is said here:
Although the issue is not solved but closed (and now linking to another issue that for me seems quite different).
I have an SSL HA site with a correct base_url and a LetsEncrypt certificate. And my TTS mp3s (either with Google TTS or Voicerrs TTS) are working fine with media players like Chromecast. So the issue seems to be a non compatible certificate with Sonos. Actually LetsEncrypt certificates aren’t listed at the certificate authorities validated by Sonos as stated here:
One other possible problem may be that Sonos may need an intermediate key not provided initially by the CA as described later in the same link.
So now, I think that my problem is in my certificate but I don’t know how to solve this.
Hope all this info is useful for someone although it seems nobody is listening to me.
my solution was to add the entire chain in the servercertificate. Sonos only trusts the certificate authorities enlisted here http://musicpartners.sonos.com/node/339, but if you send the entire chain to the Sonos it will trust the certificate from the chain.
so if you create your cer /csr file just add al the intermediate and root ca in the same file:
-----BEGIN CERTIFICATE-----
encoded server certificate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
encoded intermediate CA 1
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
encoded intermediate CA 2
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
encoded root CA
-----END CERTIFICATE-----
after that copy the certificate to your HASS configuration and configure the certificate in configuration.yaml under http: >> ssl_certificate:
Thanks very much, ameulen01. I will proceed and try as you say even if let’s encrypt is telling me they are valid and included as a CA for Sonos (DST root X3). JUst one question, for what you’re saying I should include together with that scheme data from::
encoded server certificate
intermediate CA 1 certificate
Intermediate CA 2 certificate
Root CA certificate
I’m going to proceed that way to have the full certificate in one file BUT, from Let’s encrypt I only have this 3 files:
cert.pem
chain.pem
privkey.pem (private key not certificate)
So how can I do the above with this only 2 certificates?. I’m noob with all that as you can see, sorry for that. Thanks in advance.Thank you again!!
Just to complete the thread to help other users. Thanks to arnear suggestion, I just put together my 2 let’s encrypt certificates: cert.pem and chain.pem with the headers he indicated and used the new certificate in HA. Then my Sonos accepted the tts generated mp3s just fine.