(Go: >> BACK << -|- >> HOME <<)

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

0.2.4 is broken #231

Open
justintime opened this issue Oct 23, 2015 · 5 comments
Open

0.2.4 is broken #231

justintime opened this issue Oct 23, 2015 · 5 comments

Comments

@justintime
Copy link

Hey @stephen - I'm the maintainer of https://github.com/justintime/docker-airsonos. I had some requests to update my docker container with the latest fixes so that it would work with iOS 9 correctly.

I don't know the slightest thing about nodejs, but I am a very stubborn sysadmin. I'm pretty sure that 0.2.4 is broken for near everyone. I've tried combos of nodejs 0.10, 0.12, and 4.x along with both Ubuntu Precise and Ubuntu Trusty. I've tried building from master, as well as via npm. I can get each one to build, but each one bombs out when I run airsonos with:

*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
Searching for Sonos devices on network...


/usr/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677
            throw e;
            ^
Error: Internal Server Error
    at maybeWrapAsError (/usr/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12)
    at /usr/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50
    at /usr/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:112:20
    at done (/usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15)
    at /usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16
    at /usr/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:106:22
    at done (/usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15)
    at /usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16
    at /usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:251:17
    at done (/usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15)
    at /usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16
    at /usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:248:21
    at /usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:572:34
    at /usr/lib/node_modules/airsonos/node_modules/sonos/lib/events/volumeListener.js:24:14
    at Listener.<anonymous> (/usr/lib/node_modules/airsonos/node_modules/sonos/lib/events/listener.js:123:9)
    at Request.self.callback (/usr/lib/node_modules/airsonos/node_modules/sonos/node_modules/request/request.js:129:22)

There's quite a few other posts in the issue queue about the same problem, so I'm sure it's not just me. If you need someone to test any fixes, I'll make myself available .

@leachbj
Copy link
leachbj commented Oct 23, 2015

I have managed to cobble together a docker image that works, I'm running it on my DS412+ and it seems to be working ok. Its at https://hub.docker.com/r/leachbj/airsonos/ (the various forks are on my github https://github.com/leachbj/docker-airsonos).

@justintime
Copy link
Author

@leachbj - nice work! Care to share the steps you did to make that work? Did just pointing at the fork of nodetunes fix everything, or did you have to do more?

@leachbj
Copy link
leachbj commented Oct 26, 2015

I have pushed all the changes to my forks on github but yes basically I just updated airsonos to use nodetunes at git://github.com/microadam/nodetunes.git. I also had to add npm install -g babel to the Dockerfile and change the install to npm install -g --unsafe-perm to resolve the install problems.

@xuncia
Copy link
xuncia commented Mar 8, 2016

If anyone still have the problem I've figure out a little workaround that could help, at least I hope so.
You can use this bash script:

#!/usr/bin/bash

# Switch off wifi controller for left Player 1
curl http://airsonos_play1:1400/wifictrl?wifi=off

# Switch off wifi controller for right Player 1
curl http://airsonos_play1(2):1400/wifictrl?wifi=off 


sleep 60

airsonos


# Switch on wifi controller for left Player 1
curl http://airsonos_play1:1400/wifictrl?wifi=on 

# Switch on wifi controller for right Player 1
curl http://airsonos_play1(2):1400/wifictrl?wifi=on 

In my case it's the surround system with the two play1 that creates the problem, so I switch off the wifi chip of the two play1 sonos speakers, I wait about 60 seconds (maybe I can wait less let's try) and then I launch airsonos and switch on the two player1.

@lucdetellis
Copy link
lucdetellis commented Jun 1, 2016

This problem seems to still exist in 0.2.6. (Using Node 0.12.14, Mac OS 10.11.3)

EDIT: Found a solution! (credit to @ady624)

  1. Download: https://github.com/stephen/airsonos/files/184595/logicalDevice.zip
  2. Replace this file with the file in the link above:
    /path_to_node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js

Original comment with solution: #216 (comment)

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