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

Getting airsonos working on Node.js 0.12.0 #113

Closed
LinusU opened this issue Feb 17, 2015 · 7 comments
Closed

Getting airsonos working on Node.js 0.12.0 #113

LinusU opened this issue Feb 17, 2015 · 7 comments

Comments

@LinusU
Copy link

LinusU commented Feb 17, 2015

Hi @stephen, I'm currently trying to get airsonos working on Node.js 0.12.0 and have at least gotten a bit forward.

Currently, node-lame dosen't compile on 0.12.0. I've sent a pull request here TooTallNate/node-lame#45.

I have also forked nicercast to depend on my git version of lame. And finally forked airsonos to depend on that version of nicercast.

Now the problem seems to be with the challenge...

screen shot 2015-02-17 at 09 47 24

Searching for Sonos devices on network...
Setting up AirSonos for Lounge {REDACTED:1400}
  nodetunes:server starting nodetunes server (Lounge (AirSonos)) +0ms
  nodetunes:server broadcasting mdns advertisement (for port 5000) +17ms
  nodetunes:rtsp received method OPTIONS (CSeq: 0)
{ cseq: '0',
  'x-apple-device-id': 'REDACTED',
  'apple-challenge': 'REDACTED',
  'dacp-id': 'REDACTED',
  'active-remote': 'REDACTED',
  'user-agent': 'AirPlay/215.15' } +5s
  nodetunes:helper building challenge for REDACTED (ip: REDACTED, mac: REDACTED) +2ms
  nodetunes:helper computed challenge: REDACTED +79ms

The quest continues!

@LinusU
Copy link
Author

LinusU commented Feb 17, 2015

Hmm, it seems like the mac address might have been wrong. But hard coding it dosen't help anything. The ip seems to be right thought...

@stephen Do you know what the ip and mac should be, that of my en0 interface? Or should the ip be 127.0.0.1?

@stephen
Copy link
Owner

stephen commented Feb 17, 2015

mac is actually randomly generated in the current iteration of nodetunes. This has worked fine on 0.10.x, but it seems that it's not working on >= 0.11.x.

I'm currently not sure what the problem is for getting 0.11 and 0.12 support working. What is happening is that the challenge/response is not passing what the client expects it to be, but I haven't figured out beyond that.

The IP should be the address on your local network.

@stephen
Copy link
Owner

stephen commented Feb 17, 2015

Also see: #33

The challenge/response hasn't changed between 0.10 and 0.11, but it's possible that the mdns module has changed between those versions in a way that the randomly generated mac address isn't acceptable anymore. I haven't had time to test, but it might be worth digging into nodetunes and using the real en0 mac address to see.

@benzwu
Copy link

benzwu commented Mar 6, 2015

My installation on node 0.10.36 with Airsonos 1.1, grab my loopback (lo0) instead of my ethernet, en0. So it's not displaying my devices and hence the airplay is not as well.


lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.53 netmask 0xffffff00
inet 127.0.0.54 netmask 0xffffff00
inet 127.0.0.55 netmask 0xffffff00
nd6 options=1
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 6c:40:08:a7:63:96
inet6 fe80::6e40:8ff:fea7:6396%en0 prefixlen 64 scopeid 0x4
inet 192.168.1.107 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=1
media: autoselect
status: active


AirSonos Diagnostics
node version v0.10.36
operating sys darwin (x64)
ip address 127.0.0.53

Searching for Sonos devices on network...

Device {"host":"192.168.1.109","port":1400,"state":{}} (ZPS1)
- attrs: {"CurrentZoneName":"Prisma", "CurrentIcon":"x-rincon-roomicon:office", "CurrentConfiguration":"1"} - info: {"SoftwareVersion":"28.1-83040",
"DisplaySoftwareVersion":"5.2",
"HardwareVersion":"1.8.3.7-1",
"IPAddress":"192.168.1.109",
"MACAddress":"XX:XX:XX:XX:XX:9A",
"CopyrightInfo":"© 2004-2014 Sonos, Inc. All Rights Reserved.",
"ExtraInfo":"OTP: ",
"HTAudioIn":"0"}
`- topology: [{"group":"RINCON_B8E937B30A9A01400:1",
"coordinator":"true",
"wirelessmode":"1",
"channelfreq":"2452",
"behindwifiext":"0",
"wifienabled":"1",
"location":"http://192.168.1.109:1400/xml/device_description.xml",
"version":"28.1-83040",
"mincompatibleversion":"27.0-00000",
"legacycompatibleversion":"24.0-0000",
"bootseq":"6",
"uuid":"RINCON_B8E937B30A9A01400",
"name":"Prisma"}]

@rayalan
Copy link

rayalan commented Apr 5, 2015

Quick update: AirSonos 0.1.1 would not work on node v0.12.0, but did work with v0.12.1

node version     v0.12.1
operating sys    darwin (x64)

I'm running OS X 10.8.5. As far as I can tell with node v0.12.0, the problem was that the firewall wasn't getting properly configured so that after a connection, airsonos detected an immediate disconnect.

With 0.12.1, I'm seeing a sporadic problem problem where it sometimes takes me 2-3 restarts of airsonos before I can select the Sonos output in System Preferences / Sound Output. (The outputs always appear, but sometimes aren't selectable.)

However, as far as can tell, NodeJs 0.12.1 itself works.

@stephen
Copy link
Owner

stephen commented Aug 9, 2015

This should be resolved with stephen/nodetunes#32.

@stephen
Copy link
Owner

stephen commented Aug 24, 2015

Landed in 0.2.2

@stephen stephen closed this as completed Aug 24, 2015
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

4 participants