Sonos can not play mp3

I try to play an mp3 file via a Sonos speaker with the following service.

service: media_player.play_media
entity_id: media_player.hobbyraum
media_content_type: music

The file is not played and in the Sonos app I see the following error

I do not understand why the Sonos app is disconnected.

I also tried media_content_id : with no success.

Could the problem be related to the internal / external URL set in Configuration → General
(here I have twice

Thank you in advance.

same issue here… several others of us are having the same issue. i cant figure out why

This problem just started with me. Unable to do TTS because of it. In english the error reads “connection to was lost” I’ve tried IP address, I’ve tried setting / un-setting internal external adresses.

Yes, It seems the Duckdns is having a DDOS attack of some sort… so all wekeend they been having issues.

still the same :frowning: i have tried everything

anyone who has managed to solve this problem?

Same problem here…
I’ve started an issue:

Workaround: host the .mp3 public on the internet and edit your service call data.

I have solved the problem by adding the lines to the http section:

  use_x_forwarded_for: true

You can find the Hassio internal ip-range by looking into the Supervisor - Multicast logging.
example: mdns-repeater (6): dev hassio addr mask net

1 Like


I finally was able to solve the problem.
The problem is Duckdns and the solution is to use a proxy manager.

As I have a Nginx webserver running on a different host than HA I so could not install NPM on HA
as an add-on.

I did the following steps:

  • Configure config file for Nginx webserver on my host (not HA). I used a DNS
    (I can provide more details about the the file if needed.
  • Stop Duckdns add-on in HA
  • Addapted configuration.yaml
    use_x_forwarded_for: true
  • Remove port forewarding 8123 from HA in my router

Now I can access my HA like (no port needed)

TTS via Sonos work again.

1 Like