Media Stops Playing Randomly

Hi guys,
Not sure if this is the best place to post my issue.

I have set up an automation that should play bedtime music on a Google Home Mini for my kiddies throughout the evening and turn off in the morning. I have set it up to activate on either a Xiaomi button press, switch toggle, or when I tell Google Home to turn on the switch.

The media is stored locally in the www folder. It is a mp3 file that is just under 14hrs long. I access the media by pointing to the source: https://xxx.duckdns.org:8123/local/www/Twinkle_long.mp3

The automation and everything works completely as it should, music stops and starts with the toggle and all other triggers.

The challenge I have is that the media seems to drop out after a random period of time. Sometimes it is 45mins, sometimes 55mins, sometimes 1hr. But all within that ballpark. The file is definitely registering as 14hrs long as I can view the full file in a browser and also it shows the length as being the right length when playing in HA under the media player entity.

There are no logs or errors to point to any underlying issues, so I can’t work out what is going on?!?! Does anyone have any ideas what might be causing this? Only think I could think of is an internet connection drop out given it points to duckdns even though it is a local file on the Pi. Am running Hassio FYI.

Is there a better way to store and run local files to achieve what I want to achieve? I have a Synology NAS that I could use to store the file on and access if needed.

Any advice would be greatly appreciated! Apologies I haven’t shared any config, I am at work so do not have access at the moment.

Hi! I have the exact same problem, how did you solve it?

I didn’t sorry. I just created an automation that restarted the media when it detected the media player had stopped. It isn’t ideal as there is about 5mins of idle time, but it works…