Sonos Notifications

Hello, I am having issues with playing an audio track, MP3, to my Sonos via Sharptools. I have the file stored in my DropBox account with, I think, sharing on. For some reason, I cannot get my Sonos to “PlayTrack” when using the link to the file from DropBox.

I am not sure at this point what I am doing wrong.

Any help is greatly appreciated. Thank you in advance.

@Ridyn_2007, have you made the file public accessible and using the right URL? You can find the detailed example in the post below or post your file URL so we can help test.

1 Like

@James, this was the missing link. The host name was the issue. It is working perfectly now.

My wife operates a home daycare, and we have a new baby. We tend to over sleep our alarm at least once a month. I have a number of motion sensors around my house. We need to be to work by 7;30am.

If our variable $DaycareIsOpen is set to “True”, and time is 6:45am and no motion has been detected on any of the motions sensors in the last 15 minutes, turn on the bedroom lights and play an alarm on our bedroom Sonos.

I have all figured out accept Sonos “PlayTrack” until now that is. THANK MUCH!!

1 Like

EDIT: It was the file type. Sonos can’t play some .wav files. :man_facepalming:

@James am I missing something. I have followed everything above but my Sonos refuses to play the file.


Do you know how you can run a specific radio station on Sonos via SharpTools?

or how to play a specific PlayList on sonos?

Once you save something to your Sonos favorites, you should be able to use the playPreset() command with the numeric ID of the favorite/preset (eg. 0, 1, 2, etc) (example)

@josh, I am thinking that triggering the playback of a preset may work in place with the issue I posted above. (Cannot stop playback if a track from Dropbox)

I cannot seem to get the “playPreset()” command to work. The logs for the rule I have shows no failures/errors. I attached two screenshots to show the favorites in Smartthings, and the very basic rule in SharpTools. Is the first item on the favorites list, “0”? Or “1”?

Any ideas?

In my case, they started at 0.

You can view the device details in SharpTools to see what the ‘id’ of the favorite item is. Since the presets attribute isn’t used by dashboards, it won’t have an event subscription setup, so you might want to reauthorize your SmartThings connection first to sync over the latest data.

Once that’s done, you can:

  1. Open your User Page
  2. Tap the ... next to the location in question
  3. Scroll down and tap on the device in question
  4. Review the ‘presets’ field to see what the IDs map to

Is anyone else having issues with the Sonos action failing to launch?

Which action are you referring to? It would help to better understand the specific action that isn’t working as expected and what the context is.

Playtrack just stopped working.

Is this using the MP3 from Dropbox you mentioned above? I’m assuming the rule logs look like the command is going through fine and you are otherwise able to control the Sonos device?

So I have worked out my first issue, new modem/wifi didn’t like to play with my mesh network and the Sonos. However when it does play the mp3 it plays it twice. Very weird, I made a completely different rule to make sure something wasn’t acting up in it and I verified that the mp3 isn’t looped.