Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't connect my sonos device with the controller. #433

Closed
Arjun2991 opened this issue Jan 9, 2017 · 3 comments
Closed

Couldn't connect my sonos device with the controller. #433

Arjun2991 opened this issue Jan 9, 2017 · 3 comments

Comments

@Arjun2991
Copy link

Here's what I did:

--Connected the sonos speaker using ethernet cable.
--Connected my mac using wifi on the same network on which the speaker is connected.
--Started the nodejs app using terminal.

it keeps on throwing the error:

sonos-http-api@1.2.6 start /Users/adixit/Downloads/node-sonos-http-api-master
node server.js

2017-01-09T10:45:03.893Z INFO Presets loaded: { example:
{ players:
[ { roomName: 'Bathroom', volume: 10 },
{ roomName: 'Kitchen', volume: 10 },
{ roomName: 'Office', volume: 10 },
{ roomName: 'Bedroom', volume: 10 },
{ roomName: 'TV Room', volume: 15 } ],
playMode: { shuffle: true, repeat: 'all', crossfade: false },
disableIpDiscovery: true,
pauseOthers: false,
favorite: 'My example favorite' } }
2017-01-09T10:45:04.101Z INFO http server listening on port 5005
2017-01-09T10:45:05.582Z WARN resubscribing to sid undefined failed
Error: connect ECONNREFUSED 192.168.3.49:1400
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
2017-01-09T10:45:10.602Z WARN resubscribing to sid null failed
Error: connect ECONNREFUSED 192.168.3.49:1400
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

Please note IP address of the sonos speaker is 192.168.2.103

when I connect my MAC with the ethernet cable it throws the following error after starting the server :

sonos-http-api@1.2.6 start /Users/adixit/Downloads/node-sonos-http-api-master
node server.js

2017-01-09T10:49:43.889Z INFO Presets loaded: { example:
{ players:
[ { roomName: 'Bathroom', volume: 10 },
{ roomName: 'Kitchen', volume: 10 },
{ roomName: 'Office', volume: 10 },
{ roomName: 'Bedroom', volume: 10 },
{ roomName: 'TV Room', volume: 15 } ],
playMode: { shuffle: true, repeat: 'all', crossfade: false },
disableIpDiscovery: true,
pauseOthers: false,
favorite: 'My example favorite' } }
2017-01-09T10:49:44.039Z INFO http server listening on port 5005
{ Error: connect ECONNREFUSED 192.168.2.103:1400
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.2.103',
port: 1400 }

When I remove ethernet cable from both my mac or sonos the server starts but it says :

{"status":"error","error":"No system has yet been discovered. Please see #77 if it doesn't resolve itself in a few seconds."}

Please I need help to get my hands on using the services, also I need to make my own music streaming services on sonos any help regarding this would be highly appreciated.

Looking forward for some helpful replies.

Thanks,
Arjun

@jishi
Copy link
Owner

jishi commented Jan 9, 2017

You need to provide a description of your network setup, something fishy is going on, it seems to "discover" the players, which means multicast/broadcast works, but it seems to translate the IP for some reason and/or block the TCP traffic to the player. Either the firewall in MacOS is blocking you out for some reason, but it also sounds like you have some networking equipment that interferes with your traffic.

If you tell me which router/firewall/wifi equipment you are using, it might shed some light on the matter. If you have a player with multiple network jacks (play:5, connect or connect:amp), try wring the player, and then daisy-chain your computer into it, to see if that works. If that works, it's your network that acts up. If it doesn't work, it's the computer (and it's builtin firewall or something) that is giving your trouble.

@Arjun2991
Copy link
Author

Thanks for the quick reply jishi,

however I was able to connect the device using a trick:

  • play song from the android app
  • kill the android app
  • run the nodejs app
  • and it connects successfully.

Please, let me know how I can I create a streaming service on nodejs.

Thanks for you help again

@jishi
Copy link
Owner

jishi commented Jan 9, 2017

Sounds odd, but whatever works for you.

Not sure what you mean with a streaming service, and it sounds like it is outside of scope for this project?

@jishi jishi closed this as completed Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants