Sonos speakers have an extensive local api which was not documented anywhere. In my other project sonos2mqtt I wanted to control everything on the Sonos speakers you could with the official application. So I decided it was time to parse the xml service documentation and write a custom client generator and a matching template to generate a Sonos client library that could do everything you can do with the original application.