Sure, happy to share.
Flirc
In Flirc I click the keys I want to associate with the IR signal I am about to send
I select the Panasonic TC-P65VT30 “device” which I have already added to my Harmony (I also renamed it Flirc), I press the “vera link” button (though it could be any button).
Flirc flashes to say it has added it.
Keyboard Maestro
In Keyboard Maestro icreate a new macro and say I want it to be triggered by a “hot key”.
Click the mouse inside the “this hot key” box and then Keyboard Maestro is waiting for you to press the keyboard combination you want it to be triggered on. Using the Harmony remote press the button you just set in Flirc (vera link).
If the Flirc side of things is working, this should fill in the hot keys correctly.
Then in the “execute the following actions” part of the macro I add a new action and select “Execute Shell Script”
#!/bin/bash
curl --header "Content-Type: text/plain" --request POST --data "ON" http://192.168.1.222:8080/rest/items/Harmony_TV_to_Projector
OpenHAB
.items
You don’t need the hub configured, the item we sent the ON request to is a dummy item and is not linked to any binding.
String Harmony_Press_Projector_Off "Projector Off" (gAll) { harmonyhub=">[press:34897415:Projector off]", autoupdate="false"}
String Harmony_Press_Projector_On "Projector On" (gAll) { harmonyhub=">[press:34897415:Projector on]", autoupdate="false"}
String Harmony_Press_SamsungTV_Off "Samsung Off" (gAll) { harmonyhub=">[press:SamsungTV:PowerOff]", autoupdate="false"}
String Harmony_Press_SamsungTV_On "Samsung On" (gAll) { harmonyhub=">[press:SamsungTV:PowerOn]", autoupdate="false"}
Switch Harmony_TV_to_Projector "TV to Projector" (gAll)
Switch Harmony_Projector_to_TV "Projector to TV" (gAll)
.rules
rule "Switch the TV to Projector"
when
Item Harmony_TV_to_Projector received command ON
then
sendCommand(Harmony_Press_Projector_On, ON)
Thread::sleep(1000)
sendCommand(Harmony_Press_SamsungTV_Off, ON)
Thread::sleep(1000)
postUpdate(Harmony_TV_to_Projector, OFF)
end
So you can see in this case I am using OpenHAB to run a little sequence, the MacMini, PS3 and Freesat box have HDMI out into switch box, then the HDMI from the switch is split into two so the same signal is going to the tv and the projector at the same time.
This allows me to switch the display from TV to Projector without changing activity.
To do the same on the Harmony is very tedious, you can read how I did on the Logitech forum
Once you have the “when” bit triggered, you can do whatever you fancy using anything that OpenHAB can control.
Good luck.
Not sure which remote you have, does it have a touch screen?
###Just for kicks here is my rule that does something based on the Harmony Activity
String Harmony_Current_Activity "Activity" (gAll, gRestoreStartup) { harmonyhub="*[currentActivity]" }
rule "Turn off Cinema Mode when powering off Harmony"
when
Item Harmony_Current_Activity changed
then
var String HarmonyState = Harmony_Current_Activity.state.toString()
if (HarmonyState == "PowerOff" && Cinema_Mode.state==ON){
sendCommand(Cinema_Mode, OFF)
}
end