[SOLVED] Control socket with harmony remote

Hello all,

I have a problem with the harmony hub. My plan was to press the TV activity button on the remote so OH2 is triggered by that event and switches on the TV socket by a rule. The harmony hub is waiting in the meantime (by dummy device and a delay of maybe 10s) and then switch on the TV and DVR.
My problem is that the rule works if I change the activity by a rule but not if I do it with the harmony remote.


I tried it in my screenshot with “PowerOff” because it works with that command. The rule “OFF 2” just triggers by rule “OFF” but not by remote.

It will probably work if you use

Item HarmonyActivity changed

instead of

Item HarmonyActivity received command

See also:

I would use the Harmony trigger channel.
E.g. in my setup I don’t need a dummy device.
If you have a device (amplifier) that is part of every activity you can set a general delay in the harmony app for the device (not in the activity) - no dummy device needed.

Then just use the trigger channel in the rules:

rule "Starting TV"
 Channel "harmonyhub:hub:Media:activityStarting" triggered Watch_TV or
 Channel "harmonyhub:hub:Media:activityStarting" triggered Play_Xbox or
 Channel "harmonyhub:hub:Media:activityStarting" triggered Bluetooth_Music or
Channel "harmonyhub:hub:Media:activityStarting" triggered Play_PS4
logInfo("Harmony", "TV is starting...")

@ wborn: Thank you. Your hint works. I have to read more about the differences of the siganl words.

@ Chrishab: I tried it at the beginning, because the channel trigger is described in harmony binding documentation. But when I type in channel … triggered in my rules both words are not colored in signal word color (purple). So I searched for another solution. Do you have an idea what the problem can be?

1 Like

Great that it works! I remember spending a lot of time on this myself when I started with openHAB. :wink:

I edit all my rules via Samba shares and Notepad++ (including the syntax highlighting for openHAB).
For me the “Channel” also does not turn purple. Make sure you use “Channel” and not “channel” - of course the name of your hub (mine is “Media”) must also match)

@deckard1984 When I first started with OH I used nano but I’ve since changed. Everyone has their own preference when it comes to text editors but VSCode with the OH extension works great, has syntax highlighting and more (a big help with rules). Give it a try, you can thank me later.:wink:

I have still a problem. It looks like the hub runs all steps in the “Fernsehen” activity and after this the event is triggered to start the socket.
Because of this I tried the channel solution again. But with this implementation (see screenshot) it doesn’t work. Do you have any ideas? I would be very thankfull for a hint. The Channel signal word is not colored in purple, maybe a problem?

Do you use openHAB 2.3.0 or newer? In previous versions the channel was there but didn’t work for everyone, see Harmony Hub activityStarting?.

I’m using OpenHABian 2.3.0-1 (Release Build). Is this the version with the bugfix? I’m a bit confused about your link. Do they change just the binding version or the whole OH?

Yes it should have that bugfix (PR #3496).

I have read in the link you send the connection can be a problem. My Hub is connected by a powerLAN adapter and a LANSwitch. Can that causes problems?