[BETA] - MP3 Event Player - Using Sonos Speakers

What is the trigger you are using?


I think I’ve found the issue and fixed it (I thought I’d fixed this one before)

New version 1.2.3 uploaded to GitHub if you’d like to try it?

Please let me know how you,get on


That was fast! I will give it a whirl!

Seems to work now! Thank you. The only other concern I have is the volume setting doesn’t seem to set the volume of the Sonos speaker correct?. I think it is changing the volume being sent to sonos not the volume of the actual sonos amp. I have my setting in your app at 90, because my speakers are usually around 50%. My wife turned music down using the sonos app, and after the music was shut off, the announcement volume was reduced as well.

Not saying this is a problem, just want to confirm this is the intended behavior.

Unfortunately , hubitat does not have any control over the amplifier, only the speakers.
I would think that the amp would always override the speaker settings.
I don’t have a sonos amp to test with (unless you’d like to buy me one :slight_smile: ) but the volume to the speakers is set just before it sends the mp3.
If you turn on the logging you should see a method ‘setVolume()’ called just before the mp3 is played, this method also sets the ‘quiet time’ volume settings if configured

I can only think that the amp is resetting them to the lower volume.

Not sure what we could do about this.


I've tried this by uploading an mp3 file to my RPi. Doesn't work.
Tried this:-
http://hubitat.xurria.co.uk/mp3/ (with or without the last / )

This doesn't work either.
Can you confirm for me that the testfile should work.
If so, it's something to do with my Sonos setup.

It works to load from a web browser?

It doesn’t require the trailing / as this is added by the app.

I’ve just tested the testfile.mp3 and it doesn’t seem to work for me either.
However; I tried a couple of other files (on a local webserver) and they are working perfectly, so I suspect it’s something with the hosting.

It’s a bit late here in the UK to start looking tonight but I’ll have a look at this in the morning.


1st thing I tried.
It may be something to do with the dns redirection (had the same problem once before)

Did you install as suggested in the 1st post?
I understand the testfile not playing but local webhosted files should be ok

I assume that your local RPi is a webserver?

“This is a Parent/Child app setup so you need to install both bits of code for this to work.
I suggest you install both parts and then ‘Load New app’ (for just the parent) then save it before creating any new events (which will use the child to create new apps within the parent)”


I found a typo in the code relating to the enable/disable switch (if you didn't use it, it would fail - I always use it so I didn't find it before)
Fixed now!
Please download again and it should work for you


Excellent stuff.
Test file now working for me.
Time to play! ¡!!!

1 Like

Glad it's working - Thanks for finding the bug :slight_smile:

When I click on the GitHub Link in the original post it says oops the webpage is missing. Is there a reason its gone @Cobra? I am esperatly trying to figure out how to get an mp3 to play a sound to announce a door opening. Any suggestions? I would like to use my GH mini's but I also have a Samsung R1. I don't have the background to write my own code so any help would be much appreciated! Thanks!

I believe Message Central has replaced this.

I can't believe I didn't stumble upon this on my own. I have been on the forum reading everything I have seen for days now. Thank you so much for your help!

1 Like

No worries! You might want to also bookmark @Cobra's website, http://hubitat.uk. :slight_smile:

I just bookmarked his apps container for the list of apps he's created. I didn't even know about his site. I think my life just got a lot easier! Thanks again!


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.