Audio sink and multiple network interfaces


I’m running OH3.1 on a Synology NAS - unzipped, not wrapped. I cannot get the default audio sink to play sounds. The sink is a Sonos Symfonisk device. I’ve set up the device with a callbackUrl to the local ip address of the NAS (192.168.x range). When I issue openhab:voice say "hi" command, I can see a command issued to the Sonos to play an mp3 url, but it’s the wrong one. It waits the whole timeout (20 sec) before giving the prompt back. The ip address in the url is, which is the ip address of the docker bridge that is also on the same machine. I suspect this address is obtained using the InetAddress class, which returns one of the local ip addresses, but not one that is reachable by the Sonos. Is there a way to configure which IP address is used when the audio sink / Sonos is instructed to play the mp3 that is generated by the say command?


1 Like

Source code seems to use            final String ipAddress = networkAddressService.getPrimaryIpv4HostAddress();

Does this help: Framework Tools | openHAB ?

I did not know I could set the primary interface (in settings/network settings, in case someone finds this topic later). I set it to the 192.168.x range and restarted the sonos binding, and it works now! Thanks for the suggestion, and for pointing me to the relevant part of the code. Do you happen to know if I can set it in a configuration file too? I’m trying to make my installation portable by copying the conf directory.

1 Like

I did not find any other place to have influence on the setting.