This has been bit of an issue for me as I could not work out what you needed to enter in the ‘Track URI’ field in order to play specific music. In my case some classical piano music when going into the bathroom and motion is detected… I’ve set myself up there for a joke there haven’t I!
Anyway, I had no problem with playing what was currently being played but to select a chosen track, playlist or radio station I could not find out how to do it.
I have now, at long last found a solution, so i’m going to share with you my method of getting this to work. Hopefully this will help somebody else having the same issues:-
a) Find out the IP Address of your Sonos player. I located this by accessing my router and viewing the list of connected devices.
b) Open your browser window and type in the following URL substituting the ###.###.###.### with your IP Address:-
c) The web page shown gives you information about what your Sonos is doing. Look down to where the text ‘AVT Play Log:’ is shown and directly below is a line of text starting with ‘currently:’ followed by current state e.g ‘PLAYING’. It is the remainder of the text in this row which is the track currently being played and needs to be copied into the ‘Track URI’ field.
d) Using your Sonos controller app select your desired track, radio station or playlist, copy the remainder of the text in this row and then paste into the Track URI field of your CoRE action - ‘Play track’.
There you go. I hope that helps someone.