Can't Cast to device but browser plays okay

Brand new install running in a container on a QNAP NAS.

I have managed to install a Google Home device as well as a number of Sonos devices.

When I select Media from the left menu and select something like Text to Speech, then Google, if I have the device at the bottom of the screen listed as browser, then everything works correctly. If I change the device to the Google Home, then nothing gets played, even though it looks like it is sending it.

Also under media, My Media, I have loaded up some MP3s, they play fine to browser, the just don’t cast.

If I select a radio station to play. That plays okay. So it looks like the device is connecting.

It doesn’t matter what device I choose, Google or Sonos, the results are exactly the same.

I haven’t included any code, as this problem happens with code or using the GUI, as per the attached image. Any help would be appreciated.

I have another QNAP NAS and installed everything from scratch on that and it worked immediately. The only difference being (apart from a different device) was that I installed “Latest” rather than “Stable” version. So now I know it works. Looking at the original NAS console I saw the following errors when trying to play a sound.

2023-06-16 21:06:15.472 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that calls media_source.async_resolve_media without passing an entity_id. Please report issue for media_source using this method at homeassistant/components/media_source/init.py, line 151: report(“calls media_source.async_resolve_media without passing an entity_id”)
2023-06-16 21:06:24.028 ERROR (Thread-4) [homeassistant.components.cast.media_player] Failed to cast media http://10.7.0.2:8123/api/tts_proxy/ced17f43e38c776f101d6d97bfa9284ea88e874a_en-au_-_google_translate.mp3 from internal_url (http://10.7.0.2:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

The IP addresses are not local, went back to my network setup and remembered that the NAS is setup for VPN for WAN use and this is obviously confusing everything. Stopped VPN, restarted HA and everything is working now.

Obviously VPN is only likely to be a problem for a Docker or virtual install.

Now to create that script to set off every speaker in the house when the door bell rings.