Sonos playTrack API not working


(Arindam Ghosh) #1

I created a simple safe box open/close smart app, connected with sonos player. 2 weeks before sonos was able to play a specific song from my tomcat server. But suddenly from yesterday it is not working.

I am using sonos.playTrack(“http://192.168.1.115:8080/upload/safeopen.mp3”); URL is working fine and also sonos.play() working. But only sonos.playTrack() seems not working. Is anybody has similar issue or can anybody give some idea to me?


(Eric) #2

never has worked for me. It will only play whatever I set it to play via the Sonos app. Been that way for me a very very long time.


(Arindam Ghosh) #3

hmmm. for me it was working till yesterday.


(Kris Schaller) #4

Hey @Arindam_Ghosh,

@Aaron brought this issue to my attention. Unfortunately, I know Sonos’ API is very unreliable, which is probably why your experiencing these issues. Can you try passing in a Map<uri, metaData> into the method playTrack()? The metadata can be left as an empty string.

Thanks,
Kris


(Arindam Ghosh) #5

Hi Kris,

Thanks for the info. Its working now. No issue right now.


(Kris Schaller) #6

Glad to hear it’s up and working! Hopefully it stays that way. :slight_smile: