vmichalak / sonos-controller

Java API for controlling SONOS players
MIT License
43 stars 9 forks source link

Check to change "/status/zp" by "/device_description.xml" if possible #23

Open vmichalak opened 7 years ago

vmichalak commented 7 years ago

According to slack discussion with @mguntli, it seems possible to replace call to "/status/zp" by "/device_description.xml" which is in UPnP specification.

mguntli commented 7 years ago

http://sonos-ip:1400/xml/device_description.xml

`<?xml version="1.0" encoding="utf-8" ?>

1 0 urn:schemas-upnp-org:device:ZonePlayer:1 192.168.0.30 - Sonos PLAY:1 Sonos, Inc. http://www.sonos.com S1 Sonos PLAY:1 Sonos PLAY:1 http://www.sonos.com/products/zoneplayers/S1 38.9-46070 1.8.3.7-2 B8-E9-37-84-A4-82:5 uuid:RINCON_B8E93784A48201400 0 image/png 48 48 24 /img/icon-S1.png 37.10-00000 25.0-00000 1.0.0 1.0.0 8.1 OTP: Wohnzimmer PLAY:1 9 0x00000000 0x00403332 0x0001000e 0 5 75.000 6.000 128 64 10 0 urn:schemas-upnp-org:service:AlarmClock:1 urn:upnp-org:serviceId:AlarmClock /AlarmClock/Control /AlarmClock/Event /xml/AlarmClock1.xml urn:schemas-upnp-org:service:MusicServices:1 urn:upnp-org:serviceId:MusicServices /MusicServices/Control /MusicServices/Event /xml/MusicServices1.xml urn:schemas-upnp-org:service:DeviceProperties:1 urn:upnp-org:serviceId:DeviceProperties /DeviceProperties/Control /DeviceProperties/Event /xml/DeviceProperties1.xml urn:schemas-upnp-org:service:SystemProperties:1 urn:upnp-org:serviceId:SystemProperties /SystemProperties/Control /SystemProperties/Event /xml/SystemProperties1.xml urn:schemas-upnp-org:service:ZoneGroupTopology:1 urn:upnp-org:serviceId:ZoneGroupTopology /ZoneGroupTopology/Control /ZoneGroupTopology/Event /xml/ZoneGroupTopology1.xml urn:schemas-upnp-org:service:GroupManagement:1 urn:upnp-org:serviceId:GroupManagement /GroupManagement/Control /GroupManagement/Event /xml/GroupManagement1.xml urn:schemas-tencent-com:service:QPlay:1 urn:tencent-com:serviceId:QPlay /QPlay/Control /QPlay/Event /xml/QPlay1.xml urn:schemas-upnp-org:device:MediaServer:1 192.168.0.30 - Sonos PLAY:1 Media Server Sonos, Inc. http://www.sonos.com S1 Sonos PLAY:1 Media Server Sonos PLAY:1 http://www.sonos.com/products/zoneplayers/S1 uuid:RINCON_B8E93784A48201400_MS urn:schemas-upnp-org:service:ContentDirectory:1 urn:upnp-org:serviceId:ContentDirectory /MediaServer/ContentDirectory/Control /MediaServer/ContentDirectory/Event /xml/ContentDirectory1.xml urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager /MediaServer/ConnectionManager/Control /MediaServer/ConnectionManager/Event /xml/ConnectionManager1.xml urn:schemas-upnp-org:device:MediaRenderer:1 Wohnzimmer - Sonos PLAY:1 Media Renderer Sonos, Inc. http://www.sonos.com S1 Sonos PLAY:1 Media Renderer Sonos PLAY:1 http://www.sonos.com/products/zoneplayers/S1 uuid:RINCON_B8E93784A48201400_MR urn:schemas-upnp-org:service:RenderingControl:1 urn:upnp-org:serviceId:RenderingControl /MediaRenderer/RenderingControl/Control /MediaRenderer/RenderingControl/Event /xml/RenderingControl1.xml urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager /MediaRenderer/ConnectionManager/Control /MediaRenderer/ConnectionManager/Event /xml/ConnectionManager1.xml urn:schemas-upnp-org:service:AVTransport:1 urn:upnp-org:serviceId:AVTransport /MediaRenderer/AVTransport/Control /MediaRenderer/AVTransport/Event /xml/AVTransport1.xml urn:schemas-sonos-com:service:Queue:1 urn:sonos-com:serviceId:Queue /MediaRenderer/Queue/Control /MediaRenderer/Queue/Event /xml/Queue1.xml urn:schemas-upnp-org:service:GroupRenderingControl:1 urn:upnp-org:serviceId:GroupRenderingControl /MediaRenderer/GroupRenderingControl/Control /MediaRenderer/GroupRenderingControl/Event /xml/GroupRenderingControl1.xml urn:rhapsody-real-com:device-id-1-0:sonos_1:RINCON_B8E93784A48201400 QPlay:2 image/png 48 48 24 /img/icon-S1.png

`

vmichalak commented 7 years ago

Some informations are not on the device_description.xml for the moment (like SoftwareDate, CustomerID, Network Mask, etc...) i think it's better to stay on /status/zp as long as it works.