Hey everyone, I wanted to share my experience with configuring sound files in OpenHAB. I recently started exploring the notificationsound channel for the Sonos binding and found it incredibly useful. However, I ran into a bit of a snag when trying to host my sound files locally. Let me walk you through my journey and how I resolved it!
Initially, I was hosting my sound files on Dropbox, but I wanted to transition to a local setup for better reliability and reduced dependency on external services. I tried several directories within my OpenHAB folder, including extra, conf/icons, conf/html, and runtime/sounds, but none seemed to work as expected. The URIs I constructed either returned errors or didn’t load the files properly.
After some research and trial and error, I discovered that the runtime/sounds directory is the most reliable place to store your sound files. This directory is specifically designed for such purposes and ensures that your files are accessible through the Jetty server. To test this, I placed my doorbell.mp3 file in runtime/sounds and used the URI http://localhost:8080/sounds/doorbell.mp3. It worked like a charm!
Here’s a quick tip for anyone else tackling this: Always ensure that your file names are consistent and avoid spaces or special characters. Additionally, double-check your file paths in the OpenHAB configuration to prevent any typos. If you’re still having issues, restarting the OpenHAB service can sometimes resolve unexpected glitches.
I hope this helps someone out there who’s struggling with similar setup issues. Happy automating! ![]()