I have an mp3 file that I want to play through my sonos.
Where do I host the mp3 file so it’s visible to the smartthings app?
I’m using the @rboy apps but it’s a general question.
Dropbox, Google Drive, or a personal web server are popular options.
Just make sure you have a link directly to the raw file. Many of the online hosting services link you to a webpage with a preview of the file.
Dropbox
On Dropbox you’ll want the URL to have ?dl=1 at the end. For example:
https://www.dropbox.com/s/yzlcva03b6dquxy/Alien_Siren-KevanGC-610357990.mp3?dl=1
Google Drive
For Google Drive it’s a bit more complicated, but there are a bunch of sites online that will convert the URL for you. (eg. https://www.gdirect.link/)
When you get the shareable URL, it will be in the following format where XXXXX is the document ID:
https://drive.google.com/file/d/XXXXXX/view?usp=sharing
It needs to be in the format:
https://drive.google.com/uc?export=download&id=XXXXXX
Wow thanks so much, you opened up a whole new world for me.
This worked great.
Can you make a folder of MP3s visible or does it only work for individual MP3 files?
What’s the context?
The most common use case for hosted MP3 files is for use with the playTrack() command that media / music devices like Sonos accept. These typically accept a single file. Depending on the device, you might be able to host a playlist (eg. M3U file) along with the MP3 files and then send the playlist to your device.
@joshua_lyon, I still have a concern that the new Sonos integration’s playTrack is not really for music playing, but for notifications only. The preset control would be for controlling the Sonos’ favorites. Where you could define your favorite radio station, Spotify song/?album?, or maybe even local network media. (I haven’t played that much with the Sonos app yet to have enough experience with it.) Have you managed to make the presets working with sharptools.io?
Yes. The playPreset() command can be used to play a preset based on the ID listed in the presets attribute. This could be a radio station, Spotify playlist, etc. as you alluded to. ![]()
The original poster asked where they could host MP3s for use with RBoy’s app and I assume it’s likely for using an audio file as some sort of notification.
To your point about Sonos and playTrack(), my understanding is SmartThings is using the new Audio Clip capabilities of Sonos which are designed for audio clips / notifications / TTS files.
That’s part of the reason I was trying to understand what the context of @dman97’s question including what device he was working with and what he was trying to do with the folder of MP3s. For example, playing an M3U playlist on something like Kodi would be a completely reasonable and supported approach. ![]()
To setup a music jukebox that I could play music throughout my house.
The OP’s idea the following:
I believe…
@joshua_lyon, the main reason why I was asking is this question came up recently in another topic.
Probably the [Sonos] presets are the solutions for some of these ideas to play locally hosted music with the new Sonos DH. And personally, I think the Sonos is just reducing the volume of the current track when using the playTrack option. ( I had similar experiences with the playTrackAndResume or playTrackAndRestore)
I spent about $40 and put my 8,000 mp3 files on a Raspberry Pi. Locally hosted without latency problems (generally).
With the update of Sonos to the S2 12.2, the URL options are not working for me. The google drive link plays but then I can’t stop it in Webcore but I can stop Amazon Prime playing with Webcore and nothing plays with my Dropbox URL (sharing is set to all). I’ve made the change to the URL with the =1 and used a google drive URL service to convert the link to play.
Any idea why I can’t either pause, stop, mute the google drive mp3 and
why the dropbox file won’t play at all.
Update: I was able to get the mp3 to play correctly by linking the audio to Sonos favorites via plex and assign the preset ID captured in the device’s IDE to webcore “play preset”.
Just an update for anyone coming across this, to add single audio file from Plex, choose from the Sonos app “Add song to my Sonos” for the song to appear in the device’s IDE preset.
first you go to drive and upload your song.
now click on three dot and than edit access private to public.
now copy the link.
now go on any direct link converter and paste your link there as a result you will got a link and that is your direct link now share your link to whom you want to download the file.