Build your own cloud-free Wifi - IR remote control and intergrate it in openHab with MQTT

For quite a while I was thinking about how to integrate some ‘old’ audio/video equipment into my smart home, until I ran into these articles of the c’t magazine (in German only): Using Pearls Wiki universal remote control with MQTT and Tuya-Convert: Free IoT devices from cloud compulsion without soldering. This guidance worked pretty well for me - and maybe it helps you, too.

In essence what you have to do is:

  • Buy a device out of the Tuya-Smart-Home device universe with a ESP8266. The device recommended in the article is a auvisio by Pearl and costs around 20 bucks.
  • Flash the firmware with the great alternative IoT-Firmware Sonoff-Tasmota. See this link or this link on how to do this and integrat it into you wifi net. In my case the Tuya hack of the firmware didn’t work, so I used a USB ESP8266 ESP01 Wifi Programmer which costs around 3-4 EUR at Ebay.
  • open the gui of the device by typing http://sonoff-ir-remote/ into your browser or whatever your firmware version is asking for and connect your MQTT broker with this device.

Now the device should be up and ready for integration.

  • open the console dialog in the gui. Everytime you press now a button of a remote control, you will see now the message like
22:11:54 MQT: tele/sonoff/RESULT = {"IrReceived":{"Protocol":"SONY","Bits":15,"Data":"0x540C"}}
  • Copy/paste this information for every button on your remote.
  • You can now use this information in various setups - like described here in things/items or directly in a rule like this:
rule "AV"
    Item Switch_AV changed
    val mqttActions = getActions("mqtt","mqtt:broker:mosquito")
        //switch AV to Video
        logInfo("Multimedia: Video on ",Switch_AV.state.toString)
        //switch AV off (green button)
        logInfo("Multimedia: off ",Switch_AV.state.toString)

Every MQTT message received by the device will trigger the IR code to be send.
Good luck with your project. :fu:


Nice project.
I use (also cloud free) the broadlink rm3. There is a tutorial here: Broadlink binding for RMx, A1, SPx and MP. Any interest?