Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

installed but can't find Sonos on network #125

Closed
jweinstein opened this issue Mar 9, 2015 · 14 comments
Closed

installed but can't find Sonos on network #125

jweinstein opened this issue Mar 9, 2015 · 14 comments

Comments

@jweinstein
Copy link

Hi, great project idea! Thank you for working on it.

I've installed airsonos on my Mac (node -v = v0.12.0) and it attempts "Searching for Sonos devices on network..." but nothing happens.

I am on the same network as my Sonos playbar and play:3. My Mac Sonos app can see/control the system just fine.

Ideas?

@philippgregor
Copy link

As discussed in some other issues, airsonos might not work an v0.12.0.

Try out to install a lower version, especially a v0.10.X (I run 0.10.36 myself, which is working perfectly)

Here's a guide how to switch to another node version:

image

@jweinstein
Copy link
Author

Thanks @philippgregor.

When I get to step: sudo n use 0.10.36 /usr/local/bin/airsonos I get the follow error. Any ideas? :(

sudo n use 0.10.36 /usr/local/bin/airsonos
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
Referenced from: /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build/Release/dns_sd_bindings.node
Expected in: dynamic lookup

dyld: Symbol not found: _node_module_register
Referenced from: /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build/Release/dns_sd_bindings.node
Expected in: dynamic lookup

/usr/local/bin/n: line 442: 11896 Trace/BPT trap: 5 $bin "$@"

@philippgregor
Copy link

Hm, I'm really not an expert on this...;)

The installation process went well or have there been some error messages? I installed http://blog.nodejs.org/2015/01/26/node-v0-10-36-stable/ (Macintosh Installer) before I went through the installation process but I had the feeling, that I didnt need to. Maybe I was wrong...Try to install the package and then go through the process described above once again. If it still won't be working I really don't know what else could fix the issue you have. I'm sorry :-(

@ktec
Copy link

ktec commented Mar 10, 2015

I get the same issue as described here and with a small limited amount of debugging, I can confirm the code stops at:

sonos.LogicalDevice.search(function(err, groups) {
console.log('hello world...');

my "hello world" never gets called, so this LogicalDevice.search method is never coming back with anything. Not sure how to debug node stuff, but can do any tests with some guidance if you want me to help resolve this. I'm running Yosemite 10.10.2, with node version v0.10.31.

@philippgregor
Copy link

As I said, I really don't have any idea how to solve problems, which haven't already
been subject of open issues. Really sorry :-(

@stephen
Copy link
Owner

stephen commented Mar 14, 2015

@jweinstein -
You'll need to rebuild AirSonos after installing 0.10.36, because you're attempting to run the v0.12.0 build with the 0.10.36 binary.

Should be something like...

sudo n 0.10.36
sudo npm install -g airsonos
sudo n 0.12.0
n use 0.10.36 /usr/local/bin/airsonos

@stephen stephen closed this as completed Mar 14, 2015
@ktec
Copy link

ktec commented Mar 14, 2015

Hi Stephen,
I just tried all this and i'm still stuck at the "Searching for Sonos devices on network..." line. I'm happy to try and debug if you can direct me.

@ktec
Copy link

ktec commented Mar 14, 2015

[globalkeith] ~ % node --version
v0.10.36
[globalkeith] ~ % npm --version
1.4.28
[globalkeith] ~ % airsonos --version
0.1.1
[globalkeith] ~ % n --version
1.2.14

@jweinstein
Copy link
Author

Thanks @stephen, I followed your new instructions and get stuck at the same Searching for Sonos devices on network... spot as @ktec.

Here's my debug info.

$ node --version v0.12.0
$ npm --version 2.5.1
$ airsonos --version /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/dns_sd.js:35 throw ex; ^ Error: Module did not self-register. at Error (native) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/dns_sd.js:24:20) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12)
$ n --version 1.2.14

Ideas? Thanks for your help.

@ktec
Copy link

ktec commented Mar 17, 2015

Hi @stephen, do you have any suggestions for us? I'm happy to try and debug if you can provide direction, but I've got airsonos installed, and it simply wont find my Sonos device on the network. The Sonos app works fine btw...

@guicane
Copy link

guicane commented Jul 1, 2015

Hi guys, I'm stuck on the same situation, did you find any solution? This hasn't been updated since March...

Thank you!

@ktec
Copy link

ktec commented Aug 9, 2015

I've install a fresh copy again today and still getting this issue. The "workaround" is to search your drive for the PLAYER_SEARCH, this worked for me:

$ grep -r PLAYER_SEARCH /usr/local/lib/node_modules/
/usr/local/lib/node_modules//airsonos/node_modules/sonos/lib/sonos.js:  var PLAYER_SEARCH = new Buffer(['M-SEARCH * HTTP/1.1',
/usr/local/lib/node_modules//airsonos/node_modules/sonos/lib/sonos.js:    _this.socket.send(PLAYER_SEARCH, 0, PLAYER_SEARCH.length, 1900, '239.255.255.250');

We then need to update the socket.send method to the broadcast address for your network, mine was 192.168.0.255

$ vim /usr/local/lib/node_modules//airsonos/node_modules/sonos/lib/sonos.js
...
_this.socket.send(PLAYER_SEARCH, 0, PLAYER_SEARCH.length, 1900, '192.168.0.255');

The original solution for this came from here bencevans/node-sonos#73

@YellowLemon1
Copy link

I had this same problem installing airsonos on a Raspberry Pi 2. Changing the broadcast address like above did not work. The solution: remove my 'Sonos Bridge' from the Sonos system, and either: connect ethernet directly to a speaker, or use standard WiFi setup with the Sonos. I went with the latter as Sonos themselves have now deprecated the Bridge device. The Bridge must be blocking/dropping the broadcasts from getting onto the SONOS-NET where the speakers are (?). I didn't check this with wireshark though, so I might be wrong.

@ktec
Copy link

ktec commented Mar 3, 2016

I'd like to thank my previous self for leaving this here. Just installed airsonos on a new laptop and had the same problem. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants