We have moved at community.getvera.com

Author Topic: Sonos bridge and more generally device_description.xml file  (Read 26182 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Sonos bridge and more generally device_description.xml file
« on: December 23, 2012, 06:53:28 am »
Can someone having a Sonos bridge check if the Sonos bridge is listed as a zone player when using the URL http://<ip>:1400/status/topology with <ip> the IP of one real Sonos zone.
If it is, is there a way to identify it ?

@guessed: note that in this report, we have the Coordinator and Group columns that could hep us for the group stuff.
« Last Edit: December 28, 2012, 12:34:54 pm by lolodomo »

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #1 on: December 23, 2012, 01:58:10 pm »
Hi @lolodomo

Yes it is, the Sonos Bridge is listed as a zone player.

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #2 on: December 24, 2012, 03:28:09 am »
Althought it does not have all the options under :1400/status/

Code: [Select]
Options

upnp
zl
topology
controllers
enetports
proc/net/arp
proc/interrupts
proc/net/snmp
jffs/localsettings.txt
tmp/upgrade.log
jffs/upgrade_tmp_prev.log
jffs/upgrade.log
jffs/upgrade_prev.log
jffs/lockup.anacapa.trace
jffs/lockup.dmesg
VERSION
etc/resolv.conf
proc/ath_rincon/status
tmp/wifi_card_mac_addr
opt/log/anacapa.trace
proc/ath_rincon/fullstatus
proc/ath_rincon/phyerr
proc/ath_rincon/nf
opt/log/hostapd.log
opt/log/netstartd.log
dmesg
ifconfig
route
ps
uptime
date
showstp
mount
df
showmacs
syssettings
securesettings

Do you want to see the device description?

http://x.x.x.x:1400/xml/device_description.xml

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos bridge
« Reply #3 on: December 24, 2012, 04:05:28 am »
In the XML file result of http://x.x.x.x:1400/xml/device_description.xml, I discovered one interesting thing: a relative link to the player icon. For example, in my case, I have "/img/icon-ZP120.png". To get the image, then you have to use this URL http://x.x.x.x:1400/img/icon-ZP120.png
That could be fun to display this image rather than the generic Sonos icon for the Vera device. Unfortunately, I think that the URL has to be fixed in the JSON file...

In this XML file, we have the tag "modelNumber". What value do you get for the Sonos bridge ?
« Last Edit: December 24, 2012, 04:10:14 am by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos bridge
« Reply #4 on: December 24, 2012, 04:15:24 am »
Could you check whether service urn:schemas-upnp-org:service:AudioIn:1 is listed in serviceList for a Play:3 ?

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #5 on: December 24, 2012, 04:35:07 am »
In the XML file result of http://x.x.x.x:1400/xml/device_description.xml, I discovered one interesting thing: a relative link to the player icon. For example, in my case, I have "/img/icon-ZP120.png". To get the image, then you have to use this URL http://x.x.x.x:1400/img/icon-ZP120.png
That could be fun to display this image rather than the generic Sonos icon for the Vera device. Unfortunately, I think that the URL has to be fixed in the JSON file...

I love that idea !! - You can always add the icons to the install package and then people can install them via the UI.

In this XML file, we have the tag "modelNumber". What value do you get for the Sonos bridge ?

I can't seem to see 'modelnumber' in the Bridge XML.?

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #6 on: December 24, 2012, 04:45:45 am »
Could you check whether service urn:schemas-upnp-org:service:AudioIn:1 is listed in serviceList for a Play:3 ?

Sorry, I only have a Play 5, Connect, Conet:AMP, Bridge & CR200 Controller.

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Sonos bridge
« Reply #7 on: December 24, 2012, 09:06:52 am »
Could you check whether service urn:schemas-upnp-org:service:AudioIn:1 is listed in serviceList for a Play:3 ?

Sorry, I only have a Play 5, Connect, Conet:AMP, Bridge & CR200 Controller.

This is everything I have for a play 3, am I in the right spot?

Code: [Select]

urn:micasaverde-com:serviceId:Sonos1
*SetURIToPlay (URIToPlay)
*PlayURI (URIToPlay)
*Say (Text,Language,Volume)
*SavePlaybackContext
*RestorePlaybackContext

urn:upnp-org:serviceId:AVTransport
*SetAVTransportURI (InstanceID,CurrentURI,CurrentURIMetaData)
*AddURIToQueue (InstanceID,EnqueuedURI,EnqueuedURIMetaData,DesiredFirstTrackNumberEnqueued,EnqueueAsNext)
AddMultipleURIsToQueue (InstanceID,UpdateID,NumberOfURIs,EnqueuedURIs,EnqueuedURIsMetaData,ContainerURI,ContainerMetaData,DesiredFirstTrackNumberEnqueued,EnqueueAsNext)
*ReorderTracksInQueue (InstanceID,StartingIndex,NumberOfTracks,InsertBefore,UpdateID)
*RemoveTrackFromQueue (InstanceID,ObjectID,UpdateID)
*RemoveTrackRangeFromQueue (InstanceID,UpdateID,StartingIndex,NumberOfTracks)
*RemoveAllTracksFromQueue (InstanceID)
*SaveQueue (InstanceID,Title,ObjectID)
*BackupQueue (InstanceID)
GetMediaInfo (InstanceID)
GetTransportInfo (InstanceID)
GetPositionInfo (InstanceID)
GetDeviceCapabilities (InstanceID)
GetTransportSettings (InstanceID)
GetCrossfadeMode (InstanceID)
*Stop (InstanceID)
*Play (InstanceID,Speed)
*Pause (InstanceID)
*Seek (InstanceID,Unit,Target)
*Next (InstanceID)
*NextProgrammedRadioTracks (InstanceID)
*Previous (InstanceID)
*NextSection (InstanceID)
*PreviousSection (InstanceID)
*SetPlayMode (InstanceID,NewPlayMode)
*SetCrossfadeMode (InstanceID,CrossfadeMode)
*NotifyDeletedURI (InstanceID,DeletedURI)
GetCurrentTransportActions (InstanceID)
*BecomeCoordinatorOfStandaloneGroup (InstanceID)
*BecomeGroupCoordinator (InstanceID,CurrentCoordinator,CurrentGroupID,OtherMembers,TransportSettings,CurrentURI,CurrentURIMetaData,SleepTimerState,AlarmState,StreamRestartState,CurrentQueueTrackList)
*BecomeGroupCoordinatorAndSource (InstanceID,CurrentCoordinator,CurrentGroupID,OtherMembers,CurrentURI,CurrentURIMetaData,SleepTimerState,AlarmState,StreamRestartState,CurrentAVTTrackList,CurrentQueueTrackList,CurrentSourceState,ResumePlayback)
*ChangeCoordinator (InstanceID,CurrentCoordinator,NewCoordinator,NewTransportSettings)
*ChangeTransportSettings (InstanceID,NewTransportSettings,CurrentAVTransportURI)
*ConfigureSleepTimer (InstanceID,NewSleepTimerDuration)
GetRemainingSleepTimerDuration (InstanceID)
*RunAlarm (InstanceID,AlarmID,LoggedStartTime,Duration,ProgramURI,ProgramMetaData,PlayMode,Volume,IncludeLinkedZones)
*StartAutoplay (InstanceID,ProgramURI,ProgramMetaData,Volume,IncludeLinkedZones,ResetVolumeAfter)
GetRunningAlarmProperties (InstanceID)
*SnoozeAlarm (InstanceID,Duration)

urn:upnp-org:serviceId:RenderingControl
GetMute (InstanceID,Channel)
*SetMute (InstanceID,Channel,DesiredMute)
*ResetBasicEQ (InstanceID)
*ResetExtEQ (InstanceID,EQType)
GetVolume (InstanceID,Channel)
*SetVolume (InstanceID,Channel,DesiredVolume)
*SetRelativeVolume (InstanceID,Channel,Adjustment)
GetVolumeDB (InstanceID,Channel)
*SetVolumeDB (InstanceID,Channel,DesiredVolume)
GetVolumeDBRange (InstanceID,Channel)
GetBass (InstanceID)
*SetBass (InstanceID,DesiredBass)
GetTreble (InstanceID)
*SetTreble (InstanceID,DesiredTreble)
GetEQ (InstanceID,EQType)
*SetEQ (InstanceID,EQType,DesiredValue)
GetLoudness (InstanceID,Channel)
*SetLoudness (InstanceID,Channel,DesiredLoudness)
GetSupportsOutputFixed (InstanceID)
GetOutputFixed (InstanceID)
*SetOutputFixed (InstanceID,DesiredFixed)
GetHeadphoneConnected (InstanceID)
*RampToVolume (InstanceID,Channel,RampType,DesiredVolume,ResetVolumeAfter,ProgramURI)
*RestoreVolumePriorToRamp (InstanceID,Channel)
*SetChannelMap (InstanceID,ChannelMap)

urn:micasaverde-com:serviceId:Volume1
*Down
*Mute
*Up

urn:micasaverde-com:serviceId:MediaNavigation1
ChapterDown
ChapterUp
DiskDown
DiskUp
FastForward
*Pause
*Play
QuickSkip
Rewind
*SkipDown
*SkipUp
Slow
*Stop

urn:micasaverde-com:serviceId:HaDevice1
Reconfigure
StressTest
Remove
*Poll
*ToggleState
SetPollFrequency (PollingEnabled,PollMinDelay)

urn:sonos-com:serviceId:Sonos1

urn:schemas-micasaverde-com:device:avmisc:1

urn:upnp-org:serviceId:DeviceProperties

urn:upnp-org:serviceId:ContentDirectory

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos bridge
« Reply #8 on: December 27, 2012, 07:24:09 am »
Could you check whether service urn:schemas-upnp-org:service:AudioIn:1 is listed in serviceList for a Play:3 ?

Sorry, I only have a Play 5, Connect, Conet:AMP, Bridge & CR200 Controller.

This is everything I have for a play 3, am I in the right spot?

No. We are taliling about the XML file result of this command: http://x.x.x.x:1400/xml/device_description.xml (replacing x.x.x.x by the IP address of your Sonos)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos bridge
« Reply #9 on: December 27, 2012, 07:28:10 am »
In the XML file result of http://x.x.x.x:1400/xml/device_description.xml, I discovered one interesting thing: a relative link to the player icon. For example, in my case, I have "/img/icon-ZP120.png". To get the image, then you have to use this URL http://x.x.x.x:1400/img/icon-ZP120.png
That could be fun to display this image rather than the generic Sonos icon for the Vera device. Unfortunately, I think that the URL has to be fixed in the JSON file...

I love that idea !! - You can always add the icons to the install package and then people can install them via the UI.

The idea would be to join the different icons and then to use a capability of the json UI file to select the good icon depending on a value that will be set by the plugin depending on the model number.
I have already discovered 2 icons:
icon-ZP120.png
icon-ZP90.png
Can you check the icon file name for your different Sonos with the corresponding tag "modelNumber" please ?
As the URL depends on the IP address of the Sonos unit, unfortunately I don't think we can get the icon directly from the Sonos. We will need to store the different icons in the Vera.
http://wiki.micasaverde.com/index.php/Luup_plugin_icons

Quote
In this XML file, we have the tag "modelNumber". What value do you get for the Sonos bridge ?

I can't seem to see 'modelnumber' in the Bridge XML.?

Can you provide the XML file for the bridge ?
« Last Edit: December 27, 2012, 07:34:50 am by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos bridge
« Reply #10 on: December 27, 2012, 07:43:15 am »
http://wiki.micasaverde.com/index.php/Luup_plugin_icons

The number of icons is limited to 5. Hopefully, that is enough for Play:3, Play:5, Connect and Connect:Amp.
My idea is to add these files:
Sonos.png the default Sonos icon
Sonos_0.png for Play:3
Sonos_1.png for Play:5
Sonos_2.png for Connect
Sonos_3.png for Connect:Amp
One variable will be created and set to 0 or 1 or 2 or 3 depending on the model found in the XML file. Then the icon on the Vera device will be automatically adjusted.
I try that later today.
« Last Edit: December 27, 2012, 07:46:06 am by lolodomo »

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #11 on: December 27, 2012, 03:09:52 pm »
@lolodomo

Does this help

Play5 =  /img/icon-S5.png
Bridge = /img/icon-ZB100.png

Taken from - http://x.x.x.x:1400/xml/device_description.xml
« Last Edit: December 27, 2012, 03:49:11 pm by parkerc »

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #12 on: December 27, 2012, 04:09:19 pm »
I don't think we can get the icon directly from the Sonos. We will need to store the different icons in the Vera.
http://wiki.micasaverde.com/index.php/Luup_plugin_icons

As this returns the icon of the Sonos, (http://192.168.x.x:1400/img/icon-ZB100.png) can the .json dynamically look to that address ? Can the flash icon url address be calculated by a variable stored in the UI of the device e.g. the Sonos plugin also stores the /img/icon-xxxx.png location?
« Last Edit: December 27, 2012, 04:13:18 pm by parkerc »

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: Sonos bridge
« Reply #13 on: December 27, 2012, 04:18:58 pm »
Hello,

I would dare to suggest Play 3 follows the same precedence... I have added the two icons for the bridge and Play 5.

Code: [Select]
<modelNumber>S5</modelNumber>
<url>/img/icon-S5.png</url>


Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos bridge
« Reply #14 on: December 27, 2012, 04:38:02 pm »
I would dare to suggest Play 3 follows the same precedence... I have added the two icons for the bridge and Play 5.

Code: [Select]
<modelNumber>S5</modelNumber>
<url>/img/icon-S5.png</url>

As S5 was the original name of that unit, before they changed it to Play5,  my money is on the Play3 being either /icon-p3.png or /icon-play3.png. ;) - place your bets..