How to create a request for titles and artist with Arduino

  • 27 November 2023
  • 8 replies
  • 144 views

Hello,
I like to know how it is possible to create a request for “Title” and “Artist” to Sonos API with my Arduino 1010 Wifi ESP32. The request should show “Title” and “Artist” which is playing actually on my Sonos (S2) Move.
Thank you for help.


This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

8 replies

Userlevel 7
Badge +18

Hi @Mondeo 

Welcome to the Sonos Community!

I would love to be able to assist you with this query, but I honestly don’t know. My replying here will get your post back onto the list of recently active threads, however, so hopefully that will prompt a reply from the community at large.

You may also find the API reference material helpful: https://devdocs.sonos.com/docs/smapi

I hope this helps.

Userlevel 7
Badge +23

Subscribe to the UPnP event on the AVTransport service on the device, then parse the xml the event will send you.

There are plenty of open source libs if you do not have your own UPnP stack to hand.

@controlav 

Thank you very much for your answer. Maybe you could give me a little more details about.
Kind regards,
Urs

Userlevel 7
Badge +23

@controlav

Thank you very much for your answer. Maybe you could give me a little more details about.
Kind regards,
Urs

UPnP specification for AVTransport1:

http://www.upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf

Look for LastChange, that is the event that includes all the info you need.

@controlav 

Thank you very much. To get the mentioned information I have to subscrbe with: openconnectivity.org.
Is this correct?
Kind regards,
Urs

Userlevel 7
Badge +23

@controlav 

Thank you very much. To get the mentioned information I have to subscrbe with: openconnectivity.org.
Is this correct?
Kind regards,
Urs

Sorry I don’t understand the question.

I recommend you find an open source Sonos project in the programming language of your choice that you can run on your hardware, if you don’t want to write your own UPnP stack.

@controlav 

Thank you very much for your recommentation. I have sent a request to openconnectivity.org to get a individual member.
Kind regards,

Urs

Userlevel 7
Badge +23

@controlav

Thank you very much for your recommentation. I have sent a request to openconnectivity.org to get a individual member.
Kind regards,

Urs

Seems unnecessary unless you are creating a UPnP device but whatever.