Giter VIP home page Giter VIP logo

Comments (109)

bjeanes avatar bjeanes commented on June 14, 2024 3

apt-get kept installing NodeJS 0.10.x for me, even after adding the 0.12.x series sources. I had to explicitly request the right version (which I got from apt-cache policy nodes) with apt-get install nodejs=0.12.9-1nodesource1~jessie1. Unfortunately I couldn't get airsonos to install properly.

In the end I got Airsonos working on my NAS just through docker, using:

$ docker run -d --restart=always --net="host" --name="airsonos" -p 5000-5050:5000-5050/tcp leachbj/airsonos

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024 2

Oke, so I started again and I think all is good now. It turned out that I installed node on my Synolody OS instead of debian chroot. These are the steps I took:

- Install debian package
- After the install, it will continue to install in the background, so check the cpu.
- When the CPU is down again, restart your synology Nas
- Login using SSH as root
- Type: 
/var/packages/debian-chroot/scripts/start-stop-status chroot
- Type: echo "deb htpp://ftp.nl.debian.org/debian stable main non-free" > /etc/apt/source.list
- Type: apt-get update
- Type: apt-get upgrade
- You might get some errors ragarding Locales.
- Type: apt-get install locales
- Type: dpkg-reconfigure localese
- Choose your locales with space and enter (I used en_US en_GB and nl_NL)
- Type: dpkg-reconfigure tzdata
- Choose your timezone
- Type: apt-get install build-essential
- Type: apt-get install curl
- Type: curl -sl https://deb.nodesource.com/setup | bash -
- Type: apt-get install nodejs
- Type: apt-get install libavahi-compat-libdnssd-dev libasound2-dev
- Type: npm install airsonos -g
- Type: airsonos

Do only error I get now is:
*** 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

I googled around a bit and don't think it will cause any issues.
I can see my sonos systems, but since I am not at home at the moment, I can't check if it really works. I'll post an update.

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024 2

Reinstall of the debian-chroot package did the trick!

Here is an update of the steps I took:

  • Install debian package from the synology community
  • After the install, it seems continue to install or configure in the background, so check the cpu.
  • When the CPU is down again, restart your synology Nas and make sure Debian Chroot is running.
  • Login using SSH from your pc as root (From mac terminal: ssh [email protected] -p22)
  • Type: /var/packages/debian-chroot/scripts/start-stop-status chroot
  • Type: apt-get update
  • Type: apt-get upgrade
  • You might get some errors ragarding Locales.
  • Type: apt-get install locales
  • Type: dpkg-reconfigure locales
  • Choose your locales with space and enter (I used en_US en_GB and nl_NL)
  • Type: dpkg-reconfigure tzdata
  • Choose your timezone with the arrow keys
  • Type: apt-get install build-essential
  • Type: apt-get install nodejs
  • Type: ln -s /usr/bin/nodejs /usr/bin/node
  • Type: apt-get install npm
  • Type: apt-get install libavahi-compat-libdnssd-dev libasound2-dev
  • Type: npm install airsonos -g
  • Type: airsonos

I used "airsonos &" to make sure airsonos keeps running after closing the terminal window. If someone knows how to set-up a proper start-stop script in debian chroot, please reply! My airsonos script path is: usr/local/bin/airsonos

from airsonos.

stephen avatar stephen commented on June 14, 2024

Synology runs a linux-variant I believe, so theoretically yes. AirSonos has a few dependencies that you will need to find packages for, or compile yourself on Linux.

For reference, I know that on a clean Ubuntu box, you need to install at least: libavahi-compat-libdnssd-dev, and libasound2-dev to get AirSonos working.

Let me know how it goes and we can documents steps for others to use.

from airsonos.

dinomite avatar dinomite commented on June 14, 2024

@Skyryser Did it work on your Synology?

If not, another low power option is to use a Raspberry Pi or Beagle Bone. Someone even has a tutorial for running AirSonos on Raspberry Pi.

from airsonos.

hanssens avatar hanssens commented on June 14, 2024

Indeed, Synology runs on a stripped, bare-boned version of Debian. The main problem seems to be the lack of having apt-get, ipkg or similar package managers. Considering we're also missing some other vital stuff on a basic DiskStation instance, I've managed to do the following to perhaps get us a step further:

  1. Enable SSH on the DiskStation
  2. Install Python 2.7 (through the SynoCommunity Packages)
  3. Install Debian Chroot (through the SynoCommunity Packages)
  4. Reboot (= important)
  5. SSH with root onto your DiskStation using: ssh root@your_synology_ip

Now, in theory we should have access to chroot and therefor have access to apt-get. Unfortunately, on my Synology this is where I'm stuck on, up on to this moment. According to the Debian Chroot documentation (for Synology), I should be able to chroot using:

/var/packages/debian-chroot/scripts/start-stop-status chroot

This works. But running aptitude update or apt-get update doesn't really work.

Perhaps others can give some tips to extend these steps a bit further?

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

@hanssens, I was able to get it working using this site: https://github.com/SynoCommunity/spksrc/blob/develop/spk/debian-chroot/src/app/help/enu/index.html

I managed to use apt-get udpate and upgrade. Also, libavahi-compat-libdnssd-dev, and libasound2-dev are installed. But when I try to install airsonos, I am getting the error below:

DiskStation> npm install airsonos -g

[email protected] install /usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/ursa
node-gyp configure build && node install.js

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:103:14)
gyp ERR! stack at /volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:42:11
gyp ERR! stack at F (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:43:25)
gyp ERR! stack at E (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.:107:15)
gyp ERR! System Linux 3.2.40
gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/ursa
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! Error: ENOENT, open '/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build/Release/obj.target/dns_sd_bindings/src/mdns_utils.o'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

etc. etc.


Any help would be very appreciated!

from airsonos.

stephen avatar stephen commented on June 14, 2024

gyp ERR! stack Error: Can't find Python executable "python2", you can set the PYTHON env variable.

@dejongrr - I believe node-gyp requires python installed in order to build some packages

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

I took a look at: https://github.com/TooTallNate/node-gyp/
And based on the info, I used the following command:

DiskStation> npm config set python /volume1/@appstore/python/bin/python2.7

After some minutes I got the following:

[email protected] install /usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/ursa
node-gyp configure build && node install.js

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.30"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/ursa/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.:107:15)
gyp ERR! System Linux 3.2.40
gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/ursa
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm WARN deprecated [email protected]: use serve-favicon module

[email protected] install /usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns
node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: ENOENT, no such file or directory
gyp ERR! stack at process.cwd (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8:19)
gyp ERR! stack at Object.exports.resolve (path.js:309:52)
gyp ERR! stack at configure (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:26:23)
gyp ERR! stack at Object.self.commands.(anonymous function) as configure
gyp ERR! stack at run (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:72:30)
gyp ERR! stack at process._tickCallback (node.js:419:13)
gyp ERR! System Linux 3.2.40
gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8
cwd = origCwd.call(process)
^
Error: ENOENT, no such file or directory
at process.cwd (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8:19)
at errorMessage (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:119:28)
at issueMessage (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:125:3)
at process. (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:109:3)
at process.emit (events.js:95:17)
at process._fatalException (node.js:272:26)

[email protected] install /usr/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame
node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: ENOENT, no such file or directory
gyp ERR! stack at process.cwd (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8:19)
gyp ERR! stack at Object.exports.resolve (path.js:309:52)
gyp ERR! stack at configure (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:26:23)
gyp ERR! stack at Object.self.commands.(anonymous function) as configure
gyp ERR! stack at run (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:72:30)
gyp ERR! stack at process._tickCallback (node.js:419:13)
gyp ERR! System Linux 3.2.40
gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8
cwd = origCwd.call(process)
^
Error: ENOENT, no such file or directory
at process.cwd (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8:19)
at errorMessage (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:119:28)
at issueMessage (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:125:3)
at process. (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:109:3)
at process.emit (events.js:95:17)
at process._fatalException (node.js:272:26)
npm ERR! [email protected] install: node-gyp configure build && node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the ursa package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build && node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ursa
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.40
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /root
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE

[email protected] install /usr/lib/node_modules/airsonos/node_modules/lame
node-gyp rebuild

Btw, I used a node.js package for my ds214play (evansport): Node.js-evansport-0.10.29-0003

from airsonos.

knusprig55 avatar knusprig55 commented on June 14, 2024

@dejongrr try running the npm command with sudo or as root.

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

I am connected to my Synology with SSH using [email protected], so in my understanding every command is already run as root. Could it be that somehow the ownership got changed, and therefore needs to be changed by chown on .node-gyp folder?

from airsonos.

stephen avatar stephen commented on June 14, 2024

gyp ERR! stack Error: not found: make

is make in your path?

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

I used: apt-get install build-essential
Packages like 'make' and 'g++' were installed witch were apparently essential to node-gyp, but I still getting to same error.

from airsonos.

stephen avatar stephen commented on June 14, 2024

@dejongrr - Can you verify that make can be found? (which make)

Though installed, it seems node-gyp can't access the build tools it needs - that might be a more conducive place to look.. (i.e. I'm assuming other packages like npm install ursa also fail because your build env is still lacking something..)

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

I can confirm it works! Thanks for the feedback! Next step for me will be to auto start debian chroot and airsonos when I reboot my Synology nas.

from airsonos.

coolcatiger avatar coolcatiger commented on June 14, 2024

Thanks for detailed instructions. I got it running on synology from SSH (using this i need to keep my mac running all the time).

I am trying to use debian chroot console to start airsonos. Has any one tried it ? If yes please share detailed instructions.

It could be useful to know instructions to start airsonos on synology automatically but it is totally fine to run it in background manually.

from airsonos.

stephen avatar stephen commented on June 14, 2024

@dejongrr - nice work on this! I'll have to see about putting together guides for these in some central manner (and incl. your work) - maybe under the github wiki, or as markdown file in the project?

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

Don't know when the issue started, but I'm getting the following error:

root@DiskStation:/# airsonos
*** WARNING *** The program 'node' 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=node>
*** WARNING *** The program 'node' 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=node&f=DNSServiceRegister>
Searching for Sonos devices on network...
Setting up AirSonos for Living Room {192.168.2.102:1400}

Error: dns service error: unknown
    at new Advertisement (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/advertisement.js:64:10)
    at NodeTunes.<anonymous> (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/server.js:65:21)
    at Server.g (events.js:180:16)
    at Server.EventEmitter.emit (events.js:92:17)
    at net.js:1055:10
    at process._tickCallback (node.js:419:13)

I am running the latest version of airsonos. It seems that airsonos is able the find all my sonos devices, but they doesn't show up under output devices on my mac.

See the diagnostics below:

AirSonos Diagnostics
node version     v0.10.28
operating sys    linux (ia32)

Searching for Sonos devices on network...

Device  {"host":"192.168.2.101","port":1400} (ZPS1)
`- attrs:   {"CurrentZoneName":"Play:1",
        "CurrentIcon":"x-rincon-roomicon:living",
        "CurrentConfiguration":"1"}
`- info:    {"SoftwareVersion":"27.2-80271",
        "DisplaySoftwareVersion":"5.1",
        "HardwareVersion":"1.8.3.7-2",
        "IPAddress":"192.168.2.101",
        "MACAddress":"XX:XX:XX:XX:XX:BA",
        "CopyrightInfo":"© 2004-2014 Sonos, Inc. All Rights Reserved.",
        "ExtraInfo":"OTP: ",
        "HTAudioIn":"0"}
`- topology:    [{"group":"RINCON_000E582D6D2C01400:1",
        "coordinator":"true",
        "wirelessmode":"0",
        "channelfreq":"2437",
        "behindwifiext":"0",
        "location":"http://192.168.2.102:1400/xml/device_description.xml",
        "version":"27.2-80271",
        "mincompatibleversion":"26.0-00000",
        "legacycompatibleversion":"24.0-0000",
        "bootseq":"95",
        "uuid":"RINCON_000E582D6D2C01400",
        "name":"Living Room"},{"group":"RINCON_B8E93753DABA01400:7",
        "coordinator":"true",
        "wirelessmode":"0",
        "channelfreq":"2437",
        "behindwifiext":"0",
        "location":"http://192.168.2.101:1400/xml/device_description.xml",
        "version":"27.2-80271",
        "mincompatibleversion":"26.0-00000",
        "legacycompatibleversion":"24.0-0000",
        "bootseq":"31",
        "uuid":"RINCON_B8E93753DABA01400",
        "name":"Play:1"}]


Device  {"host":"192.168.2.102","port":1400} (ZP90)
`- attrs:   {"CurrentZoneName":"Living Room",
        "CurrentIcon":"x-rincon-roomicon:living",
        "CurrentConfiguration":"1"}
`- info:    {"SoftwareVersion":"27.2-80271",
        "DisplaySoftwareVersion":"5.1",
        "HardwareVersion":"1.1.16.4-2",
        "IPAddress":"192.168.2.102",
        "MACAddress":"XX:XX:XX:XX:XX:2C",
        "CopyrightInfo":"© 2004-2014 Sonos, Inc. All Rights Reserved.",
        "ExtraInfo":"r8: 16.0-7",
        "HTAudioIn":"0"}
`- topology:    [{"group":"RINCON_B8E93753DABA01400:7",
        "coordinator":"true",
        "wirelessmode":"0",
        "channelfreq":"2437",
        "behindwifiext":"0",
        "location":"http://192.168.2.101:1400/xml/device_description.xml",
        "version":"27.2-80271",
        "mincompatibleversion":"26.0-00000",
        "legacycompatibleversion":"24.0-0000",
        "bootseq":"31",
        "uuid":"RINCON_B8E93753DABA01400",
        "name":"Play:1"},{"group":"RINCON_000E582D6D2C01400:1",
        "coordinator":"true",
        "wirelessmode":"0",
        "channelfreq":"2437",
        "behindwifiext":"0",
        "location":"http://192.168.2.102:1400/xml/device_description.xml",
        "version":"27.2-80271",
        "mincompatibleversion":"26.0-00000",
        "legacycompatibleversion":"24.0-0000",
        "bootseq":"95",
        "uuid":"RINCON_000E582D6D2C01400",
        "name":"Living Room"}]

from airsonos.

stephen avatar stephen commented on June 14, 2024

Don't know when the issue started, but I'm getting the following error:

I think the Error: dns service error: unknown signals that there's a problem with avahi attempting to use mdns to broadcast that the device is available. Have you upgraded those packages recently?

One thing you might be able to try is doing a rebuild (or perhaps uninstalling/installing) if the bindings no longer match up.

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

@stephen - Does airsonos even have start and stop arguments? otherwise that would be a nice feature, in addition to a refresh or something.

from airsonos.

pcr23 avatar pcr23 commented on June 14, 2024

First, I would like to say thanks to @stephen for airsonos and @dejongrr for the detailed instructions on how to install it. I wish I was knowledgeable enough to contribute something to this conversation.

Per @dejongrr instructions earlier in the conversation, airsonos was up and running on my synology until I closed terminal. Then a few days later I ran into the same "Error: dns service error: unknown" problem. So, I checked back every couple of days to see if there were any updates and sure enough, today I see new instructions. I uninstalled debian-chroot, restarted server, reinstalled debian-chroot, restarted server. Confirmed debian-chroot was running. Followed the rest of the steps to the letter. However, when I type the final step "airsonos" it says "/usr/bin/env: node: No such file or directory". I can see that it was installed. Any idea what I am doing wrong?

Thanks again.

from airsonos.

stephen avatar stephen commented on June 14, 2024

@dejongrr - no, but adding support for library-like usage would make sense. Could open an issue or PR for it.

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

@pcr23 - I might have forgotten to add that to the instructions, but this should fix it:

  • Type: ln -s /usr/bin/nodejs /usr/bin/node
    This way, you make a symbolic lync so nodejs corresponds to node. More info here:
    nodejs/node-v0.x-archive#3911

from airsonos.

pcr23 avatar pcr23 commented on June 14, 2024

Thank you very much for the help and the info, @dejongrr. Greatly appreciated.

from airsonos.

pcr23 avatar pcr23 commented on June 14, 2024

Ok, everything is working great now. However, when I type "airsonos #" it still stops working when I close terminal. Do I type "airsonos #" as the last step.

BTW-thanks for taking the time to help me understand this. I'm learning slowly but surely.

from airsonos.

RustyDust avatar RustyDust commented on June 14, 2024

I'm pretty sure that should read "airsonos &" instead of "aisonos #". the "&" tells your system to put the task in the background where it should keep running even when you close the terminal session.

-Stefan=

from airsonos.

pcr23 avatar pcr23 commented on June 14, 2024

@RustyDust That did the trick. Thanks!

from airsonos.

digiveit avatar digiveit commented on June 14, 2024

Hello,
first of all thank you for the great installation manual. It worked very well for me.
I still have one problem: After I did the last update on my DS411+II and restarted it, I got hte following error message from airsonos:
root@DiskStation:/# airsonos &
[1] 337
root@DiskStation:/# *** 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...
Setting up AirSonos for Wohnzimmer {192.168.0.36:1400}

Error: dns service error: unknown
at new Advertisement (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create as createAdvertisement
at NodeTunes. (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/server.js:74:21)
at Server.g (events.js:180:16)
at Server.emit (events.js:92:17)
at net.js:1055:10
at process._tickCallback (node.js:419:13)

Any suggestions what I can do about it?

With thanks,
Veit

from airsonos.

karelmartens avatar karelmartens commented on June 14, 2024

Awesome guide, kudos to dejongrr and stephen!

I do experience the same issue as digiveit, I'm running DSM 5.1-5004 Update 2 on a DS212+

It worked fine after the install from dejongrr but after a reboot I did this from SSH:

root@....>/var/packages/debian-chroot/scripts/start-stop-status chroot
root@.....:/# airsonos &

and I get this:

*** 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...
Setting up AirSonos for Living Room {192.168.2.251:1400}

Error: dns service error: unknown
at new Advertisement (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create as createAdvertisement
at NodeTunes. (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/server.js:74:21)
at Server.g (events.js:180:16)
at Server.emit (events.js:92:17)
at net.js:1055:10
at process._tickCallback (node.js:419:13)

Let me know if you want me to troubleshoot anything.

from airsonos.

karelmartens avatar karelmartens commented on June 14, 2024

after some troubleshooting it might be coming from avahi-deamon:
follow up on agnat/node_mdns#43

root@...:/etc/avahi# service avahi-daemon status
Avahi mDNS/DNS-SD Daemon is not running
root@...:/etc/avahi# service avahi-daemon stop
[ ok ] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon.
root@...:/etc/avahi# service avahi-daemon start
[FAIL] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon failed!

tried reinstalled avahi-deamon but no success

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

First of all, let me just state that I know very little of unix/debian etc. Since two months I own a Synology NAS and setting up the airsonos server was actually my first encounter with it. But, thanks to Stephen and Google, I managed to get it working...well...almost.

I have the same DNS issue as above and it is the same issue I had before. The solution was a total re-install of the debian package This will probably fix it, just like it did last time. At least now we know what the cause is; it is a Synology update that's breaking the avahi-daemon somehow. This feels a bit a-logical to me, since airsonos and all the dependant packages resided in the debian-chroot environment, which runs simultaneously (and independently, right?) with DSM. Can anyone shine a light on this?

from airsonos.

jcplu avatar jcplu commented on June 14, 2024

On SynoIogy DS213, the cpu (mine is Feroceon 88FR131) seems too slow (cpu usage is high) and the sound cuts. I can confirm that when the NAS reboots the avahi-daemon doesn't start anymore and AirSonos doesn't work too. You have to unsintall and reinstall avahi until avahi-daemon can start again (uninstallation of debian-chroot is not necessary).

On my netbook running Debian wheezy, AirSonos works well.

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

@jcplu: thanks for your response!

Based on your info, I tried to reinstall it, but that gave me another error regarding dbus. After googling around a bit I found a solution that worked. Just follow these steps:

  • type: /etc/init.d/dbus restart
  • type: apt-get install --reinstall avahi-daemon

I actually did not try to run airsonos right after de dbus restart, so maybe that already fixes it. Question is of course why the above is necessary in the first place..

from airsonos.

jcplu avatar jcplu commented on June 14, 2024

Sometimes the file /etc/default/avahi-daemon need to be fixed.

Change the line:
AVAHI_DAEMON_DETECT_LOCAL=1
to
AVAHI_DAEMON_DETECT_LOCAL=0

from airsonos.

flexorflex avatar flexorflex commented on June 14, 2024

Hi!
Everything work fine until:
npm install airsonos -g
Than I get this message:
root@Server_DS:/# npm install airsonos -g
Segmentation fault
I've a DS214se running

from airsonos.

 avatar commented on June 14, 2024

What's the chances that we can get a real Synology package (that can be installed, updated etc. through Package Center)?

from airsonos.

lottomotto avatar lottomotto commented on June 14, 2024

@dejongrr hello, thanks for all your work. I write you because it seems we had all the same problems. Solved the first ones reinstalleing everything following your guide from Nov 24 and now I am stuck at:

*** 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...

it actually doesn't find any of my Sonos

Tried your latest suggestion:
type: /etc/init.d/dbus restart
type: apt-get install --reinstall avahi-daemon

this is the result:
root@DiskStation:/# /etc/init.d/dbus restart
[ ok ] Stopping system message bus: dbus.
[ ok ] Starting system message bus: dbus.
root@DiskStation:/# apt-get install --reinstall avahi-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/97.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 21114 files and directories currently installed.)
Preparing to replace avahi-daemon 0.6.31-2 (using .../avahi-daemon_0.6.31-2_i386.deb) ...
[ ok ] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Unpacking replacement avahi-daemon ...
Processing triggers for man-db ...
Setting up avahi-daemon (0.6.31-2) ...
[ ok ] Reloading system message bus config...done.
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemonTimeout reached while wating for return value
Could not receive return value from daemon process.
(warning).

it doesn't start at all

I have a DS1513+ latest firmware.

Any idea of what could I try?

from airsonos.

denkristoffer avatar denkristoffer commented on June 14, 2024

Synocommunity actually offers a Node package, so it'd be obvious to take advantage of that. It should be possible to have a Synocommunity package developed for AirSonos if we can get some sort of start/stop command implemented.

from airsonos.

LongChair avatar LongChair commented on June 14, 2024

I would definitely second that :)

AirSonos seems the thing i have been looking for for a while, which retained me from buying a few Play1.
But the only thing that would make sense to me would be to have it running on the only thing that's running 24/7, that is my syno nas, and even if that looks doable from the above, that doesnt look really straight forward :)

@stephen : any plans to get it to a synocommunity package ? :)

from airsonos.

LongChair avatar LongChair commented on June 14, 2024

I havetried a slightly different way to avoid the chroot and such, in order to see if something a bit more straight foward would be possible, here is what i did :

Grabbed the nodejs package from the package center (yes there is one)

capture d ecran 2015-01-18 a 11 23 12.

I also have iPkg installed on my Syno for this.

i found that as mentionned before you need python 2.7 do i had to type ipkg install python27

then i typed npm install airsonos -g but this fails on obviously using lame as shown in the log below. it's not very clear to me on what is failing yet ...

DiskStation> npm install airsonos -g
npm WARN deprecated [email protected]: use serve-favicon module

> [email protected] install /usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns
> node-gyp rebuild

make: Entering directory `/volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build'
Makefile:1: /env.mak: No such file or directory
make: *** No rule to make target `/env.mak'.  Stop.
make: Leaving directory `/volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.40
gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
/
> [email protected] install /usr/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame
> node-gyp rebuild

make: Entering directory `/volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame/build'
Makefile:1: /env.mak: No such file or directory
deps/mpg123/test.target.mk:116: warning: overriding recipe for target `Release/test'
deps/lame/test.target.mk:124: warning: ignoring old recipe for target `Release/test'
make: *** No rule to make target `/env.mak'.  Stop.
make: Leaving directory `/volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.40
gyp ERR! command "node" "/volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /volume1/@appstore/Node.js/usr/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mdns
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.40
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /root/airsonos
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

any clue anyone ?

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

A few months ago, I started trying getting Airsonos up and running with the node.js package (I also used the python package) as mentioned by @LongChair and encountered the same problems. Back then, I did some research and this is what I know:

Synology uses a lightweight Linux variant called Busybox, with Ash as the shell instead of something like the fully featured Bash. It also lacks a standard package manager like apt-get. In fact, there are no apt-get repositories for synology so apt-get is out of the question. Besides the Synology Package Center Gui, you'll have to do with ipkg as a manager to install compiled binaries. At first, you need to install ipkg via a script (bootstrap) that's processor specific. After that, all packages installed via ipkg will match your processor. Only problem is that the changes in the .config file in order to make ipkg work can be overwritten when synology firmware updates are installed.

Airsonos needs some dependancies like Node, libavahi-compat-libdnssd-dev and libasound2-dev. For installation, it uses node-gyp that is dependant of pacakges like make, gcc and python 2.7. And these are just the dependent packages I know...

Even after installing the packages Make and GCC via ipkg I got the same error as @LongChair has. This is why a tried to install airsonos in a closed environment with apt-get available (so no synology firmware updates mess up any setting, right?). There was a Debian Chroot package already available in the Synology package manger gui and within Debian you'll have access to apt-get. See my tutorial above.

Unfortunately, I know have the same issue as @lottomotto has... :( So no luck with debian as well.

The are some of the sites I consulted:
http://en.wikipedia.org/wiki/BusyBox
http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have
http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc
https://github.com/TooTallNate/node-gyp
http://zarino.co.uk/post/custom-software-synology-dsm-update
http://zarino.co.uk/post/ds214se-under-the-hood

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

Maybe this can help somebody to figure things out since it seems that shairport is simmular to airsonos in that it acts as an airplay receiver:

https://github.com/abrasive/shairport
http://blog.elsdoerfer.name/2011/05/15/shairport-on-synology-nas/
http://www.losty.ch/2014/01/synology-nas-as-airplay-receiver.html
SynoCommunity/spksrc#848

from airsonos.

LongChair avatar LongChair commented on June 14, 2024

@dejongrr : i got the chroot method working to build it as well, but I haven't found a proper way to have it started when NAS is stating up.

Did anyone find a proper method for that ?

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

Sorry, I don't have a proper method for auto booting.

For those who are having avahi problems:
I used a workaround shown on this site: lxc/lxc#25
the trick is to remove 'rlimit-nproc=3' from /etc/avahi/avahi-daemon.conf

Type: vi /etc/avahi/avahi-daemon.conf
use [h][j][k][l] as your cursus to go to the line 'rlimit-nproc=3', type: dd
this will remove that line
save and quit by typing: :wq
now reinstall avahi by typing: apt-get install --reinstall avahi-daemon

It's working for me! I did a complete rebuild of debian and applied this workaround just before installing airsonos, but I think this should also work after installing.

from airsonos.

HenkvdM avatar HenkvdM commented on June 14, 2024

I've created the following startup script:

  • Put the following script in the file in /usr/local/etc/rc.d/airsonos.sh
  • Chmod the file with 775 (chmod 775 /usr/local/etc/rc.d/airsonos.sh)

It is working for me on my Synology 415play. Give it a try.
Thanks @dejongrr for you're install tutorial.

#!/bin/sh
#
# Put this file in /usr/local/etc/rc.d/airsonos.sh

case "$1" in

stop)
  echo "Stop AirSonos ..."
  chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/etc/init.d/dbus stop"
  chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/etc/init.d/avahi-daemon stop"
  pkill -f airsonos
;;

start)
  chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/etc/init.d/dbus restart"
  chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/etc/init.d/avahi-daemon start"
  nohup chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/usr/local/bin/airsonos" >>/dev/null 2>>/dev/null &
;;

restart)
  $0 stop
  sleep 1
  $0 start
;;

status)
  ps | grep airsonos
  return $?
;;

*)
  echo "usage: $0 { start | stop | restart | status}" >&2
  exit 1
;;

esac

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

Thanks @HenkvdM for sharing your script! Somehow I'm fighting with vi (used it only to edit scripts) while creating the script. Could you provide all the necessary steps in order to create the script file?

Also, is there a reason you are not using init.d : https://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian ? Seems like the more standard way of creating a start-stop script. Also, does is matter is doesn't have exit 0 at the end?

from airsonos.

LongChair avatar LongChair commented on June 14, 2024

i set it up following @dejongrr method with npm install airsonos -g and i have some wierd stuff on Syno.

First of all if i run airsonos from my mac, it jusr works and is detecting my 4 sonos devices ( 2 x Play 1 , 1 x Play 5 and one Sonos BOOST).

But when running it from the Syno it randomly detects one of the 4 devices and outputs the following logs :

root@DiskStation:/# airsonos &
[1] 6353
root@DiskStation:/# *** 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...
Setting up AirSonos for BOOST {192.168.1.240:1400}

Error: dns service error: unknown
    at new Advertisement (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/lib/advertisement.js:64:10)
    at NodeTunes.<anonymous> (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/server.js:74:21)
    at Server.g (events.js:180:16)
    at Server.emit (events.js:92:17)
    at net.js:1055:10
    at process._tickCallback (node.js:419:13)

Any ideas ?

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

@LongChair Check one of my recent posts above, the trick is to remove 'rlimit-nproc=3' from /etc/avahi/avahi-daemon.conf

from airsonos.

HenkvdM avatar HenkvdM commented on June 14, 2024
  • Just go to the directory /usr/local/etc/rc.d/
  • Type: vi airsonos.sh
  • Maybe you can copy and paste the script in vi or else type it over.
  • Then close and save the script.

On Synology is /usr/local/etc/rc.d/ the place where you place your startup script. The script runs fine without exit 0.

from airsonos.

dejongrr avatar dejongrr commented on June 14, 2024

Thanks @HenkvdM . I was under the presumption that the script needed to be installed within the debian choort environment. But after looking more closely at the script, I saw that it runs from the synology root itself. And it works! Awesome!

from airsonos.

HenkvdM avatar HenkvdM commented on June 14, 2024

At first I also thought it needed to run in the chroot environment But I found out you can run it from the Synology command line, that made it a lot simpler. Glad I could help.

from airsonos.

scottcawley avatar scottcawley commented on June 14, 2024

Hello all, sorry to intrude - a github newcomer, and a lot of this is completely new to me... It might not come as a surprise to you to find my question is about installing this - I've tried (and failed) to understand what I need to do to get it going. There was some talk of SynoCommunity earlier on the thread - is there any likelihood that this would end up there so an automatic, easy install would be possible? (I managed to get Plex running from the package installer there).

Hopeful thanks in advance for any guidance! This is the only thing preventing me from buying a Sonos!

from airsonos.

gering avatar gering commented on June 14, 2024

Docker is coming to Synology, perhaps it is a good idea to build a docker container?

from airsonos.

HenkvdM avatar HenkvdM commented on June 14, 2024

The Docker functionality is only avaible for the following Synology types:

Release notes:

Due to the hardware requirement, Docker will be only available on the following models:
15-series: RS815RP+, RS815+, DS3615xs, DS2415+, DS1815+, DS1515+, DS415+
14-series: RS3614xs+, RS3614RPxs, RS3614xs, RS2414+, RS2414RP+, RS814RP+, RS814+
13-series: RS10613xs+, RS3413xs+, DS2413+, DS1813+, DS1513+, DS713+
12-series: RS3412xs, RS812+, RS812RP+, RS3412RPxs, RS2212+, RS2212RP+, DS1812+, DS3612xs, DS1512+, DS412+
11-series: RS3411RPxs, RS3411xs, DS3611xs
10-series: RS810RP+, RS810+, DS1010+, DS710+

from airsonos.

mrbrown82 avatar mrbrown82 commented on June 14, 2024

Hello guys,

I'm a newcomer as well, hope to find some help. Please, bare with me, I'm not an expert.
I just got my new Sinology DS214Se and, like you, I would like to install airsonos. I followed @dejongrr tutorial. Everything goes smooth just until I issue the "npm install airsonos -g" command. I always get "segmentation fault" and I'm stucked there. If I understood it right, it means that I have a memory issue., but what is the cause? I even tried compile node js myself, but I get the same error. Can somebody point me to a fix for this? Thank you very much for your help!

from airsonos.

SteffenCL avatar SteffenCL commented on June 14, 2024

Got it running on my DS214play. Airsonos solved the biggest issue I always had with Sonos. Folks at Sonos should incorporate this into their system as they would benefit from it massively. I know so many people who are not buying Sonos equipment due to the lack of airplay support.

Anyhow, thanks stephen for the great work and dejongrr for the neat synology integration!

from airsonos.

mrbrown82 avatar mrbrown82 commented on June 14, 2024

I finally got it running too on my DS214se. Like said in my previous post I had problems running node which always gave me segfault. I tried installing node js with apt like dejongrr posted. It installs versions 0.10.29 and that version on my DS214se gives an "Invalid Instruction" error. Then I tried to install node js from the synocommunity repo, which is version 0.12.0-4 and I got Segmentation Fault. Then I tried to install the version that comes with the standard syno package manager which is v 0.10.36. It works fine, but it is useless since it can't be run from the chroot (am I right?). Then i figured that if I compiled node js (0.10.36) myself in the chroot env it had to work. After countless hours of compiling I had no luck, still segfault errors when starting node. Finally I downloaded node js from here issuing the following commands:

wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb

source: http://stackoverflow.com/questions/25540180/error-compiling-node-js-v0-10-31-for-armv7

It installs version 0.12.1. It works fine, no more segfault. I could continue through dejongrr tutorial and have airsonos working within minutes.

I'm sure i made a lot of mistakes all the way because I'm new to all of this, but I thought that sharing my trial and error experience could be helpful to somebody else.

from airsonos.

penguinhack avatar penguinhack commented on June 14, 2024

Followed @dejongrr instructions and got all the way to the second to last command: "npm install airsonos -g" getting NPM errors of "npm ERR! Please check if you have git installed and in your PATH."

So seems git is not properly installed, but I thought it gets installed as part of "apt-get install build-essential"???

How to fix this? Thanks!

ETA:

After sleeping on it, I tried installing git via: "apt-get install git" and that installed git and let me install airsonos.

I saw the same errors others had and did re-installed avahi-daemon which removed the errors.

Got to work! Thanks so much!

Have this running on xpenology on a TS140 box.

from airsonos.

LongChair avatar LongChair commented on June 14, 2024

@dejongrr @stephen : did the idea of making a package for Synology on SynoCommunity.com went away ? :)

i'm not an expert with doing this but it looks like synocommunity provides the necessary toolchain for this here : https://github.com/SynoCommunity/spksrc

I think it would be worth investigating this option because that would save a lot of the chroot hassle :)

from airsonos.

LongChair avatar LongChair commented on June 14, 2024

it looks like someone already added a request on the SynoCommunity Gihub Issues repo here SynoCommunity/spksrc#1630

Feel free to show your interest there :)

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

After a couple of problems i was able to install everything on my ds211. Airsonos finds the diferent speakers (twice?). The cursor does not come back unti i press enter.. Inunderstan thats normal?
But the real problem is that no speakera appear on my iphone or mac.
I have tried changing to andifferent nodejs but just cant. Not eventhe n command works.
Coul it be the router? What else sjould i do so airsonos works???
Thanks in advance.

Ninetheless

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

I was able to install Airsonos but neither my mac or iOS devices seem to find the sonos "airplay" speakers.

Nonetheless if i use DS AUDIO they are found and work perfectly as everything else should.

Do any of you have any idea of why this happens o how could i fix it?

Another thing i've been trying to do is change the Node versions but If i use "N" for this I get and exec binary error when i put the "N use X.10.XX airsonos" command.

Im new to this and I've been trying to install airsonos for a week already. I would probably had stop trying but being able to use DS Audio as i want makes me feel I'm pretty close.

I'd greatly appreciate any guidance.

Thanks.

from airsonos.

penguinhack avatar penguinhack commented on June 14, 2024

Are you seeing any WARNING messages when you run "airsonos &" in the terminal? Also make sure that Debian Chroot is running.

For some reason I actually have three listing for each of my Sonos speakers, might have to do with wireless and ethernet addresses for the speakers. But I do see it on my iPhone and can airplay it to them. Pick any of them will play though so hadn't bother try to troubleshoot further.

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

Hi penguinhack.

This is the output of airsonos &:

root@Disk_FPaz:/# airsonos &
[1] 31242
root@Disk_FPaz:/# *** 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-co
mpat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' wh
ich is not supported (or only supported partially) in the Apple Bonjo
ur 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-co
mpat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
Searching for Sonos devices on network...
Setting up AirSonos for Cuarto principal {192.168.1.114:1400}
Setting up AirSonos for Comedor {192.168.1.115:1400}
Setting up AirSonos for Cuarto principal {192.168.1.114:1400}
Setting up AirSonos for Comedor {192.168.1.115:1400}

I understand these are normal warnings?

from airsonos.

penguinhack avatar penguinhack commented on June 14, 2024

For the Avahi warning messages/errors please look at the previous comments and try that.
#22 (comment)
#22 (comment)

I had the same issue and did the above fix and it worked afterwards. Good luck!

DS Audio, as I understand, is pretty different. That streams music from the Synology box to your iPhone whereas AirSonos Airplays audio from your iPhone to your Sonos system. Only downside of course is Airplay just drains your iPhone :(.

Enjoy!

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

Thanks for your help @penguinhack.
I understand what the ds audio does. Ds audio also has airplay/bluetooth capabilities of the files pulled from my synology. And it is actually working just fine with airsonos. When i play something it sounds on the selected speaker right from the ds audio app (without using the sonos app). And then if i go into the sonos app it's like a radio streaming app.
On the other hand the warnings i have when i run airsonos are the same as the ones @dejongrr said where normal.
I also had the dns problems but fixed them with the dbus.restart, etc. and deleted the proc=3 line from the file he instructed.
Im almost giving up.
I actually tend to believe that it is either something with nodetunes (or nodejs) or with my network.

from airsonos.

penguinhack avatar penguinhack commented on June 14, 2024

My bad, I just checked have the same errors, but it's working.

If you see the "Setting up Airsonos for ...." should be good.

Maybe a stupid question but your iPhone does support Airplay right and same network? If you run an app like net analyzer do you see your synology and sonos speakers on the local network?

iPhone 4 or later
iPad or iPad mini
iPod touch (4th generation or later)

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

Its an iphone 6. My ipad and my imac don't see the speakers. They are all on the same network.
Airsonos finds all of the speakers. Its weird that they appear twice. After that the prompt wont go back on the terminal unless i press enter.
Regarding your other questions I can see the speakers using a couple of network analyzers.
It's really weird.
I believe that if I change Nodejs version maybe it would work. Nonetheless i have tried with the N and NVM commands and they wont work. They all give binary exec problems.
Thanks anyway!
I see very few people may be able to help.
Maybe if I post the problem outside of the synology someone might help.

On May 2, 2015, at 8:54 PM, penguinhack [email protected] wrote:

My bad, I just checked have the same errors, but it's working.

If you see the "Setting up Airsonos for ...." should be good.

Maybe a stupid question but your iPhone does support Airplay right and same network? If you run an app like net analyzer do you see your synology and sonos speakers on the local network?

iPhone 4 or later
iPad or iPad mini
iPod touch (4th generation or later)


Reply to this email directly or view it on GitHub.

from airsonos.

penguinhack avatar penguinhack commented on June 14, 2024

Does your iphone see your synology server in the local network when running the network analyzer. The airsonos server is running off the synology box so the iphone needs to see the synology box.

What verison of Nodejs are you running?

/var/packages/debian-chroot/scripts/start-stop-status chroot
nodejs --version

I show: v0.10.29

Not sure if it matters but my error comes over as:
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs

whereas yours has:
*** WARNING *** For more information see mpat?s=libdns_sd&e=nodejs>

Maybe try updating nodejs again?
Type: apt-get update
Type: apt-get upgrade
Type: apt-get install nodejs
Type: ln -s /usr/bin/nodejs /usr/bin/node

from airsonos.

DomBlack avatar DomBlack commented on June 14, 2024

If you've got a Docker compatible Synology, install the Docker package, then SSH into the Synology using; ssh root@$ip, once logged in just run this command:

docker run -d --restart=always --net="host" --name="airsonos" -p 5000-5050:5000-5050/tcp justintime/airsonos

For some reason the web interface will not let you declare the net part which is important or port ranages. Once created via the console you can manage it through the web interface

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

I have a ds211. I understand that it is not docker compatible.

Its weird.. I was able to install it. It runs, finds the speakers but they just don't show up on any device.

If i run airsonos on my imac it works. So it shouldn,t have anything to do with my network settings.

The thruth is I gave up. Maybe ill install it on a raspberry pi.

Thanks.

Sent from my iPhone

On May 30, 2015, at 6:26 AM, Dominic Black [email protected] wrote:

If you've got a Docker compatible Synology, install the Docker package, then SSH into the Synology using; ssh root@$ip, once logged in just run this command:

docker run -d --restart=always --net="host" --name="airsonos" -p 5000-5050:5000-5050/tcp justintime/airsonos

For some reason the web interface will not let you declare the net part which is important or port ranages. Once created via the console you can manage it through the web interface


Reply to this email directly or view it on GitHub.

from airsonos.

gr8m8sam avatar gr8m8sam commented on June 14, 2024

@DomBlack - Thanks mate. Works a treat and easy as...

from airsonos.

Tatster avatar Tatster commented on June 14, 2024

Hi,
Spent a couple of hours on this.
Installed everything as per instructions above.
Had to install "git" separately like penguinhack.
Removed the nproc line
Sonos speakers were discovered (in duplicate) and were displayed on iPhone.
...alas trying to play any content through them failed (just occassional blips before what i assume is buffering)
Synology CPU was fluctuating around 95-100% whenever audio was played to the Sonos speakers over airplay. I know the 413j hasn't got the greatest CPU (no floating point; 1.6GHz / 521MB RAM) and I guess this is just too much for it. 😢

More in hope than anything else I've rebooted everything and still the same.
Kudos to those that put all the code together- gutted this can't work for me.

Out of interst how does one kill the process if it was started using airsonos & short of rebooting the Diskstation?

from airsonos.

flobroed avatar flobroed commented on June 14, 2024

Hi Guys.

I followed all the suggestions (including the comments for the avahi-daemon.conf) on a DS210j. Airsonos installed fine, but the culprit is still dbus & the avahi-daemon.

I'm getting:
root@evo6_filer:/# /etc/init.d/dbus restart
[ ok ] Stopping system message bus: dbus.
[FAIL] Can't start system message bus - /proc is not mounted ... failed!

This remains even after several reinstalls & reboots. It's always the same with /proc presumably not mounted...

Any ideas for this?

Best regards


If someone else is struggling with that --> Just found the solution to this: mount -t proc none /proc in the chroot environment.

from airsonos.

Tatster avatar Tatster commented on June 14, 2024

Well done troubleshooting that flobroed.
So have you got it up and running? What's the performance like? With a 210j I wonder if you have the same performance issues as me with my 413j which has similar CPU specs and can't handle transcoding non-mp3 audio very well (at all?).

from airsonos.

flobroed avatar flobroed commented on June 14, 2024

Nope. :( Airsonos compiles, starts with Warnings, detects everything as duplicates and then just hangs... My iPhone does not discover these speakers.

Are we doing something wrong, or is this indeed broken in newer DSM / chroot versions?

root@evo6_filer:/# airsonos
*** 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...
Setting up AirSonos for Bad {192.168.0.112:1400}
Setting up AirSonos for Küche {192.168.0.116:1400}
Setting up AirSonos for Bad {192.168.0.112:1400}
Setting up AirSonos for Küche {192.168.0.116:1400}

from airsonos.

Tatster avatar Tatster commented on June 14, 2024

Hi - I get the same view as you when it runs for me. Same warnings, Speakers recognised in duplicate etc.
..and then yes it looks like it "hangs" but actually I think it's just done. It just chooses to show this with a flashing cursor where you might normally expect to see some kind of command line prompt. Maybe that's a feature of the Debian OS.

Anyway - in short I getthe same output as you see - the only difference is hat my iPhone can see the systems. I can't suggest why they don't show up on yours - don't expect to see them from the Sonos Controller app -you need to be in something like YouTube or a 3rd party audio app (eg DS Audio).

I can confirm that Airsonos does work on DSM 5.2 with the packages installed as described above. Lower-spec CPUs can't handle the transcoding required though I think. (and in the Synology j units the CPU is not a superstar. I've lso read reports that the Raspberry pi install suffers from the same problem.

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

The same happened to me. Correctly installed, airsonos running and speakers found by the application but not found by any phone or computer.

strangely DS audio worked but the speaker were not found as an airplay device. They were found as UPNP devices.

I think it was the node version but was never able to install another version.

I bought a raspberry pi 2 and installed it in less than an hour.

Sorry for not being able to help.

Sent from my iPhone

On Jul 6, 2015, at 12:35 PM, flobroed [email protected] wrote:

Nope. :( Airsonos compiles, starts with Warnings, detects everything as duplicates and then just hangs... My iPhone does not discover these speakers.

Are we doing something wrong, or is this indeed broken in newer DSM / chroot versions?

root@evo6_filer:/# airsonos
*** 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...
Setting up AirSonos for Bad {192.168.0.112:1400}
Setting up AirSonos for Küche {192.168.0.116:1400}
Setting up AirSonos for Bad {192.168.0.112:1400}
Setting up AirSonos for Küche {192.168.0.116:1400}


Reply to this email directly or view it on GitHub.

from airsonos.

Tatster avatar Tatster commented on June 14, 2024

Hi FpazHn,
No need to be sorry.
What's the performance on the raspberry like? Clear continuous streaming? Even for audio that might not necessarily be in mp3 format originally (- should that make a difference)?
Will quite happily give the pi a try if you say the quality of the streaming is good.
T

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

It is decent.
Normally Its decent. Almost no interruptions.

Lately ive been having a problem. The memory of the Raspberry gets full and the service stops (after an hour or more).

I have to restart and works fine after that.
I dont know if it is related to airsonos or something else.

I dont think the format of the source file makes a difference.

I recommend the pi.. You can do many things with it. It's a fun and inexpensive piece of hardware.

I havent overclocked the raspberry.

Sent from my iPhone

On Jul 8, 2015, at 9:51 AM, Tatster [email protected] wrote:

Hi FpazHn,
No need to be sorry.
What's the performance on the raspberry like? Clear continuous streaming? Even for audio that might not necessarily be in mp3 format originally (- should that make a difference)?
Will quite happily give the pi a try if you say the quality of the streaming is good.
T


Reply to this email directly or view it on GitHub.

from airsonos.

flobroed avatar flobroed commented on June 14, 2024

I have also repurposed my Pi (usually running Kodi) and gave it a try. After changing to an older node version (see #33) this DID work out and I was actually able to stream to the speakers, BUT

This did only work from my jailbroken 7.x iPad, not from my 8.4 iPhone. The phone did detect the speakers but was not able to connect. With the iPad it takes around 15 secons after pressing play, but then it seems to work fine.

Starting airsonos on the filer it starts well, but the speakers get never discovered on any device.

from airsonos.

mrclst avatar mrclst commented on June 14, 2024

I have the same problem. Everything is installed without any errors and after starting airsonos no speakers can be found. I have a DS212j with DSM 5.2-5592. Airsonos is 0.1.1 and Node is 0.10.29 an everything runs under debian chroot.

After starting airsonos I get the following:
*** 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...

Any suggestions?

from airsonos.

mattlima avatar mattlima commented on June 14, 2024

I had a similar problem; the dockerized version worked for me.

from airsonos.

mrclst avatar mrclst commented on June 14, 2024

dockerized version does not work on DS212j :-(

from airsonos.

mattlima avatar mattlima commented on June 14, 2024

That's odd because it's mentioned in the release notes for your OS.

from airsonos.

Tatster avatar Tatster commented on June 14, 2024

Docker isn't available for that hardware model - despite what it says on the release notes for DSM 5.2
https://www.synology.com/en-us/dsm/app_packages/Docker

from airsonos.

Tatster avatar Tatster commented on June 14, 2024

I ended up forsaking the NAS route and this evening installed on a Raspberry Pi and that works great. Followed the instructions posted by webfuz in this issue #117. Cheaper than upgrading the NAS. The j-series Synology NAS's just don't have the compute power in their processor (won't make that mistake again!)

from airsonos.

kami2011 avatar kami2011 commented on June 14, 2024

Hi, i have a problem with the installation of the airsonos from github:

root@NAS:/# npm install airsonos -g
npm ERR! git clone git://github.com/stephen/node-sonos.git undefined
npm ERR! git clone git://github.com/stephen/node-sonos.git undefined
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ENOGIT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0
root@NAS:/#

Steps before was the procedure of "dejongrr".
Can anyone help me?

from airsonos.

davidmatas avatar davidmatas commented on June 14, 2024

@kami2011 Fist of all you need to install git in your Synology: npm ERR! not found: git Take a look if the Git package is available from Package Center.

Then, probably you will also need ipkg for the build. Check what ipkg you need for your Synology model http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc

from airsonos.

kami2011 avatar kami2011 commented on June 14, 2024

@davidmatas Thank you very much for the quick response.
The PackageCenter (Community package) serves Git, but it look like the git server however i installed it and i also installed in debian chroot git "apt-get install git".

Now if i run the npm airsonos installation routine i run into a new error:
root@NAS:/# npm install airsonos -g
npm WARN engine [email protected]: wanted: {"node":"0.12.x"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN deprecated [email protected]: use serve-favicon module
npm WARN optional dep failed, continuing [email protected]

[email protected] install /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns
node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build'
CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/mdns.hpp:12:0,
from ../src/dns_sd.cpp:1:
../node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
dns_sd_bindings.target.mk:131: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 2.6.32.12
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/forge/node_modules/reactify/node_modules/react-tools/src/browser/server/tests/ReactServerRendering-test.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/forge/node_modules/reactify/node_modules/react-tools/src/browser/server/tests/ReactServerRendering-test.js
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/forge/node_modules/reactify/node_modules/react-tools/src/browser/server/tests/ReactServerRendering-test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/forge/node_modules/jshintify/node_modules/jshint/src/cli.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/forge/node_modules/jshintify/node_modules/jshint/src/cli.js
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/forge/node_modules/jshintify/node_modules/jshint/src/cli.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/airsonos/node_modules/babel/node_modules/lodash'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/airsonos/node_modules/babel/node_modules/lodash']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/airsonos/node_modules/babel/node_modules/lodash' }
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/icecast-stack/test/dumps/4EverFloyd-3-8192.mp3'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/icecast-stack/test/dumps/4EverFloyd-3-8192.mp3
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/icecast-stack/test/dumps/4EverFloyd-3-8192.mp3
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/node-forge/nodejs/ui/test.min.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/node-forge/nodejs/ui/test.min.js
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/node-forge/nodejs/ui/test.min.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame/deps/lame/configure'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame/deps/lame/configure
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/lame/deps/lame/configure
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multi_video.upload'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multi_video.upload
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/nicercast/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multi_video.upload
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/airsonos/node_modules/babel/node_modules/babel-core/browser.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32.12
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "airsonos" "-g"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/airsonos/node_modules/babel/node_modules/babel-core/browser.js
npm ERR! fstream_path /usr/local/lib/node_modules/airsonos/node_modules/babel/node_modules/babel-core/browser.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0
root@NAS:/#

I also tried to install ipkg, should i have to install some packages with ipkg ?
Thanks in advance

from airsonos.

Finariel avatar Finariel commented on June 14, 2024

Did everything intended - everything works fine except of installing Airsonos.
npm install airsonos -g leads to "Illegal Instruction" - Please Help!

from airsonos.

ben-germany avatar ben-germany commented on June 14, 2024

I have a DS214 and docker does not work on this NAS. So i need to go with debian chroot (can be installed via the packet manager of synology, included in their gui) and used the guide from dejongrr in this thread.

Most of the guide worked for me, only thing I missed in the guide was to install git. If you do not, its not possible to install airsonos via npm command. With git installed, i can install airsonos with npm command. When trying to run airsonos i got some error-messages, that my nodejs was wrong version (to old). I updated nodejs to the newest version (got it direct from nodejs)……voila…..airsonos runs with some warnings, but worked perfect.

Last thing to do was run airsonos automatically and for that i used the script from HenkvdM in this thread. Voila….everything worked now. I can reboot NAS and airsonos starts automatically and worked. Only thing u need to do was "airsonos restart" if you add some more Sonos speaker into your environment.

If you have the possibility to run docker on your NAS (e.g. you have a DS414 oder bigger NAS) I would recommend to go this way. Docker can be installed via Synology packet manager and you find a airsonos docker container have all things on board you need to run it with one click.

Thx a lot to dejongrr and HenkvdM, you did a great job !!!!

from airsonos.

FpazHn avatar FpazHn commented on June 14, 2024

I got pretty close to install it.

I was never able to update nodejs. I tried everything but it seems the compiled versions available were never compatible with the DS211.

At the end i bought a raspberry 2 and that did it for me.

Sent from my iPhone

On Jan 30, 2016, at 5:23 AM, ben-germany [email protected] wrote:

I have a DS214 and docker does not work on this NAS. So i need to go with debian chroot (can be installed via the packet manager of synology, included in their gui) and used the guide from dejongrr in this thread.

Most of the guide worked for me, only thing I missed in the guide was to install git. If you do not, its not possible to install airsonos via npm command. With git installed, i can install airsonos with npm command. When trying to run airsonos i got some error-messages, that my nodejs was wrong version (to old). I updated nodejs to the newest version (got it direct from nodejs)……voila…..airsonos runs with some warnings, but worked perfect.

Last thing to do was run airsonos automatically and for that i used the script from HenkvdM in this thread. Voila….everything worked now. I can reboot NAS and airsonos starts automatically and worked. Only thing u need to do was "airsonos restart" if you add some more Sonos speaker into your environment.

If you have the possibility to run docker on your NAS (e.g. you have a DS414 oder bigger NAS) I would recommend to go this way. Docker can be installed via Synology packet manager and you find a airsonos docker container have all things on board you need to run it with one click.

Thx a lot to dejongrr and HenkvdM, you did a great job !!!!


Reply to this email directly or view it on GitHub.

from airsonos.

ben-germany avatar ben-germany commented on June 14, 2024

Hi FpazHn,

the nodejs version which was included in debian chroot was v0.10.29 and does not work because airsonos need something > v0.12.0. So you get a lot of errors and warnings with the result airsonos does not work.

If you look into your sources.list (chroot) you will see that you can find in the section "testing" of your debian sources a newer version. (Other way: Its possible to go to the web page of node.js and you find in the download section "latest" a version 5.x.x for the arm processor which you need for the Synology NAS)

I make it short…..you need a newer nodejs and due to some dependencies to other packages like "gym" you should install newer versions. I installed 5 packages.

To see what software I have installed you can use the following command without any danger (it will not install something):

apt-get install -d nodejs/testing npm/testing node-gyp/testing nodes-dev/testing gym/testing

You will see, that e.g. for nodejs the version 4.2.4 compiled for arm cpu will be selected. And much more info. (If someone do that at later date…the version could be newer….)

Now use the command without "-d" and it will install the packages. Then you can install airsonos (you get some warnings, but thats no problem) and it should work without any problems.

I did it on raspberry before…and yes, its a little easier if you have no good knowledge about chroot. But my NAS runs 24/7 and has enough CPU power. I don't want to operate additional hardware 24/7 only for a small help, which could be done by my NAS easily.

Hope that helps and hope you get it work.

from airsonos.

Cameron82 avatar Cameron82 commented on June 14, 2024

Hi @ben-germany - i think I am getting a similar error message on the nodejs with not an up to date version. But I am struggling to update. Can you walk me through how you did this please?

from airsonos.

ben-germany avatar ben-germany commented on June 14, 2024

Hi Cameron82
have you tried the command within chroot and not busy box:
apt-get install -d nodejs/testing npm/testing node-gyp/testing nodes-dev/testing gym/testing
and if yes…what was the result?

First lines should (for node.js) look like the following:
Reading package lists… Done
Building dependency tree
Reading state information… Done
nodejs is already the newest version.
Selected version '4.2.4~dfsg-2' (Debian:testing [armhf]) for 'nodejs'
The following packages were automatically installed and are no longer required:
libc-ares-dev libc-ares2 libv8-3.14-dev libv8-3.14.5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
.

from airsonos.

Cameron82 avatar Cameron82 commented on June 14, 2024

Hi @ben-germany, thanks for the quick response. This is the read out I get...

from airsonos.

Cameron82 avatar Cameron82 commented on June 14, 2024

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Release 'testing' for 'nodejs' was not found
E: Release 'testing' for 'npm' was not found
E: Release 'testing' for 'node-gyp' was not found
E: Unable to locate package nodes-dev
E: Unable to locate package gym

from airsonos.

ben-germany avatar ben-germany commented on June 14, 2024

Cameron82, either you was not in chroot or your system looks totally different (e.g. you have other version of chroot). Sorry, i can't not help you with this information (this would end in a endless ping pong communictation), for real help i need to log in into your system. If you were not expert enough to know what to do with the information i wrote before some days I propose to ask a friend with Linux knowledge who can support you.

from airsonos.

esstheevau avatar esstheevau commented on June 14, 2024

@Cameron82, I ran into the same problems on my Synology DS715 and found a working solution for it: Without digging into it any further I assume certain DiskStation models won't install current versions of nodejs via apt-get (probably due to the Annapurna Alpine architecture they use).

However, you can build and install a current version manually:

  1. Clone the Node repository: git clone https://github.com/nodejs/node.git
  2. Checkout a release tag (e.g. git checkout tags/v0.12.9) as building from the master repo will result in issues when building libalac later
  3. Build Node:
    ./configure --prefix=/usr/local/bin
    make
    make install
  4. Install airsonos: npm install airsonos -g

from airsonos.

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.