i run into some issues with the new org.openhab.binding.kodi and OH2. Alle the threads here are about the old xbmc binding, where the documentation is much more better and the syntax is quite different.
to use kodi with oh2 is just discovered it within the paperUI and with channels i can read the title and control kodi.
But now i want to use kodi in some rules and therefore i need to send commands directly to kodi. how can i do this?
my frist try:
items --> works to control kodi play/pause etc.
//Kodi
Player Kodi_Control "Kodi Control" (Wohnzimmer){channel="kodi:kodi:e243d99b:control"}
i need the switch item and the rule to distinguish between several devices. So i can pause and openhab automatically knows which device to pause. i use this for alexa, so there is just one command i need to speak. here are my rule and item now:
rule "Film anhalten"
when Item Pause received command ON
then
if(Harmony_Activity.state == "KODI auf Fernseher" || Harmony_Activity.state == "KODI auf Beamer"){
Kodi_Control.sendCommand("PAUSE")
}
else if(Harmony_Activity.state == "SKY auf Fernseher" || Harmony_Activity.state == "SKY auf Beamer"){
sendHttpGetRequest("http://192.168.1.55/web/remotecontrol?command=164")
}
end
rule "Film fortsetzen"
when Item Pause received command OFF
then
if(Harmony_Activity.state == "KODI auf Fernseher" || Harmony_Activity.state == "KODI auf Beamer"){
Kodi_Control.sendCommand("PLAY")
}
else if(Harmony_Activity.state == "SKY auf Fernseher" || Harmony_Activity.state == "SKY auf Beamer"){
sendHttpGetRequest("http://192.168.1.55/web/remotecontrol?command=164")
}
end
if there is a better solution for that, then i am grateful for any ideas how to optimize the construct