I actually reverse enginereed my tv remote for my haier TV : https://github.com/Tukks/haierV300SApi
Basically, you send post and get command to switch channel and everything.
Now, I don’t understand how to add all this API to my openhab installation? do I need to develop a custom Bindings for my case?
You may want to take a look at the HTTP binding. (https://www.openhab.org/v2.5/addons/bindings/http1/) From what I saw on GitHub, it looks like you are just using HTTP. I don’t have any experience using the binding or with Haier TVs though.
rule "Télévision item_television_power"
when
Item item_television_power received update
then
logWarn("television", "item_television_power");
sendHttpPostRequest("http://192.168.1.13:56789/apps/SmartCenter", "", "<remote><key code=1012/></remote>");
end
rule "Télévision item_television_channel"
when
Item item_television_channel received command
then
logInfo("item_television_channel", "item_television_channel");
logInfo("item_television_channel", item_television_channel.state.toString);
if (item_television_channel.state.toString.length < 2) {
sendHttpPostRequest("http://192.168.1.13:56789/apps/SmartCenter", "", "<remote><key code=100"+ item_television_channel.state.toString +"/></remote>");
} else {
var number = item_television_channel.state.toString.split('');
for (var i = 0; i < number.length; i++) {
logInfo("item_television_channel", number.get(i));
sendHttpPostRequest("http://192.168.1.13:56789/apps/SmartCenter", "", "<remote><key code=100"+ number.get(i) +"/></remote>");
Thread::sleep(100);
}
}
end