I think this may be isolated to you guys, I have a similar setup (Google TTS to Sonos for alerts) and mine is working fine on all latest revisions of Supervisor and HA. According to the error message you shared, you need to make sure you can connect via port 1400.
I have TCP 80, 443, 445, 2869, 3400-3401, 3445, 3500, 4444, and 1400-1500 open to my speakers. I have found Sonos to be very finicky around accessing ports, if you have one blocked that it wants it’ll complain.
See here for more detail (and UDP port list): Sonos Support
I do not think the ports has to be open on the WAN side. I have never had them open - I have just one LAN, where everthing local can reach eachother freely. Sonos has been working fine for many years.
A bit of progress.
When I type something to say Home Assistant write a file as it is suppose to. Sonos however fails to play it. It says, that it can not play the file as the connection to Home Assisant vanished/failed.
Mayby it is a port issus at SpikeyGG suggested. I will try is.
Sonos can only play from HTTPS sources. Make sure HA is setup correctly with SSL. Have the Sonos app open on a phone and HA open in a browser or app on another device. Send the TTS from HA and see what the Sonos app says the source link is.
Don’t know what to say then… mine is working fine. I just remember when I was setting up Sonos and TTS a year ago that it did not like an http address and that “lost connection” message was exactly what I was getting. I could not push anything to Sonos until I setup a DNS loop back/redirect in my DNS server to redirect any internal connections from my external HTTPS to the internal IP. Also, I don’t use duckdns, rather I use a lets encrypt certificate on my Synology and share that with the HA container. So maybe there were some changes to duckdns recently? Or maybe something changed from the ISP? Going back to the ports comment, maybe check that HA is externally accessible and specifically the www folder or whichever folder holds the TTS audio files. Take the URL that Sonos is supposed to be playing and put it into a web browser. The file should play there or may give you a security warning or may not be found. The way Sonos handles media is HA does not send the audio file, rather HA tells Sonos “I want you to play this” and sends a link to where the file is. Sonos validates the URL, goes there and then retrieved the file. If that file is not accessible due to network issues, security issues, or misconfigured file sharing, it will error out.
Just to add I’m getting the same issue. Snapshot and restore seem to function fine, as well as throwing music up on it. However no TTS plays. This has been working fine previously for well over a year.
I have the same problem since version 2021.8.7. It did work fine before.
Now the tts wont play. Sonos cannot connect.
No audio file generated in tts folder. I have removed the old files.
Same problem here. It worked until Sunday 22nd of August, which means it worked with 2021.8.8.
EDIT: I am using duckdns.org, as both internal and external URL, and the FQDN is resolved to the internal IP for HA in my DNS, if that has anything to say. But again, this has been the case for a long time now, and it just recently stopped working.
I am having the same issue since the last update, before it worked flawlessly. I already checked firewall, internal/external link, Sonos media player works well from Home assistant, TTS file is being created, TTS works on google mini speakers, but Sonos just won’t play them… Running out of ideas
This do not seem to be working for me. Same error.
However I have not changed my SSL since I use the DuckDNS add-on, where you only get a token. This can not be used with the Nginx Proxy Manager (as far as I can see)
This is no longer a Sonos or a TTS issue. This is a DuckDNS/Nginx/HTTP configuration issue. My suggestion is to read some of the changes and specifically breaking changes of the past few major versions of HA (ie 2021.6, 2021.7, 2021.8) and if you run HA Supervised or HAOS, the supervisor and HAOS changes as well.