Where to host mp3 so it's visible in St?

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
7 Likes

Wow thanks so much, you opened up a whole new world for me.
This worked great.

1 Like

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. :slight_smile:

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. :smiley:

1 Like

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)

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.