I use TTS to tell me if the freezer or garage door is open.
It has been working fine for a long time. Very recently it has stopped working on my Sonos speakers. It still works on my Google Home Mini so the TTS works fine.
I have not changed anything - it just stopped working. I am running core core-2021.8.7 and supervisor supervisor-2021.06.8. I believe it might have stopped working after upgrading til core-2021.8.x
The error I get
Logger: homeassistant.components.media_player
Source: components/media_player/__init__.py:995
Integration: Medieafspiller ([documentation](https://www.home-assistant.io/integrations/media_player), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+media_player%22))
First occurred: 9.41.25 (1 occurrences)
Last logged: 9.41.25
Error retrieving proxied image from http://192.168.1.160:1400/getaa?s=1&u=x-sonos-http%3acatalog%253atrack%2540%257ecatalog%252f1387%252ftracks%252f229606779.mp4%3fsid%3d175%26flags%3d8224%26sn%3d3
The media_player for Sonos works fine. I can start, stop, adjust volume etc.
Does anyone experienced the same or have any suggestions how to find the error?
i have the same issue. i cant figure out whats wrong. i thought it was because duckdns was getting DDOS attacks… but i think thats over… and still nothing.
I run HA docker version 2021.8.6. There were no sonos changes in 2021.8.7, so the two are the same in that respect. Google TTS to my Sonos speakers works just fine. I know Sonos will not play anything sent to it from a non-secure (ie. HTTP) source. I had to setup a DNS redirect for my HTTPS URL to my HA internal IP for it to work.
Your error almost looks like the Sonos media player integration is balking at an insecure URL.
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.