Control ESP8266 as an IR TV remote using HTTP Binding

Hi All,

I´ve set up an ESP8266 to control my TV using Infrared Signals which I´ve decoded from my Samsung Remote. I already have set up a switch in Opnehab to turn the TV On and Off, works like a charm.
Now I want to add more Buttons, like Volume up, Down, Channel Up, Down and so on. In general I would just configure an item for each Task, but I have noticed that I get into Trouble with Alexa, because this identifies every button as a single device. So the Command, “Alexa, TV On” and “Alexa, TV Off” confuses her, she doesn´t know which device she should use…

So I thought I must only create one single TV Item and control every task with this item. I stumbled upon mappings, but I don´t know if this is the right path I should take. And if, I have no idea how to combine mappings with the http Binding…

I hope someone could assist me here, thanks in advance!!

PS one example what my switch looks like now:

Switch IRTVAUS "Fernseher Aus" (FF_Wz) [ "Switchable" ] { http=">[*:POST:,SAMSUNG,E0E040BF,32]" }

Perhaps with a Number Item that execute an BashScript ? The Number Value of the Item to an switch case in BashScript …

But I don’t known something about the “Bugs spy” Alexa :wink:

Can you share more info on the ESP8266 sketch you have?

I have no Sketch :wink: I read your posting once again … and now understand the Problem :wink:

I think this is the Solution for TV On -> Off with 1 Switch

Switch IR_TV_EIN_AUS "Fernseher Ein/Aus" (FF_Wz) [ "Switchable" ]	{ http=">[ON:POST:,SAMSUNG,COMMAND_FOR_ON,32] >[OFF:POST:,SAMSUNG,E0E040BF,32]"

Unfortunately I cannot tell you much about the ESP Sketch because I flashed it using ESPEasy ( . In fact the ESP receives a http command like,SAMSUNG,E0E040BF,32 where E0E040BF is the IR command to turn the TV on.

So now I have a lot of those http commands (like volume, channel, mute…) but when I add them to my home.items every button is recognized as a single device by Alexa.
There is a Xiaomi Vacuum Robot Binding that uses Mappings for several commands and is still recognized as one device by Alexa, but I don´t know how to combine mappings and the http Binding.

Hi siod, have you resolved the problem? I have the same problem with multiple http commands for my tv.

You can try to send the commands via mqtt. Here is a link that uses mqtt for controlling a fan with Home Assistant but I’m sure, with a bit of tweaking, it can work with OH.