GithubHelp home page GithubHelp logo

Comments (4)

jishi avatar jishi commented on July 17, 2024

Thanks for identifying this issue. I find it weird that it would try and connect to your repeaters, mainly because there is already a check:

      if (response.indexOf(SONOS_PLAYER_UPNP_URN) === -1) {
        // Ignore false positive from badly-behaved non-Sonos device.
        return;
      }

Unless your routers are responding with a URN urn:schemas-upnp-org:device:ZonePlayer:1, they should not be considered plausible players. If they do, then the repeater in it self just mimics the response depending on the search query which is a very weird thing to do. It would be interesting to know what the actual response from your wifi repeaters are, it might be that the indexOf check is a bit too broad, and they send some non-standard headers that confuses it.

If you could add a console log or similar right after this line:

var response = buffer.toString('ascii');
console.log(response);

And identify the response you get from the wifi repeater, that would be super useful. Maybe we can find a more generic way of avoiding these kind of devices in the future.

from node-sonos-discovery.

mpark12345 avatar mpark12345 commented on July 17, 2024

Hello,

Here is the relevant part of the output...

info: scanning for players in ip 10.42.0.142
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=1800
ST: urn:schemas-upnp-org:device:ZonePlayer:1
USN: ::urn:schemas-upnp-org:device:ZonePlayer:1
EXT:
SERVER: SDK 4.1.2.0 UPnP/1.0 MiniUPnPd/1.6_MTK_v2_001
LOCATION: http://10.42.0.15:6352/InternetGatewayDevice.xml
OPT: "http://schemas.upnp.org/upnp/1/0/";
01-NLS: 1
BOOTID.UPNP.ORG: 1
CONFIGID.UPNP.ORG: 1337

HTTP/1.1 200 OK
CACHE-CONTROL: max-age=1800
ST: urn:schemas-upnp-org:device:ZonePlayer:1
USN: ::urn:schemas-upnp-org:device:ZonePlayer:1
EXT:
SERVER: SDK 4.1.2.0 UPnP/1.0 MiniUPnPd/1.6_MTK_v2_001
LOCATION: http://10.42.0.15:6352/InternetGatewayDevice.xml
OPT: "http://schemas.upnp.org/upnp/1/0/";
01-NLS: 1
BOOTID.UPNP.ORG: 1
CONFIGID.UPNP.ORG: 1337

Thanks.

from node-sonos-discovery.

jishi avatar jishi commented on July 17, 2024

My good, that is some ill behaving device you've got there. It should really be bug reported to linksys if possible. I have an RE2000 which doesn't suffer from this issue, on the other hand that one doesn't have airplay or similar. For a starter, it shouldn't even respond since we are explicitly searching for urn:schemas-upnp-org:device:ZonePlayer:1, but then to actually respond with the same ST header is completely bonkers. On the other hand, perhaps it is possible to disable the UPnP support in the repeater, if you're not using it.

What we could do, is either check for a HOUSEHOLD header, since that is proprietary to Sonos, or verify the SERVER header, since that would identify a Sonos device as well. However, the SERVER header might change in the future if we are unlucky, so the HOUSEHOLD identification might be better.

The only reason that this doesn't blow up for the Sonos controller in itself must be that the missing HOUSEHOLD header indicates that these devices are not part of the associated system.

from node-sonos-discovery.

jishi avatar jishi commented on July 17, 2024

Actually, there is a way to work around this today. If you speocify a household in the configuration, it would only respond to players containing the correct household ID. I tried to find the issue where we discussed this, but can't seem to find it.

Anyway, if you add:

{
  "household": "Sonos_xxxXXxXxxXXXxxXX"
}

in settings.json and replace that dummy ID with your actual household ID (you can find it in the diagnostics, http://192.168.1.154:1400/status/netsettings.txt replace IP with IP of one of your players), it should work for you.

from node-sonos-discovery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.