Playing with different ways to make Homekit (and Siri) control my entertainment system, and I produced some positive results so thought I would share. May be intuitive to some and my solution is no doubt clunky, but I hadn’t seen it before. As in the thread title, I am aided by a Harmony Hub. The idea was to voice command TV channels (DirecTV) via Siri.
First, need to create Harmony Hub buttonPress item for Genie Mini.
String HarmonyHubDirecTV "Harmony DTV" (gHarmony) { channel="harmonyhub:device:LRHub:5908****:buttonPress" }
Next is the “dummy” switch for Homekit to recognize. I don’t call them dummy switches in their names as some do, I just place in a different *.items file. Below is the switch for turning channel to CNN, obviously.
Switch CNN "CNN" (gHarmony) [ "Switchable" ]
Last, a rule to execute.
rule "Turn to CNN"
when
Item CNN changed from OFF to ON
then
HarmonyHubDirecTV.sendCommand("2")
HarmonyHubDirecTV.sendCommand("0")
HarmonyHubDirecTV.sendCommand("2")
HarmonyHubDirecTV.sendCommand("Enter")
postUpdate(CNN,OFF)
end
If you have DirecTV, you’ll know that CNN is channel 202. The last line just turns off the CNN switch in Homekit.
Siri may have trouble with “turn on CNN” as a command. Siri may be trying to open an app (if installed) or a website, it has been inconsistent for me. The workaround is to just change the name in Homekit to something familiar. I tried “Ted Turner” and it worked fine.