pascalopitz / unoffical-sonos-controller-for-linux

An Electron based linux app for controlling your sonos system.
http://pascalopitz.github.io/unoffical-sonos-controller-for-linux/
MIT License
558 stars 50 forks source link

Configured services are missing from the Source list #167

Closed mml closed 2 years ago

mml commented 2 years ago

When running on Linux, I don't see any of my services.

foo

Viewing the same system from the Mac client, I see them (see below). FWIW, I had to manually enter my IP addresses. Are there some logs I should be looking at or including?

Screen Shot 2021-12-16 at 2 57 41 PM
pascalopitz commented 2 years ago

Yes. Toggle the dev tools and inspect the requests and any console errors. he relevant line in code to load services is: https://github.com/pascalopitz/unoffical-sonos-controller-for-linux/blob/84db1529aa892f34b6c727c13df260349a8ceb42/src/ui/reduxActions/BrowserListActions.js#L55

To illustrate how this all hangs together, below a few screenshots ...

The logos come from a presentation map:

Screenshot from 2021-12-17 14-29-41

Services get listed via a UPNP call:

Screenshot from 2021-12-17 14-27-35

Available services are a bunch of numbers:

Screenshot from 2021-12-17 14-28-40

mml commented 2 years ago

Thanks. I think I've found the issue, or at least an issue.

I have a Bridge in my network. A bridge doesn't have a zone and can't do playback. When the controller tries to fetch certain URLs from this device, it gets a 405.

This device is easy to detect because it returns a different result from /status/zp...

# This is a bridge
welwitschia:~% curl http://172.16.1.38:1400/status/zp
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?><ZPSupportInfo></ZPSupportInfo>

# This is a Connect.
welwitschia:~% curl http://172.16.1.40:1400/status/zp
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?><ZPSupportInfo><ZPInfo><ZoneName>Living Room</ZoneName><ZoneIcon>x-rincon-roomicon:living</ZoneIcon><Configuration>1</Configuration><LocalUID>RINCON_000E58A9B0A801400</LocalUID><SerialNumber>00-0E-58-A9-B0-A8:6</SerialNumber><SoftwareVersion>57.9-23290</SoftwareVersion><BuildType>release</BuildType><SWGen>1</SWGen><SoftwareDate>2021-11-30 14:18:18.211616</SoftwareDate><SoftwareScm>dfb565153</SoftwareScm><HHSwgenState>auto:1</HHSwgenState><MinCompatibleVersion>56.0-00000</MinCompatibleVersion><LegacyCompatibleVersion>56.0-00000</LegacyCompatibleVersion><HardwareVersion>1.16.5.5-1.0</HardwareVersion><DspVersion>0.25.3</DspVersion><HwFlags>0x30</HwFlags><HwFeatures>0x0</HwFeatures><Variant>0</Variant><GeneralFlags>0x1</GeneralFlags><IPAddress>172.16.1.40</IPAddress><MACAddress>00:0E:58:A9:B0:A8</MACAddress><Copyright>© 2003-2019, Sonos, Inc. All rights reserved.</Copyright><ExtraInfo>OTP: 1.1.1(1-16-5-zp90-0.8)</ExtraInfo><HTAudioInCode>0</HTAudioInCode><IdxTrk></IdxTrk><MDP2Ver>2</MDP2Ver><MDP3Ver>0</MDP3Ver><HouseholdControlID>Sonos_M5JcnCJea9oGi0AOkZRdhY82kK.w3u1aG0GVy0OU30SqhIf</HouseholdControlID></ZPInfo></ZPSupportInfo>

I'll see if I can come up with a patch. I think bencevans/node-sonos#515 is the same issue.

pascalopitz commented 2 years ago

I have made a change that should exclude bridges from the device list, so that they cannot be defaulted to as first match:

https://github.com/pascalopitz/unoffical-sonos-controller-for-linux/commit/88b092735d1c2cb6a70099f4d3a81aa8540b463a

I'll release it with the next alpha. Let me know how that goes