[OBSOLETE] KuKuHarmony - DTH and SmartApp that support to control devices in Logitech Harmony(using Harmony-API)

Looks like you are good to go. Just install the smart app in ST and then point it to your Pi’s IP address and use port 8282.

You did well padwan. lol

1 Like

Already done. Do you have a Paypal account? I’d like to at least buy you a cold one.

1 Like

No need mate. I’m happy just to help. I appreciate the offer though. Message me if you ever need more help and have fun with this one. I’ve got all my devices hooked up through it… SO much better than the stock integration.

1 Like

or something from Starbucks

Will do. Understood

Hello, was hoping you could help me. I was able to get the Sonos API up and running the other day with Node.js, but this is a whole other animal and I dont’ have a clue. I have docker installed, but really don’t know what do do from there. I saw this post above and figured you could get me going?

@Core_Phx can you assist?

has anyone gotten this to run on windows via docker? From what I have read in the thread there have been a few attempts but most have given up and used a Pi.

Sorry, I’m a Noob to this also. I would email Core_Phx. He is the expert
that helped me with my setup.

1 Like

I am trying to get docker running with on luck.

Which docker image are you running? Kuku’s or jonmaddox?

Kuku’s is targeted for the Pi. I had to run jonmaddox’s on a Synology NAS docker container for it to actual run and not fail on startup. After that it was fine (had to also use host networking)

1 Like

I’ve not seen anyone get it successfully running via Docker on Windows. The docker images (both KuKu’s and Maddox’s) should ONLY be run on Mac or Linux, IMHO.

With that said, there are some options, with the easiest being a Linux VM. This one is the easiest because you can run a small Linux VM (1 CPU/2GB RAM/40GB drive) on pretty much any machine built within the last 10 years using something like VirtualBox (free) with minimal impact to the host machine. Once you have that setup, you can install node.js and run tons of stuff on it.

I’ve also successfully gotten it to run under cygwin for Windows (and for those on Windows 10, the Linux Subsystem for Windows). However, it wasn’t nearly as stable as I hoped it would be (node kept crashing out on a high number of requests and the host-bridge networking is craptastic to say the least).

For those on Windows, my suggestion would be to run a small, Ubuntu server (16.04 LTS) in a VM and run it there.

2 Likes

I havent installed a docker image yet, but it seems that or a vm are the only options right now. I’’ give the VM a shot since it should be quick and easy but the media server I was hoping to host this on is only a 4 core atom.

Do you think it would run on lubuntu? Ive used it before for old arcade machines, its a great low overhead version of linux.

Edit: I went ahead and installed ubuntu server, once I thought about it I dont need a gui.

I’d be glad to help! I would avoid docker. Just additional overhead that isn’t really needed if you already have node.js running on your machine. If you have to use docker, then make sure you are on a Mac or Linux system. It looks a lot more complicated than it really is for a pure node.js install, but once you have it setup, you are set for life. These instructions should work even if you already have node.js running on your system.

@KuKu: I’ll be packaging these up for you to include in the first post. :slight_smile:

Here are the steps needed for getting it running on node.js (using an Ubuntu/Debian/Pi based system):

Step 1: I cannot stress this enough: You should ALWAYS be running the latest, stable version of node.js Installing Node.js via package manager | Node.js

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install --install-recommends -y git

Step 2: Update NPM to the latest version (the Pi sometimes has issues with installing the latest version on npm):

sudo npm install -g npm ← this one may take a few minutes to run

Step 3: Install Forever (required by Maddox’s scripts):

sudo npm install forever -g --save

Step 4: (From Maddox’s own docs: “On some distros, you might get an error when running it: /usr/bin/node: No such file or directory That can be fixed by creating a symlink”). I recommend doing this anyway. It doesn’t hurt anything and makes sure that node.js is set up universally.

NOTE: There is a bug in the editor here that doesn’t allow for the grave accent character to show up for some reason. You need to put that character (the one above the TAB key) around “which nodejs”.

sudo ln -s which nodejs /usr/bin/node

Step 5: To install the actual files, I prefer to use /opt as a point for all software installs (it’s the old sysadmin in me), but you can put them anywhere you want. My instructions assume you are using /opt, but if not, change /opt to be whatever base directory you choose.

cd /opt
git clone https://github.com/maddox/harmony-api.git2
cd harmony-api
sudo script/bootstrap
sudo script/install-linux

Step 6: You can run it a few different ways:

  1. script/server (this will run it in a command line, debug mode; Good for testing)
  2. forever app.js
  3. (If on Linux): sudo systemctl start harmoni-api (if you ran sudo script/install-linux from above).

Step 7: Finally, test it in a browser: “http://[your server ip]:8282”. You should see the following:

Step 8: profit!

5 Likes

Yup, lbuntu should be fine. I prefer Server, but that’s just because I’m old and can get around a terminal 10x faster than a UI. :wink:

EDIT: You might also want to try a distro like Arch or Puppy as well. Arch instructions are only different in terms of the package manager (see my post above), but Arch is a friggin’ CHAMP when it comes to low resource systems. I’ve only dealt with Puppy a few times, but it’s been tweaked to run really well in embedded systems, so it’s also worth mentioning.

1 Like

Thanks for the vote of confidence. :grinning:

So this will all work on windows? Reason I am asking is because I tried using sudo on windows yesterday and it does not like the command.

Ish? If you can install the Linux Subsystem for Windows on Windows 10: https://docs.microsoft.com/en-us/windows/wsl/install-win10, then you can run it in a Bash shell. But, I’ve not had good success there. I’ve gotten it to install and run, but stability is a big issue, plus, we’re talking about running a service that you really want running 24x7. You can also try using cygwin, but that was also much more complicated and not very stable.

If you can, I’d recommend going the virtual machine route. You can run a small VM in Virtualbox (for free, btw) and use a distro like lubuntu, Arch, or Puppy and have far better stability than you can with Bash on Windows. Most of those run in less than 2GB of RAM and can use a single CPU for processing. Even better is that if you have an old computer laying around (or can get one from like Goodwill or some other cheap second-hand store), you have a Linux server you can run and do TONS of stuff with. Seriously, I cannot recommend this option enough. I’ll try not to drone on, but the amount of stuff you can do with a home Linux server is amazing.

ok, this is getting way way more complicated than I thought. Like I mentioned earlier I got the sonos api up and running in 2 min and works perfect, I think I might bow out on this one.

1 Like

Yeah, I agree… But, we can honestly thank Harmony for that one. I don’t think there is a single project of their’s that hasn’t been overly complicated.

With that said, is the sonos api running under node.js natively on Windows or are you running a docker image of it?