Control your Harmony Hub with a Raspberry Pi (Linux)
Published: 15.01.2016 00:00:00
So my surveillance cam now only records when I am not at home. But what if I forget to turn off the TV? That should happen automaticly, too! But fear not: There is a solution - at least if you own a harmony hub. With the help of the “HarmonyHubControl” - tool (written in c++) this is done quite easily.
First of all you need to put the source onto the Raspberry. Don’t be afraid. No rocket science here. All needed tools should be already on your Linux distribution. The easiest way would be to clone the source via git:
git clone git://git.code.sf.net/p/harmonyhubcontrol/code harmonyhubcontrol-code
If you prefer you may - of course - also use the long way and download those files in a zip file.
Now after you have the source code on your Pi you have to compile it. Done with ease. Just a single
and you created the file “HarmonyHubControl” in that directory. Now all you need to know is the IP-address from your hub. You usually can find it in your WiFi-Router under the name “HarmonyHub”
Let’s try if the connection works:
./HarmonyHubControl \[Login\] \[Password\] \[Ip\]
Warning! Double-check your password. If you enter a wrong one, you can still stert the activities, but on the next login in your “MyHarmony”-application you will be thrown out for a while. Don’t ask why this works this way. Better ask Logitech instead.
So let’s list all activities:
./HarmonyHubControl \[Login\] \[Password\] \[Ip\] list\_activies
./HarmonyHubControl \[Login\] \[Password\] \[Ip\] start\_activity 15231836
does start the FireTV in my case,
./HarmonyHubControl \[Login\] \[Password\] \[Ip\] start\_activity -1
does shut em all down.