Play MP3 files on a bluetooth speaker

Is there a way to have the music player tile have MP3s saved on a pc play over a bluetooth speaker?

The Music Player tile is designed to work with any device from SmartThings or Hubitat that exposes the relevant Music Player capability.

If I remember correctly, you are on SmartThings, right?

Your computer/bluetooth speaker would have to be exposed as a device in SmartThings first… and considering that bluetooth speakers connect over bluetooth, you can’t connect it directly to SmartThings (unless it also has Wifi built-in!). Depending on how badly you want to achieve this, there are some Rube Goldberg (read: hacked together) approaches that could make this work.

At that point, you might be better off just getting a speaker which works natively with SmartThings though. :smiley:

Yes I am on smarthings. My speaker does not have wifi so I guess I will need to look into a different speaker. Thanks for your input.

A dedicated device which is capable of the task would be preferred, but there are ways to accomplish it if you don’t mind stringing together things.

Do you have an Android device you could dedicate to the task? If so, you could probably accomplish it with a mix of Tasker and the SharpTools Tasker plugins.

Alternatively, if you really wanted to do it with a PC, it could probably be done with a PC and EventGhost. I haven’t personally used EventGhost in a number of years, but it looks like there’s a community developed SmartThings app to help with the integration.

I do have an android task I could dedicate. Are there some instructions you could point me to so I can try it?

Thanks,

Have you used Tasker before? I don’t know of any instructions for this specific (somewhat niche) case, but I have no doubt it can be done with Tasker. :grinning:

No I have not used tasker before. I will play around with it to see if I can figure it out.

The way I see it is there are two components to this:

  1. Get Tasker to play the desired clips on your Bluetooth speakers
  2. Get SharpTools to trigger the Tasker profile in #1

The /r/Tasker subreddit is a great resource for learning more about Tasker and is an especially good place to ask questions and get help. For the SharpTools Tasker plugins, this community is a great place to ask questions and I’m happy to help with that side of things.

For the Tasker side of things, as long as you keep the bluetooth speaker connected to your Android device all the time, I think you could accomplish it with a Media > Music Play action.

I would try to get the Tasker side of things working to play the music file first and manually run that task to make sure it’s working. Once you get that side of things working, then I would proceed forward with integrating it with SmartThings using the Thing State event plugin from SharpTools. You can find more details on how to use the Thing State event plugin in the following help article.

One approach would be to setup a Virtual Switch in SmartThings and then use the on/off events from that switch to trigger the actions in Tasker (via the SharpTools Thing State plugin). Based on that, you’d likely want to filter the Thing State events with an IF statement of %st_attr_value ~ on as noted in the following article so the action only runs when the switch is flipped on:

From there, you could use the virtual switch in SharpTools dashboards, automations, rules, etc.

1 Like

I sidelined this task for a while, but now I am ready to get working on it again. I have decided not to use bluetooth speakers since I found you can group google home devices as speakers. Here are my questions now:

  1. The google home devices show up individually in smartthings and sharptools. Is there a way to get the speaker group to show up.

  2. I can put my mp3s on Google play music, is there a way to get the media tile to get the music from there when I hit play?

  3. I also have a raspberry pi server setup with cast-web is there a way to get sharptools and cast-web to work together?

@Derek_C thanks for the update. What Google Home device integration are you using with SmartThings?

  1. You’ll want to check with the developer of the device handler as they’ll have to expose the speaker group as a device. If they can expose the speaker group as a device with a supported capability, then you should be able to authorize it in SharpTools.

  2. Is this referring to using a Music Player Tile in the SharpTools.io dashboards? What device are you trying to play the music on? If the device handler exposes a command that lets you play music from the internet, then you could use a SharpTools Rule to run that command from a dashboard as shown in this thread:

    Sending Custom Commands

  3. Yes, SharpTools rules can use any attribute or command that a supported device exposes. And SharpTools dashboards can display tiles for any supported capability. Looking through the details over on the cast-web site, it looks like each cast device is exposed as a Thing in SmartThings, so you should be able to use them in both rules and dashboards.

    Do you already have cast-web integrated with SmartThings and the devices created? If so, have you tried authorizing them in SharpTools.io and using them?

@josh 1. I am using cast web to integrate the speakers. I will check with them on the exposing the group.

  1. Yes I am referring to the music player tile on sharptools.io dashboard. My dashboard is on a fire hd 8 and I want the music to play on one or preferably my group of google home minis.

  2. Yes I already have cast web installed. My speakers (google home minis) show up individually on my sharptools.io dashboard. I just do not know how to tell them where my mp3 are located to play them.

Looking through the cast-web topic on the SmartThings community and poking through the limited help articles they have, it looks like it’s possible to play publicly hosted MP3s and it sounds like if you put those into a playlist, you could play the playlist as well.

The cast-web topic in the SmartThings community is probably going to be the best place to ask questions about that device handler:

Once you know what commands to send the device, you can create a rule in the SharpTools Rule engine and then run that rule directly from your dashboard similar to this thread:

Sending Custom Commands

I don’t have the SmartApp/device installed, but it sounds like they also have some concept of presets that might be useful to you:

1 Like

Thanks for the guidance. I will try it out and see if I can get it to work.

1 Like