-
Notifications
You must be signed in to change notification settings - Fork 252
airsonos on Synology #22
Comments
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: Let me know how it goes and we can documents steps for others to use. |
@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. |
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:
Now, in theory we should have access to chroot and therefor have access to
This works. But running Perhaps others can give some tips to extend these steps a bit further? |
@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
gyp ERR! configure error etc. etc. Any help would be very appreciated! |
@dejongrr - I believe node-gyp requires python installed in order to build some packages |
I took a look at: https://github.com/TooTallNate/node-gyp/ DiskStation> npm config set python /volume1/@appstore/python/bin/python2.7 After some minutes I got the following:
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.30"
gyp ERR! UNCAUGHT EXCEPTION /volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8
gyp ERR! UNCAUGHT EXCEPTION /volume1/@appstore/Node.js/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:8
Btw, I used a node.js package for my ds214play (evansport): Node.js-evansport-0.10.29-0003 |
@dejongrr try running the npm command with sudo or as root. |
I am connected to my Synology with SSH using root@DiskStation.local, 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? |
is make in your path? |
I used: apt-get install build-essential |
@dejongrr - Can you verify that make can be found? ( 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 |
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:
Do only error I get now is: I googled around a bit and don't think it will cause any issues. |
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. |
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. |
@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? |
Don't know when the issue started, but I'm getting the following error:
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:
|
I think the One thing you might be able to try is doing a rebuild (or perhaps uninstalling/installing) if the bindings no longer match up. |
Reinstall of the debian-chroot package did the trick! Here is an update of the steps I took:
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 |
@stephen - Does airsonos even have start and stop arguments? otherwise that would be a nice feature, in addition to a refresh or something. |
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. |
@dejongrr - no, but adding support for library-like usage would make sense. Could open an issue or PR for it. |
@pcr23 - I might have forgotten to add that to the instructions, but this should fix it:
|
Thank you very much for the help and the info, @dejongrr. Greatly appreciated. |
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. |
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= |
@RustyDust That did the trick. Thanks! |
Hello, Error: dns service error: unknown Any suggestions what I can do about it? With thanks, |
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 and I get this: *** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi. Error: dns service error: unknown Let me know if you want me to troubleshoot anything. |
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: Any suggestions? |
I had a similar problem; the dockerized version worked for me. |
dockerized version does not work on DS212j :-( |
That's odd because it's mentioned in the release notes for your OS. |
Docker isn't available for that hardware model - despite what it says on the release notes for DSM 5.2 |
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!) |
Hi, i have a problem with the installation of the airsonos from github: root@NAS:/# npm install airsonos -g npm ERR! System Linux 2.6.32.12 Steps before was the procedure of "dejongrr". |
@kami2011 Fist of all you need to install git in your Synology: Then, probably you will also need |
@davidmatas Thank you very much for the quick response. Now if i run the npm airsonos installation routine i run into a new error:
make: Entering directory '/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/mdns/build' 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! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 npm ERR! System Linux 2.6.32.12 I also tried to install ipkg, should i have to install some packages with ipkg ? |
Did everything intended - everything works fine except of installing Airsonos. |
In the end I got Airsonos working on my NAS just through docker, using:
|
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 !!!! |
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
|
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. |
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? |
Hi Cameron82 First lines should (for node.js) look like the following: |
Hi @ben-germany, thanks for the quick response. This is the read out I get... |
Reading package lists... Done |
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. |
@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:
|
Despite following all of the instructions above, I still do not have access to apt-get. I.e. when I type in apt-get update I get the "Illegal instruction" error. I have tried adding all sorts of stable and unstable mirrors to the sources file, however this has not fixed the problem. Any ideas? @Finariel Were you able to fix your problem? |
I had issues with this setup and while I got it partially working, I ended forgetting about it. I decided to check back in and saw a solution using Docker, which my NAS supports. I was able to gracefully install using the command in @bjeanes's post but noticed under the logs that it hangs on Searching for sonos devices. It will never find any devices. I did a little digging and found that it could be an issue with the sonos.js file and it utilizing multicast. I tried adjusting the settings to reflect that of my subnet's broadcast address, despite confirming that multicast works just fine on my network, and it resulted in the same thing. Does anyone have suggestions? Any help appreciated! |
Is this working yet on Synology? Greetings! Ive got my 2 Sonos play 5's, I want to use my sonos as output source.. wirelessly.. What do I need? ^^ |
@mettix SSH into it and run the command in #22 (comment) |
Hey @HenkvdM , I'm trying to use your startup script to run Homebridge on autostart on the synology (just changed all the airsonos references to home bridge) but i cant seem to get it to startup. how can I run and confirm that the script worked? I installed the script but when I reboot the system my home bridge doesnt seem to be working. (fyi home bridge is an apple home kit emulator) Thanks! |
After considerable fighting, I did manage to get Airsonos installed on my Synology, however I'm getting some error output when I run the daemon. See below:
Sonos players on the network never do enumerate. This is in Debian Chroot, but I'm guessing that some differences between systems probably related to dependent package/library updates is the culprit. Any other ideas? |
I got it to work! Hurra! |
I just got this running on a DS214+ running DSM6.1 after a couple hours of trial and error. I generally followed @dejongrr 's instructions (thank you!). I wasn't being particularly scientific, and installed nodejs from the Synology Community repository as well as through apt-get. I think I also had to install git separately through apt-get. I received a few install errors about dependencies, but npm launched and I can now stream to my Sonos. One note--I had to tweak @HenkvdM 's script because, for whatever reason, my location for airsonos is /usr/bin/airsonos, not /usr/local/bin/airsonos. I also had to rename the script to something other than airsonos.sh, as the pkill command in the restart argument would kill the script half-way through completion (after stopping the service but before restarting it). Finally, I was having some issues where the script was running at boot too early in the process and was throwing errors, so I added a 2 minute sleep timer to it (1 minute wasn't enough) that only runs on the start argument. I have this setup in Task Manager to run at boot using the start argument (although perhaps it's running automatically because of its location in /usr/local/etc/rc.d/ -- I'm not sure, but I can confirm that it works. I also have it setup to run once a day to restart the airsonos process in case the daemon dies. The service was a little flaky this morning (it played for 2 minutes then crashed), but it has been running without issue the last couple of hours. Here's the script as modified (many thanks for the original):
P.S. If you don't know vi very well, this is a great cheat sheet: http://www.lagmonster.org/docs/vi.html |
I did like @narganf, but needed to install Git & Python 2.7 manually. Thank you guys! |
A great tool, I enjoy day by day, but the mac needs to run all the time.
My Synology is running 24/7, so why not running there?
as node.js can be installed on the synology, can airsonos run on that one as well?
The text was updated successfully, but these errors were encountered: