SmartThings Community

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

smartapp_av
harmony
dth_av
requires_server
project_av

#1

Hello,
I made small SmartApp and DTH. If you need, just test and give me a advice.

—UPDATE—
5/16/2017 - support multiple Harmony-hub(v0.1.5.000)
5/22/2017 - added SmartPlug’s power monitoring to synchronize device state
8/30/2017 - added Harmony API server’s IP changing menu and Contact Sensor monitoring mode to synchronize device state

KuKuHarmony

KuKuHarmony is a SmartApp give users the ability to control each device by Logitech Harmony.
It works based on ‘Harmony API

With KuKuHarmony based on ‘Harmony API’, you can turn on and turn off devices individually.
The device’s other commands are also support.

  • ex) volume up/down, channel up/down, FanSpeed, Menu and so on

Features

  • Provide a device’s Virtual device
  • List Hubs
  • List Devices
  • List Commands
  • Turn on/off each device(not a activity)
  • Control other commands also
  • Multiple Hubs
  • State synchronization by Smart Plugs power or Contact Sensors state

Setup

[English]

  • Server Work
  1. Download docker image and run contrainer

    [X86 Platform]

    Install ‘Harmony API’ on server following Harmony API’s install instruction
    https://github.com/maddox/harmony-api

    OR

    [ARM Platform]

    Pre-build Docker image for Raspberry-pie platform

    • Download Image
      docker search turlvo/harmony-api
      docker pull turlvo/harmony-api

    • Make a container and run
      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)

    • Make a container restarting when rebooting

        # sudo vim /etc/systemd/system/harmony-api.service
    
        <harmony-api.service File content>
        -----------------------------------------------------------------------------            
        [Unit]
        Description=Harmony API container
        Requires=docker.service
        After=docker.service
    
        [Service]
        Restart=always
        ExecStart=/usr/bin/docker start -a harmony-api
        ExecStop=/usr/bin/docker stop -t 2 harmony-api
    
        [Install]
        WantedBy=multi-user.target
        -----------------------------------------------------------------------------
    
        # sudo systemctl enable /etc/systemd/system/harmony-api.service
    
  • Web IDE Work
  1. Add ‘KuKu Harmony’ DTH (Default/TV/Roboking/Aircon/Fan) and add ‘KuKu Harmony’ SmartApp
  2. Publish ‘KuKu Harmony’ DTH and ‘KuKu Harmony’ SmartApp for me
  • SmartThings Application Work(Installation)
  1. ‘Automation’ -> ‘SmartApps’ -> ‘Add a SmartApp’ -> ‘My SmartApp’ -> Select ‘KuKu Harmony’
    (If you are using an older version, you need to remove ‘KuKu Harmony (Connect)’ and ‘KuKu Harmony (Child)’.)
  2. Input server’s private IP address ‘Harmony API’ is installed (ex. 192.168.1.210:8282) and Save
  • SmartThings Application Work(Configuration)
  1. ‘Automation’ -> ‘SmartApps’ -> ‘KuKu Harmony’
  2. ‘Add a device…’ and select a hub and device
  3. Select a Device type
  4. Select a Commands and ‘Save’ and check added device
  5. Check added Thing’s tile and detail

[Korean]
Following below blog’s instruction.

-First Install: http://kuku.pe.kr/?p=6313

-Update v0.1.4: http://kuku.pe.kr/?p=6388

-Update v0.1.5: http://kuku.pe.kr/?p=6616

-‘Harmony API’ Server Auto Start(Rasp): http://kuku.pe.kr/?p=6440

-‘Harmony API’ Server Auto Start(Synology): http://kuku.pe.kr/?p=6584


Ability to send commands to harmony hub?
Harmony Elite Hub Power Off button and SmartThings
[RELEASE] Yamaha Network Receiver Basic Integration
Ring Video Doorbell
Turn off lights when playing media on Apple TV
Tapping into Harmony device control s
Setup SmartThings and Harmony Play/Pause/Stop Buttons For Lights using EventGhost on a Windows
[RELEASE] cast-web 1.0.0 - Chromecast Device Handler & SmartApps
Adding a IR-controlled light to SmartThings?
Digital Speaker Selector under $200?
Send an IR command programmatically from Harmony?
What do I need to turn a tv on/off
webCoRE - Volume up or down with harmony hub?
Honeywell fan with Harmony SmartThings and Alexa
Honeywell fan with Harmony SmartThings and Alexa
Home theater build
Harmony + Honeywell Evohome control
Harmony / Eventghost
IR commands to Smartthings. Possible? (ex:use TV remote to turn off lights)
Please help! Can't connect Samsung TV ks8000 to SmartThings hub
(Jordon) #2

So if im reading this correctly this allows me to control devices that my harmony hub is connected to. So say its connected to my fire stick, I can control it with smart things?
If so does is make a device for it as well?


#3

Does fire stick be controlled by Harmony Hub through IrDA or Bluetooth?
(The question means that if Harmony Hub can control fire stick, SmartThings’s Thing also control fire stick._
If that, Yes it is.

This SmartApp create a SmartThings Virtual Device Thing and
that support to control all devices that connected to Harmony hub.

If added a new Device Type DTH, it maybe support almost all command that stored in Harmony Hub’s device.
I made a 6 default Device Type’s DTH.
ex) default(on/off only), airconditioner, fan, robotking, TV, STB
(In your case such as fire stick, it seems that TV or STB Device Type proper to you.)

So if somebody want to other device’s type DTH, I will update that.

  • below control flow
    Vritual Device Thing in SmartThings -> ‘Harmony-API’ server -> Harmony-Hub – [IrDA or Bluetooth] -> Device

(Andy) #4

Just tried this out briefly. Very good, all works OK so far.

I had the Harmony API server already set up and had done a very basic version of what this SmartApp does, but KuKuHarmony does it a lot better. If your Harmony hub is controlling your devices via itself, the IR blasters or bluetooth (it won’t control devices via the remote itself, commands must go through the hub) then this app can access device actions not just the Activities.

Edit: Being able to mix devices into one DTH would be handy though as, in my case, different media actions are controlled by different devices, i.e. Sat Box for Menu/Guide button and Amp for Volume etc. That said, all I did was some http buttons so your work is far more refined. :slight_smile:


#5

What a surprise your quick adapting capability.
The Logitech should support this function officially.
Until Logitech support this officially, I hope that it is helpful to other people using Harmony Hub and SmartThings.

I also have a idea that user can add a button and made a custom DTH.
Thank you for your report.


(Andy) #6

Logitech should do a lot of things, like keep on top of firmware bugs for instance.

I think in the meantime this will be a popular alternative if you’ve got somewhere to run the API server. I was lucky having a Synology NAS with the Docker app so set up was literally a few clicks.


#8

Hello,

I found that Synology supports Docker Application T.T
Although I tried to run harmony-api server through Synology Docker with jonmaddox/harmony-api docker image,
it looks like that can not find Harmony-hub.

Please let me know how to do that.
Thank you


(Andy) #9

Well like I said, a few clicks to set up, all I did was pull down jonmaddox/harmony-api docker image, then created a container with it, must be set for host network access, ran it and it found my hub, that’s it really. go to the ip and port address to confirm api is running. Also the terminal will show it updating periodically too.


(Ron Talley) #10

This is Awesome! Does it support multiple Hubs? I have 3.

Thanks!


#11

I think this symptom related to 'must be set for host network access’
I could not found that menu.
Where can I found that menu?


#12

Hello,

Hm…
I am sorry that it only can install one hub …
I’ll try to support multiple hub.


(Ron Talley) #13

But if you have multiple, you choose which one to install?


#14

Yes.
If there are many harmony hubs in local network,
user can select one hub to install and use.


#15

I resolve this problem.
It related to the Synology’s Docker version.

In my old Docker appliction, there is no option you mentioned.
After update Docker application, I can enable that option and also found my hub.

Thank you.


#16

Multiple harmony hubs is the holy grail.


(Andy) #17

Sorry I was distracted with some soldering for a bit. Glad you got it sorted on the Synology Docker, that must’ve have been a very old version you were using.


(Jg506) #18

I second that. Either way thanks @KuKu for creating and sharing a long desired solution for controlling devices


#19

Thank you for your interest.
Through people’s comment, I realize that there are many people using multiple harmony hub.

So, I am thinking how to change this.
I’ll be back.


#20

Hello,

I updated ‘KuKu Harmony’ for supporting multiple ‘Harmony’ hubs.

To apply new version, needs to remove an older smartapp versions.


(Jg506) #21

Quick question: How to “control other commands”? Specifically I’d like add that arrow commands to TV