Open paulwakeford opened 9 years ago
Would it be possible for you to capture the full device description?
Based on urn:schemas-upnp-org:device:MediaRenderer:1
it's decided if a device is a speaker or accessory but I don't see that node in your output.
Ah, the editor here mangled the xml. I'll attach it here. BOOST-device_description.xml.txt
For reference:
<?xml version="1.0" encoding="utf-8" ?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:ZonePlayer:1</deviceType>
<friendlyName>192.168.1.2 - Sonos BOOST</friendlyName>
<manufacturer>Sonos, Inc.</manufacturer>
<manufacturerURL>http://www.sonos.com</manufacturerURL>
<modelNumber>BR200</modelNumber>
<modelDescription>Sonos BOOST</modelDescription>
<modelName>Sonos BOOST</modelName>
<modelURL>http://www.sonos.com/store/products/BR200</modelURL>
<softwareVersion>31.3-22220</softwareVersion>
<hardwareVersion>1.12.1.2-2</hardwareVersion>
<serialNum>redacted</serialNum>
<UDN>redacted</UDN>
<iconList>
<icon>
<id>0</id>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/img/icon-BR200.png</url>
</icon>
</iconList>
<minCompatibleVersion>29.0-00000</minCompatibleVersion>
<legacyCompatibleVersion>24.0-00000</legacyCompatibleVersion>
<displayVersion>6.0</displayVersion>
<extraVersion></extraVersion>
<roomName>BOOST</roomName>
<displayName>BOOST</displayName>
<zoneType>11</zoneType>
<feature1>0x00000000</feature1>
<feature2>0x00008173</feature2>
<feature3>0x00030000</feature3>
<internalSpeakerSize>-1</internalSpeakerSize>
<memory>64</memory>
<flash>16</flash>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:DeviceProperties:1</serviceType>
<serviceId>urn:upnp-org:serviceId:DeviceProperties</serviceId>
<controlURL>/DeviceProperties/Control</controlURL>
<eventSubURL>/DeviceProperties/Event</eventSubURL>
<SCPDURL>/xml/DeviceProperties1.xml</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:SystemProperties:1</serviceType>
<serviceId>urn:upnp-org:serviceId:SystemProperties</serviceId>
<controlURL>/SystemProperties/Control</controlURL>
<eventSubURL>/SystemProperties/Event</eventSubURL>
<SCPDURL>/xml/SystemProperties1.xml</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ZoneGroupTopology:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ZoneGroupTopology</serviceId>
<controlURL>/ZoneGroupTopology/Control</controlURL>
<eventSubURL>/ZoneGroupTopology/Event</eventSubURL>
<SCPDURL>/xml/ZoneGroupTopology1.xml</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:GroupManagement:1</serviceType>
<serviceId>urn:upnp-org:serviceId:GroupManagement</serviceId>
<controlURL>/GroupManagement/Control</controlURL>
<eventSubURL>/GroupManagement/Event</eventSubURL>
<SCPDURL>/xml/GroupManagement1.xml</SCPDURL>
</service>
</serviceList>
<deviceList>
</deviceList>
</device>
</root>
and indeed it's lacking MediaRenderer
; I don't have such a device myself but I'll try to have a look at the issue.
The issue with identifying this problem seem to be that the version we get from rubygems differ from the version here at GitHub.
In the version we get from RubyGems, simply adding the BR200 to accessory.rb solves this problem. Whereas the version on git doesn't have this list of accessories.
MODELS = {
:'CR100' => 'CR100', # Released Jan 2005
:'CR200' => 'CONTROL', # Released Jul 2009
:'WD100' => 'DOCK',
:'ZB100' => 'BRIDGE', # Released Oct 2007
:'BR200' => 'BOOST'
}.freeze
There is also a noticeable difference in the base.rb
# TODO: Clean up
if Accessory.models.keys.include?(model_number.to_sym)
Accessory.new(ip, data)
elsif Speaker.models.keys.include?(model_number.to_sym)
Speaker.new(ip, data)
else
raise ArgumentError.new("#{data[:model_number]} not supported")
end
end
Or you could specify in your gemfile to use the version on github instead.
FYI - BR200 is the Boost.
sonos devices /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/device/base.rb:21:in'
detect': BR200 not supported (ArgumentError) from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/topology_node.rb:18:in
device' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/system.rb:76:incollect' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/system.rb:76:in
rescan' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/system.rb:12:ininitialize' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/cli.rb:94:in
new' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/cli.rb:94:insystem' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/lib/sonos/cli.rb:8:in
devices' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:indispatch' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start' from /Library/Ruby/Gems/2.0.0/gems/sonos-0.3.6/bin/sonos:7:in<top (required)>' from /usr/bin/sonos:23:in
load' from /usr/bin/sonos:23:in `I had a quick look and can't really see why - it should be detected as an Accessory.
DeviceDescription: