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

Hello,

You did goooooooood job~~~
I think also that the Window desktop server is not proper to IoT daemon server.
Have a good IoT Life~~~

1 Like

Ive never used docker but I am familiar with the raspberry pi. I was expecting an image to place on a SD card but the instructions show two commands to download the docker image, does that mean raspbain or something needs to be installed as a base image?

Yes, that is correct. I bought this kit and followed the instructions that come with it to get the system up and running. Then, you open a terminal window, install docker (I used these instructions to do that - go down the page until you get to “Start the Docker installer” and go from there) and then follow the instructions at the top of this page to install the harmony-api.

You need to make the ip address of the Raspberry Pi box static because you have to the enter it in the SmartThings SmartApp.

I am still trying to figure out how stable everything is. I had to restart the harmony-api today because it seemed to stall out last night. Not sure what that was about.

3 Likes

Thanks for all the info! Im up and running. Thanks @KuKu for the awesome app and DTH!

1 Like

Hello,

You’re welcome.
It’s all thanks to Jon Maddox.

Great Job!

Wanted to try this out but I am already lost…

I have a Pi3

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

I am already hosting three apps and want to add the Harmony API. The instructions assume I have half a brain but in reality…Did a little reading on Docker but it seems like this is almost like an OS system and I would loose my other 3 apps running on the Pi3?..

Please explain the following:

[ARM Platform]

  1. Pre-build Docker image for Raspberry-pie platform
    • Download Image (where is the image? is it the package “harmony-api-master”?)
      docker search turlvo/harmony-api (I am assuming these are command scripts?)
      docker pull turlvo/harmony-api

    • Make a container and run (Not sure if this is supposed to be done on my PC or the Pi3…)
      docker run -ti --net=host --name harmony-api turlvo/harmony-api:latest /home/harmony-api/harmony-api/script/server
      (If harmony-api’s container is exit by before step, just start a container using ‘docker start’ command)

Thanks in advance for any help offered.

This helped me! The instructions also said something about a child app, but I do not see a child app in teh github…

I believe the updated version did away with the need for a Child App.

These were the steps that worked for me:

  • Raspberry Pi3 Installation
  1. Install RASPBIAN STRETCH WITH DESKTOP on raspberry pi3
  2. Enable docker on raspbian with terminal command “curl -sSL https://get.docker.com | sh”
  3. Download docker image with terminal command “docker search turlvo/harmony-api” and “docker pull turlvo/harmony-api”
  4. Start docker and docker image with command “docker start docker run -ti --net=host --name harmony-api turlvo/harmony-api:latest /home/harmony-api/harmony-api/script/server”

Follow kuku’s directions for the rest:

  • SmartThings IDE(Installation)
  1. Add ‘KuKu Harmony’ DTH (Default/TV/Roboking/Aircon/Fan)
    and add ‘KuKu Harmony (Connect)’
  2. Publish ‘KuKu Harmony’ DTH and ‘KuKu Harmony (Connect)’ SmartApp for me
  3. ‘Automation’ -> ‘SmartApps’ -> ‘Add a SmartApp’ -> ‘My SmartApp’ -> Select ‘KuKu Harmony’
  4. Input Raspberry Pi server’s private IP address where ‘Harmony API’ is installed (ex. 192.168.1.210:8282)
  • SmartThings Mobile App(Configuration)
  1. ‘Automation’ -> ‘SmartApps’ -> ‘KuKu Harmony’
  2. ‘Add a device…’ and select a hub
  3. Select a device to add
  4. Select a Device Type
  5. Select commands
4 Likes

Hello @rontalley,

If port number already using in your Rasp is not same with harmony API(8282),
I think that there is no problem to add the Harmony API.
But you’d better backup whole Rasp system.

[ARM Platform]

Pre-build Docker image for Raspberry-pie platform
Download Image (where is the image? is it the package “harmony-api-master”?)
docker search turlvo/harmony-api (I am assuming these are command scripts?)
docker pull turlvo/harmony-api
==> You’re right. You can download by installing docker daemon and docker’s command.
Just install docker and type that command ‘docker pull turlvo/harmony-api’

Make a container and run (Not sure if this is supposed to be done on my PC or the Pi3…)
==> After download the docker image on Pi3, run command on Pi3 also.

docker run -ti --net=host --name harmony-api turlvo/harmony-api:latest /home/harmony-api/harmony-api/script/server
(If harmony-api’s container is exit by before step, just start a container using ‘docker start’ command)

Thank you.

2 Likes

Yes, updated version include Parent app and Child App

1 Like

Got it up and running. Thanks a lot!

1 Like

@rontalley

You did!!! Have a Good IoT life~~~

1 Like

I found this thread and can’t wait to try it out when I get home. I’m on the road so I can’t get to my Pi but will be home soon. One question is whether this will play nice with an existing Apache web server that is running on the same Pi. I use that to operate my HousePanel tablet app and would ideally want to use the same rPi to also run this harmony-api web service.

By the way, I tried installing docker on windows and installing on my laptop and I couldn’t get that to work at all. Docker is installed and working fine but the pull of the docker image doesn’t work. Has anyone else done this on a windows docker install successfully?

Hello,

I think that your machine’s platform is x86.
If that, you should use ‘jonmaddox/harmony-api’ docker image.
https://hub.docker.com/r/jonmaddox/harmony-api/~/dockerfile/

Please share ‘docker pull’ command error log.

I tried unsuccessfully to get it to work in Windows and then bought the Pi and went that route.

I have been running the harmony api on the Raspberry Pi for a few weeks now. It is wonderful when it works, but I am finding that every couple of days, it quits working. I have to stop the api, remove the container and reload the command to create it. Then it starts working again, until it stops a few days later. Is there anyway to fix this problem, like some sort of a monitor that reloads the program if it stops working?

I havent tried it myself but you could give this a try: https://docs.docker.com/engine/admin/start-containers-automatically/

It should restart your docker image when an error occurs (if an error is given…)

Thanks for the info. I am not sure it would fix the problem because it seems when it quits working the container is still working, as I have to stop and remove it before restarting the process. But I will look at it further.

The other item I would like to be able to automate is that whenever the PI is rebooted that the Harmony API process automatically starts up. So, if anyone can point me to how to do that, I would appreciate it.