Symphonisk speaker uses wrong IP for local media

I’m using a Symfonisk (Sonos x Ikea) speaker to play audio files from my local media folder. Over a year ago I switched ISPs and as a result my local subnet changed (192.168.2.x → 192.168.1.x). After this change I’m no longer able to play local media on the speaker.

While debugging the issue I also started the Sonos app to see if it would give me any insights, which it actually did! When running the automation the Sonos app shows an error that it’s unable to play the mp3 file, and there I noticed it’s using my old subnet!

The image shows it’s still trying to reach 192.168.2.100:8123, but my home assistant is now hosted at 192.168.1.100:8123.

The relevant section of my automation looks like this:

  variables:
    # Map scanner device ID to media player entity ID
    media_players:
      # tagreader-5aa2ad
      a927d8e620ca8e1088df14857e066853: media_player.bedroom_veerle
    # Map tag ID to content
    tags:
      53-C9-C3-C6-00-00-01:
        media_content_id: media-source://media_source/local/lekturama/01 - Het Lelijke Jonge Eendje.mp3
        media_content_type: audio/mpeg

and

 action:
    - variables:
        media_player_entity_id: "{{ media_players[trigger.event.data.device_id] }}"
        media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
        media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
    - service: media_player.play_media
      target:
        entity_id: "{{ media_player_entity_id }}"
      data:
        media_content_id: "{{ media_content_id }}"
        media_content_type: "{{ media_content_type }}"

The full automation can be found on my github

How is it possible that the sonos speaker is still trying to use the old IP adress? And how would I be able to force an update of the IP address?

Did you try to reload the Sonos integration?

Maybe try chaning the config

See Advanced use section … maybe try telling HA the correct IP

I did reload the Sonos integration, but it didn’t help.

That Advanced section on the documentation could actually hold the answer! I can’t believe I completely missed that section.

I’m running my HA installation in a docker container, and I’m using --net=host, but I’ll still try to advertise the correct IP and see if it helps.

I will have to leave actual tests until tomorrow, as the speaker is in my daughters bedroom and she’s asleep.

Did it work?

Unfortunately it did not. The new Sonos app also doesn’t show the error in the same way anymore, so I have to assume it’s the same problem still.

I might remove and re-install the sonos integration. Of that doesn’t work I’ll probably try to reset the entire speaker.

Try deleting the music library from Sonos and re-adding it.

I’m not sure what you mean exactly. I have the media files hosted on the machine running my home assistant. As far as I know it’s not added to the music library in the Sonos app.