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

Are the commands coming from Harmony or they are basic universal commands for TV type? I am looking for a specific command, which is on my AVR remote and listed as a command in the Harmony API but doesn’t populate in webCoRE.

Hello,

Please try to use ‘TV’ Device Type in the ‘KuKu Harmony’, because there are five Custom commands.
Just mapping your specific command to Custom1~5 and call Custom1~5 command at WebCoRE.

Thank you

So, I just setup my Qnap server to host all my multimedia, gonna install this as well to get my device control in affect, is there a walk through of how to do this with a qnap server?

also, I have some custom IR commands that I use to control electric fireplaces and currently an old erod curtain system, will I be able to control these with this device controller?

Thanks for great SmartApp
I have some devices which need power on/off by double click remote button. I any way to power on/off them using KuKuHarmony?

Hello,

Hm… because there is a repeat command like below, it looks like abailable with small modification.

POST /hubs/:hub_slug/commands/:command_slug?repeat=3 => {message: “ok”}

1 Like

Thanks KuKu

It is very helpful. I made small modification and it works like a charm.

I am on a Pi3. I had to restart my Pi today but I am not sure what I need to do to restart the Harmony API Server…

Do I just open a command prompt and type:
start docker harmony-api

Or do I open a command prompt and type:
docker run -ti --net=host --name harmony-api turlvo/harmony-api:latest /home/harmony-api/harmony-api/script/server

Thanks in advance!

Hello,

You can just re-run started container following below command.

docker start [container name]

If you want to do this automatically,
try to use ‘systemctl’.

I’m sorry. I know that this is probably so simple for you but I am still lost.

In Pi I have this blue up/down arrow thingy that when hovering over it it says: docker0 Link is Down

Is docker0 the name I supposed to put in between the [ ]?
Do I even use the [ ]?
What is the default container name for this? Is it harmony-api?

I’ve tried in command prompt:

docker start [harmony-api]
docker start harmony-api
docker start [docker0]
docker start docker0

I still can’t seem to get this start or at least to the point where I see the screen where it is waiting on changes from my harmony hubs…

Using ‘systemctl’, relating to docker0:

sys-subsystem-net-devices-docker0.device loaded active plugged /sys/subsystem/net/devices/

I have no idea what this means or what the command is supposed to do to start KuKu…

Sorry again for being lost here. All was well until I had to restart.

Every think was working until today.
I have noticed that harmony hub is not discorering anymore.

I get error on harmony-api

Error: bind EADDRINUSE 0.0.0.0:5224
at Object.exports._errnoException (util.js:907:11)
at exports._exceptionWithHostPort (util.js:930:20)
at dgram.js:214:18
at nextTickCallbackWith3Args (node.js:522:9)
at process._tickCallback (node.js:428:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:140:18)
at node.js:1043:3
error: Forever detected script exited with code: 1
error: Script restart attempt #5
Starting discovery.
events.js:141
throw er; // Unhandled ‘error’ event
^

Error: bind EADDRINUSE 0.0.0.0:5224
at Object.exports._errnoException (util.js:907:11)
at exports._exceptionWithHostPort (util.js:930:20)
at dgram.js:214:18
at nextTickCallbackWith3Args (node.js:522:9)
at process._tickCallback (node.js:428:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:140:18)
at node.js:1043:3
error: Forever detected script exited with code: 1
error: Script restart attempt #6
Starting discovery.
events.js:141
throw er; // Unhandled ‘error’ event
^

I tried restart harmony hub and harmony-api on raspberry pi. but without success
Any ideas whats is wrong?

How do you restart the harmony-api? I am trying to get this restarted as well but I do not see any logs or anything…

Hello,

I am so sorry for late response.

Please let me know typed docker command when you run a harmony-api.
There is a container name of ‘harmony-api’ in parameter
ex) --name test
please just run docker start [name].
ex) docker start test

or another docker’s container name checking way is like below.
docker ps -a

you can find ‘harmony-api’’s information.

I’ll inform you about ‘systemctl’.

Thank you.

Hello,

It looks like there is a same daemon using same port.
please check process that using ‘5224’ port on command prompt.

netstat -anp | grep 5224

or check whether there is a exist harmony-api daemon.

ps -aux | grep harmony-api

or check whether harmony-api container is already running

docker ps
or
docker ps -a

Thank you.

I kill the process and start it again

pkill -f node

script/server

Thanks again
I fixed error but still have problem with discovering hub.

The hub is discovered only after switch off and switch on harmony hub.
but it lost hub in few seconds

Hub discovered: Harmony Hub at 192.168.1.10.
Updating activities for harmony-hub.
Updating state for harmony-hub.
Updating devices for harmony-hub.
Updating state for harmony-hub.
Hub discovered: Harmony Hub at 192.168.1.10.
Updating activities for harmony-hub.
Updating state for harmony-hub.
Updating devices for harmony-hub.
Hub lost: Harmony Hub at 192.168.1.10.
Hub lost: Harmony Hub at 192.168.1.10.

@KuKu

Thanks for the commands.

When I ran docker ps, I got:
pi@raspberrypi:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

When I ran docker ps -1 I got:
pi@raspberrypi:~ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
671a602db52f turlvo/harmony-api:latest “/usr/bin/entry.sh…” 4 weeks ago Exited (137) 3 days ago harmony-api

I guess this is telling me that harmony-api was exited 3 days ago…

So I ran this:
pi@raspberrypi:~ $ docker start harmony-api

All I get is this:
harmony-api

So I did this again which says the harmony-api is up and running but:
pi@raspberrypi:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
671a602db52f turlvo/harmony-api:latest “/usr/bin/entry.sh…” 4 weeks ago Up About a minute harmony-api
pi@raspberrypi:~ $

@szmulik
I tried your command and I got this:
pi@raspberrypi:~ $ pkill -f node
pkill: killing pid 13348 failed: Operation not permitted
pkill: killing pid 13358 failed: Operation not permitted

I don’t know what the hell I am doing wrong here. Arrrrg!!! This was working flawlessly before I restarted the Pi.

I guess it’s running now but I have no visual feedback on the screen that it’s doing it’s thing…How do I open up the activity monitoring screen in command prompt so I can view the live log?

Thanks again. Please treat me as if I know absolutely nothing about this stuff…which should be obvious by now…

Hello,

You can see a working log by using below command.

docker attach [container name]
ex) docker attach harmony-api

and you can stop monitoring using below command.
Ctrl + P + Q ( remain pushing Ctrl key and push p key and q key)
If you push Ctrl + C, container stop and you can see stopped container using ‘docker ps -a’.
If container is stop, you try again start container.

Thank you.

Hello,

It’s weired.
Is there a any same harmony-api process?

Would you check process list?

ps -aux | grep harmony-api

Thank you.