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

I don’t see the projector in webcore. In my example, Harmony Test is a virtual switch as my projector so I can make webcore send the OFF command twice (I used 3 in my test just in case it gets sent too fast).

Maybe there is a better way to do this, I’m just experimenting at the moment.

In my head, it would be even better if @KuKu would add an optional field where we can enter an integer representing the amount of command repetition. :slight_smile:

Gotcha, yeah I think if you added the device that the Kuku app created to webcore then you could control it with the devices presets. I didnt know it could be done with a web request until I saw your post, thats good to know!

1 Like

Hah! With the hint you provided I went back and added the projector into WC and now I have a virtualOff() available, it looks like it can take a parameter also so I will give that a shot later!

Thanks for the pointer!

image

You can just send the command multiple times.

Few questions: just curious why there’s so few device types because in order to access the features of many of my devices I’ve got to choose tv, but not sure if I should or should not be doing that. Additionally I’m curious if and how you can use voice control for these devices created. For example I’ve got my X1 cable box created (used tv as device type to access all buttons on remote) and wondering if there’s a way I can get Alexa to access those additional buttons such as DVR, menu or XFINITY button.

Is there a way to do the following…

My AV has a Zone 2. I can use an activity to turn on the AVR but I need to use the remote to adjust zone 2 volume (and turn off main zone).

I have zone 2 (on /off) and volume up /down in kuku as custom. I don’t see how I can use it to turn it on a specific volume level.

Turn on Zone 2, turn off main zone. Turn zone 2 volume to 65.

You can set it in the Harmony activity itself, but I don’t believe that you can do it though the DTH or smartapp though. I have to do the same thing with my equipment (change input on the TV and change the zone on my AV unit). What SUCKS is that Harmony doesn’t allow you to set the volume to a specified level. So, in mine, I have it mute it. That way, when it turns on, it doesn’t blast my eardrums out.

Yea I can’t even get to the volume option on zone 2 without using the remote

Edit - even just being able to turn zone 2 on and off and main zone on and off would be enough.

Man! This seems like it is exactly what I want (or need).

Just one question. Does the server need to be on the same network as the Harmony?

@KuKu Hello! Thanks for putting this smart app together! I set things up this weekend without any major issues. However, I was unable to accomplish what I set out to do as the app does not appear to expose all of Harmony’s devices, specifically the lights. See attached screenshots showing Harmony App device list and Smartthings KuKu smartapp list of exposed Harmony devices.


Is there something in the config that I am missing? I have several emulated hue devices that I can’t get into Smartthings natively that Harmony can detect and control without issue (Airfoil speakers exposed as dimmable lights). I was hoping to use the KuKu smartapp as a round about way of gaining Smartthings control of these items. Any help would be greatly appreciated.

Hello

Looking for some assistance. I have the harmony-api running on an Ubuntu system (docker container) and it seems to work fine but every so often it seems like it goes to sleep. I can still see the web page on port 8282 and the IDE live log shows commands as being issued but nothing is happen on the end device. For the life of me I cannot find where the Harmony-api stores log files. The documentation mentions log/log.log but I am unclear on where that is and am unable locate it. Any suggestions on where to look for causes of this issue would be appreciated.

Here is output from the IDE live log when I send a power off command to some IR controlled candles:

7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug sendCommandToDevice_response >> [message:ok]
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug sendCommandToDevice_response >> [message:ok]
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug getHubAction>> 192.168.2.102:8282, /hubs/livingroom/devices/gbateri-flameless-candle/commands/power-off, sendCommandToDevice_response
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug sendCommandToDevice >> harmonyApiServerIP : 192.168.2.102:8282
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug childApp parent command(child)>> commandSlug : power-off
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug getSlugOfCommandByLabel>> [slug:power-off, label:Power Off]
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug childApp parent command(child)>> Gbateri Flameless candle, command: power-off, changed Command: Power Off
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 7:55:17 PM: debug getDeviceByName>> [id:53820797, label:Gbateri Flameless candle, slug:gbateri-flameless-candle]

Thank you in advance.

Toby

Just to add a bit more to my harmony-api puzzle. If I restart the docker container it starts working properly.

7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug sendCommandToDevice_response >> [message:ok]
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug sendCommandToDevice_response >> [message:ok]
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug getHubAction>> 192.168.2.102:8282, /hubs/livingroom/devices/gbateri-flameless-candle/commands/power-off, sendCommandToDevice_response
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug sendCommandToDevice >> harmonyApiServerIP : 192.168.2.102:8282
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug childApp parent command(child)>> commandSlug : power-off
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug getSlugOfCommandByLabel>> [slug:power-off, label:Power Off]
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug childApp parent command(child)>> Gbateri Flameless candle, command: power-off, changed Command: Power Off
7898eb5c-ea31-4d1a-b4ce-9a3b41b56eef 8:33:30 PM: debug getDeviceByName>> [id:53820797, label:Gbateri Flameless candle, slug:gbateri-flameless-candle]

But this time the candles turned off as they are supposed to. I have no idea on what is stopping in the docker container but it seems to need to be restarted. I could move the harmony-api to a Raspberry PI but that would take some work :wink:

Any suggestions/help would be appreciated.

Toby

@KuKu are you able to create another device handler that pulls in Harmony’s “Home Control” devices? I logged into the MyHarmony app on my computer (instead of my phone) and it appears the lights I am looking to access are showing up under a different/unique device tab, which may explain why the current installation of KuKuHarmony that I am running can’t see them. Hoping there is a straight forward way to access these ‘light’ devices in smartthings.

Hello All,

I’m brand new to the community and have just learned how to use the raspberry pi. I kind of dove head first into using KuKu Harmony once I saw that its able to control devices rather than just activities but have not been able to get it to work.

I seemingly have set up everything correctly up to the point where I need to enter the harmony-api server address in the smart app. My server address is 192.168.29.108:8282 and when its entered in the smart app and I try to discover Harmony hubs, nothing happens. When typing this into a browser however, I do get the Harmony API webpage that shows the service is started on the Pi and in Terminal I can see the hub being discovered and the script going down the page saying “Updating state for theater.”

One more thing to mention, and if this is the case I’ll feel pretty dumb: Is a smart things hub a necessity when using the smart apps? I only have my Harmony Hub and the Pi. Any input or suggestions would be appreciated! :slight_smile:

Yep you’ll need the ST hub. Sorry man. Both the DTH and SmartApp is designed to work within the smartthings ecosystem.

Thanks for the reply!

I’m going to get an ST hub and try this again. By any chance, do you know how to get the harmony api to start automatically when the Pi boots up?

Every time I boot the Pi up I have to delete the container name and use this command to get the server to start:

docker run -ti --net=host --name harmony-api turlvo/harmony-api:latest /home/harmony-api/harmony-api/script/server

Super cool idea! I just installed the jonmaddox-harmony docker image, ran the container, installed the DTH and SmartApp in my Samsung account, then I checked the custom docker TCP port, and entered the details in the Smart App on my iPhone. I can see in the Synology Docker log that the request for /hub, but I’m only seeing what I think are HTTP500 errors. What’s going on? Clearly the SmartApp and Docker are talking via TCP, but I’m not sure what else to do.

You can restart by following command.
docker restart harmony-api
(harmony-api is container name)

Thank you.

Yes.

The harmony-api and Harmony hub should be in same local network.
Thank you.

Hm… That’s some strange.

Would you try to check below command through web browser?
And let me know result.

[harmony-api server ip address]:8282/hubs/[hub name]/devices
ex) 192.168.1.123:8282/hubs/myhub/devices

The hub name you can get also below command
[harmony-api server ip address]:8282/hubs
ex) 192.168.1.123:8282/hubs/

Thank you.