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


I am thinking about how to add a custom command.
As a temporary way, you can overide comand(arrow) to other command slot not using or need.

this is really cool
thank you @KuKu

I am having a problem though
i published the dth’s
i published the smartapp
go into my harmony hub and find the ip address of my harmony hub
input into the smartapp and it can not be found

any ideas?

Dear rangelsammon,

I think that you did input Harmony Hub’s IP instead of ‘Harmony-api’ server’s IP.

Unfortunelly the DTH and SmartApp work with ‘Harmony-api’ API server.
So you should run ‘Harmony-api’ daemon on your server in local network.

1 Like

I’m running docker container but the harmoni-api npm crashes node after running for an hour or so with no recovery. Ideas anyone?

Dear jg506,

Would you share crash logs?
Thank you.

Here are logs.

Hub lost: Living Room at                                                                                                                             
Hub discovered: Living Room at                                                                                                                       
      throw er; // Unhandled 'error' event                                                                                                                      
Error: MAX_CLIENTS=6                                                                                                                                            
    at Connection.onStanza (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:355:17)   
    at StreamParser.<anonymous> (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:226:1
    at emitOne (events.js:77:13)                                                                                                                                
    at StreamParser.emit (events.js:169:7)                                                                                                                      
    at SaxLtx.<anonymous> (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:58:14)   
    at emitOne (events.js:77:13)                                                                                                                                
    at SaxLtx.emit (events.js:169:7)                                                                                                                            
    at SaxLtx._handleTagOpening (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:31:18)
 at SaxLtx.write (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:105:26)                                                  
    at StreamParser.write (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:123:17)  
    at Connection.onData (/usr/src/app/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:305:17)     
npm info harmony-api@2.3.4 Failed to exec start script                                                                                                          
npm ERR! Linux 3.12.6                                                                                                                                           
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"                                                                                                
npm ERR! node v4.7.0                                                                                                                                            
npm ERR! npm  v2.15.11                                                                                                                                          
npm ERR! code ELIFECYCLE                                                                                                                                        
npm ERR! harmony-api@2.3.4 start: `node app.js`                                                                                                                 
npm ERR! Exit status 1                                                                                                                                          
npm ERR!                                                                                                                                                        
npm ERR! Failed at the harmony-api@2.3.4 start script 'node app.js'.  
npm ERR! This is most likely a problem with the harmony-api package,                                                                                            
npm ERR! not with npm itself.                                                                                                                                   
npm ERR! Tell the author that this fails on your system:                                                                                                        
npm ERR!     node app.js                                                                                                                                        
npm ERR! You can get information on how to open an issue for this project with:                                                                                 
npm ERR!     npm bugs harmony-api                                                                                                                               
npm ERR! Or if that isn't available, you can get their info via:                                                                                                
npm ERR!                                                                                                                                                        
npm ERR!     npm owner ls harmony-api                                                                                                                           
npm ERR! There is likely additional logging output above.                                                                                                       
npm ERR! Please include the following file with any support request:                                                                                            
npm ERR!     /usr/src/app/npm-debug.log

So how would I invoke the custom commands associated with lets say the TV device? In actuality I’m trying to use it to control my Onkyo but the custom commands aren’t displaying in ST once I get it installed.

Do you want to see a custom command button in Thing tile ui?
Because there are many buttons in Tiles,
so I just added custom command for Automation in such as CoRE smartapp.

If you want to see a custom command button at Thing tile, I will modify DTH and update.

1 Like

I am so sorry for late response.
Although this is not a exactly same case, there are many people has been experienced with same error.

Actually now I don’t know what the root cause is.
If I find the solution, I’ll share solution with you.

Great work writing this app, I was able to get it working with my Frigidaire window AC that I have added to Harmony and I can now turn it on/off and adjust the temperature remotely. The power plug monitoring also seems to be working well to report the on/off status according to watt level.

I am having a little trouble with the UI of the aircon device that was added. The text on the various tiles are different sizes and cut off in some cases, see screenshot below. Is there something I should change in the DTH to make the tiles readable?
Also the temperature slider at the bottom does not seem to do anything. Tempup and Tempdown tiles send commands to increase/decrease the temperature by 1 degree but the slider command does not have a matching command in the smartapp. Perhaps this is for a new feature down the road? My air conditioner only has commands for single degree adjustments so this might not apply to me.

Dear plastrd,

Thank you for using this.
Hm… It seems that the string problem only occurred at the tile used character ‘\n’ be caused by some phone or font like you.
Temporally would you try changing valueTiles’s label using ‘\n’ in “KuKu Harmony Aircon” DTH.
=> I uploaded changed DTH, please update DTH from repository.

And temperature slider function needs temperature command in the Harmony device command.
Almost default Harmony’s air conditioner device does not have 18~30 temperature commands.

If there is a function of learning command at Harmony Remote controller,
you need to teach that temperature commands to air conditioner device through Harmony Settings.
If there is not that function in your Harmony Remote controller, I am sorry that you could not using temperature slider.

In my air conditioner case I use, if I push the ‘^’ (temperature up button),
my LG air conditioner remote controller send the temperature value showed at Remote controller display.

For example,

  1. 18 degree displayed at remote controller display
  2. push temperature up button
  3. remote controller send 19 degree command
    (At that time I teach 19 degree command to Harmony Remote controller through ‘adding custom command’ in Harmony Device Setting. And need to repeat teaching 20, 21, 22 and so on command your air conditioner support)

Is it possible to install the harmony api on a qnap nas server? If so, anyone who can share some knowledge? Thanks…

I updated my DTH from the repository and the labels are completely readable now, thank you.

In my air conditioner case I use, if I push the ‘^’ (temperature up button),
my LG air conditioner remote controller send the temperature value showed at Remote controller display.

I didn’t realize this was how this worked but it is a neat feature. My Frigidaire window mounted unit only has a very simple remote with up/down buttons for temperature and fan speed so I won’t be able to take advantage of it. The rest of the buttons in the DTH work though so now I can at least ask my Google Home to turn on the AC via IR command instead of switching the power plug on/off (which confuses the wife when the remote doesn’t work).

I do that using QNAP container station, and the container described above. The only change form default config is setting network mode as Host instead of NAT.

Hi KuKu,

I’m using your great SmartApp without issue. Unfortunately I’ve had to move my Harmony-API server and was wondering if there is anyway to edit the existing set ups IP address? If not I guess I’ll have to do it the long way around.


Dear AndyWak,

Thank you for using my SmartApp.
I upload temporal update version for you.(v0.1.5.103).
But you need some effort to adapt this.
(Actually I am thinking how to fix this.)

Please follow below step.

  1. (PC) Update from repo SmartApp (v0.1.5.103)
  2. (PC) Enter the ST IDE site -> ‘My Smartapps’ menu -> ‘KuKu Harmony’ source
  3. (PC) Find below source and change source and ‘Save’ and ‘Publish’

    if (_!_atomicState?.isInstalled) {


    if (atomicState?.isInstalled) {
  4. (Mobile) Enter SmartThings application -> Automation -> SmartApps -> ‘KuKu Harmony’
  5. (Mobile) Change Server IP address you want to change and ‘Done’
  6. (PC) Revert changed source at No.3 and ‘Save’ and ‘Publish’

    if (atomicState?.isInstalled) {


    if (_!_atomicState?.isInstalled) {
  7. Test controlling exist Harmony device using SmartThings Thing.

If you have a problem or question, please let me know.

1 Like

Hi KuKu,

Ooops! Followed your instructions to the point where I realised I must have missed a previous update along the way. I’m still using the original split parent and child apps! Is there a way to migrate or will I need to set up again?


Hi KuKu,

All up and running on new version. Took the long way round and set everything up again from scratch. Thanks for you help and app.


Hi AnyWak,

I am sorry that I could not help you from boring re-setup.
I know that the setup is so tired and bored.

I hope that ‘KuKuHarmony’ helps your smart home life.

Thank you.

1 Like

Hey, no problem. I read this thread again and found the bit I missed when the parent and child apps were replaced so all in all I think it was best to start from scratch.