Looking for a MQTT to IR device

I have smart TV but it has no real control, only WOL. You cant change inputs etc etc.

I’m hoping to use a MQTT to IR bridge , ideally something that can be powered by a USB port from the TV itself

Is anyone aware of something I could use to intergrate into OH2 to allow TV control such as Power/Input/Settings buttons from the TV remote?

Thanks!

I recently built an ESP8266 with an ir led running Tasmota. In Tasmota you can easily connect to your MQTT broker and set up an ir transmitting and receiving led to get the codes. I had to map the codes in order to properly send it through MQTT. If you would like to go this route I can post more on what I have.

2 Likes

Love to know more. Im running 3 x Sonoff Basics and a 4CH on Tasmota with great results.

Look at the broadlink RM mini.

THen you can use https://github.com/eschava/broadlink-mqtt for MQTT integration.
Also I think someone started an OH2 binding.

2 Likes

Looks neat. I wonder if it can run off a USB socket from a PS4 or something

The Rm Mini? I just run it off a standard usb charger, so it should run off a ps4.

Yep, the reason I say is my media cabinet as the PS4 with spare USB ports, I just dont want to run more cables or use more power outlets

This is how I have it set up. You can use a sonoff or regular esp8266 running Tasmota with an ir led. First you need to go to the Tasmota web browser and configure the module to IRrecv then go to the console and you will see your codes appear there. You want to save this section of the code:

{"Protocol":"SAMSUNG","Bits":32,"Data":"E0E040BF"}

Once you have all your codes return to configure module and select IRsend and save. This is my openHAB setup. You will also need to add 0x before your code in the map file.

.items file

Number IRsend "Samsung Remote" {mqtt=">[broker:cmnd/sonoff/irsend:command:*:MAP(irsamsung.map)]"}

.sitemap file

Switch item=IRsend mappings=[0="Power"]

irsamsung.map file

0={"Protocol":"SAMSUNG","Bits":32,"Data":"0xE0E040BF" 
6 Likes

Thanks Erick. I’ll look into this further. I have a hisense TV so I’ll need to see if I can find codes

@erickk did you solder an IR Led to the Sonoff board? Which hardware did you use. Im trying to not have to solder etc. Or, looking for a neat like solution. These breadboard units are less than ideal.

Cost is not a concern.

Lucky you.

I am seriously looking into the broadlink-mqtt option.
But the IR tasmotta works great.

Issue with the Sonoff is it requires a 240Volt socket I’d rather not use.

You could power the sonoff directly from pins 1 and 4 with 3.3v if you were so inclined.

I thought IR leds needed about 5V to have a decent reach? But thats a good idea. Ideally, I’d like this to have a USB socket or cable.

can the sonofff still be used as a realy?

From the tasmota wiki:

The resistor values depend on the used IR LED and the gain of the NPN Transistor. Rb is not really necessary an can be left out. R1 limits the current through the diod and can have Values between 2.5 Ohm and 10 Ohm. Using lower values gives you a better range but you risk the diod if the current gets to high. About 100mA are ok for sending signals. Check your datasheets!

A usb power supply is 5v, you would destroy your sonoff!! Make sure it’s a 3.3v supply like this one:

I know it’s ebay UK but I am sure you can find this Down Under

I found that that depended on the sonoff!! some work and some don’t. But that was from the computer usb-serial adapter so maybe not enough current. The PSU above provides 2A, that should be enough!

I’m using OpenMQTTgateway as a bridge in both way’s.

OpenMQTTGateway on GitHub

A really good project with all you need - wiring - code - openHAB integration.

It can even get extended with a BLE and/or a RF module.

There is a Topic in openHAB community too - ESP8266 based 433mhz & IR gateway bidirectional with MQTT --> OpenMQTTGateway

@erickk thanks for posting! I was wanting this also!!

Yes you should still be able to use the relay on the sonoff. The relay uses gpio pin 12 and the Ir led can be on gpio pin 14 so all should be fine.

1 Like

Np. Glad to help