1

Could someone help me to configure this

https://github.com/smartHomeHub/SmartIR to use with Tasmota over MQTT?

I have installed the addon with HACS and have generic IR flashed with TasmotaIR (when aiming with remote control to the IR box I can see it's receiving commands on the console).

I'm stuck trying to get working with Gree air conditioner and Samsung TV

This is my configuration.yaml

smartir:

media_player:
  - platform: smartir
    name: Bedroom TV
    unique_id: bedroom_tv
    device_code: 1060
    controller_data: cmnd/tasmota_79A072/IRsend
    #power_sensor: binary_sensor.tv_power

climate:
  - platform: smartir
    name: Bedroom AC
    unique_id: bedroom_ac
    device_code: 1180
    controller_data: cmnd/tasmota_79A072/IRsend
    temperature_sensor: sensor.temp_hum_cuarto_temperature
    humidity_sensor: sensor.temp_hum_cuarto_humidity

When pushing any buttons on generated cards nothing happens (on the Tasmota console, nothing is showing).

2
  • Load IRdump to the Arduino device and confirm that you receive codes.
    – MatsK
    Oct 27 '20 at 4:45
  • @MatsK I confirmed already receive codes on Tasmota console
    – gsubiran
    Oct 29 '20 at 11:07
3

I suspect that the problem is device code 1060 only supports Broadlink and does not support MQTT. Same for device code 1180. Unfortunately, I have found no complete example of using SmartIR with MQTT.

4
  • I finally got it working creating files for each code and setting specific values on each button. Found some examples googling a lot. You trying to do something similar? I could post what I got done.
    – gsubiran
    Sep 16 at 0:43
  • 1
    @gsubiran If you have figured out the answer for your own question, please post it. It could help others and you will be able to accept it as well. Sep 16 at 6:19
  • 1
    @gsubiran I am trying to use tasmota-ir with SmartIR as you are. I am in the process of trying to create a custom json file and so would be very interested in whatever you came up with.
    – R. Keck
    Sep 16 at 21:09
  • @R.Keck sure! I thought this post was dead and I found a solution long after so I forgotten put my findings. I'm now writing a post with that information.
    – gsubiran
    Sep 16 at 21:14
0

Ok there are two key properties here to get smartir working over MQTT (with tasmota)

  • device_code
  • controller_data

device_code

I thought that just looking for codes in the github repo here and then setting the value for my device will make it work, but it didn't.

You will need first to upload the [code].json file to your home assistant installation at config/custom_components/smartir/codes/climate for air conditioner or config/custom_components/smartir/codes/media_player for tv.

That's sounds easy but the most complicated part is that major .json files available on the git repo are for broadlink hardware and don't work for tasmotized devices that communicates through MQTT so you have two options.

  1. Google a lot to try to find someone sharing .json file for the same device as yours.
  2. Get codes yourself using the original remote control.

To get codes yourself you need to access to your tasmotized device through it web interface and go to "Console". Then get your remote control and pointing to your IR device push a button. You will see on console information regarding this button you pressed.

enter image description here

This information you will use to construct your own .json file like this (Samsung TV)

//SAMSUNG TV
{
    "manufacturer": "Samsung",
    "supportedModels": [
      "UE55F8000",
      "UExxF8000"
    ],
    "supportedController": "MQTT",
    "commandsEncoding": "Raw",
    "commands": {
        "off": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E019E6\",\"DataLSB\":\"0x070702FD\",\"Repeat\":0}",
        "on": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E09966\",\"DataLSB\":\"0x070702FD\",\"Repeat\":0}",
        "previousChannel": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E008F7\",\"DataLSB\":\"0x070710EF\",\"Repeat\":0}",
        "nextChannel": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E048B7\",\"DataLSB\":\"0x070712ED\",\"Repeat\":0}",
        "volumeDown": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0D02F\",\"DataLSB\":\"0x07070BF4\",\"Repeat\":0}",
        "volumeUp": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0E01F\",\"DataLSB\":\"0x070707F8\",\"Repeat\":0}",
        "mute": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0F00F\",\"DataLSB\":\"0x07070FF0\",\"Repeat\":0}",
        "sources": {
            "DTV": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0C23D\",\"DataLSB\":\"0x070743BC\",\"Repeat\":0}",
            "Antenna": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0D827\",\"DataLSB\":\"0x07071BE4\",\"Repeat\":0}",
            "HDMI": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0D12E\",\"DataLSB\":\"0x07078B74\",\"Repeat\":0}",
            "HDMI 1": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E09768\",\"DataLSB\":\"0x0707E916\",\"Repeat\":0}",
            "HDMI 2": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E07D82\",\"DataLSB\":\"0x0707BE41\",\"Repeat\":0}",
            "HDMI 3": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E043BC\",\"DataLSB\":\"0x0707C23D\",\"Repeat\":0}",
            "HDMI 4": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0A35C\",\"DataLSB\":\"0x0707C53A\",\"Repeat\":0}",
            "3D": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E08679\",\"DataLSB\":\"0x0707619E\",\"Repeat\":0}",
            "Channel 0": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E08877\",\"DataLSB\":\"0x070711EE\",\"Repeat\":0}",
            "Channel 1": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E020DF\",\"DataLSB\":\"0x070704FB\",\"Repeat\":0}",
            "Channel 2": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0A05F\",\"DataLSB\":\"0x070705FA\",\"Repeat\":0}",
            "Channel 3": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0609F\",\"DataLSB\":\"0x070706F9\",\"Repeat\":0}",
            "Channel 4": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E010EF\",\"DataLSB\":\"0x070708F7\",\"Repeat\":0}",
            "Channel 5": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0906F\",\"DataLSB\":\"0x070709F6\",\"Repeat\":0}",
            "Channel 6": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E050AF\",\"DataLSB\":\"0x07070AF5\",\"Repeat\":0}",
            "Channel 7": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E030CF\",\"DataLSB\":\"0x07070CF3\",\"Repeat\":0}",
            "Channel 8": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0B04F\",\"DataLSB\":\"0x07070DF2\",\"Repeat\":0}",
            "Channel 9": "{\"Protocol\":\"SAMSUNG\",\"Bits\":32,\"Data\":\"0xE0E0708F\",\"DataLSB\":\"0x07070EF1\",\"Repeat\":0}"
        }
    }
}

In any case you finally will have your xxxx.json file uploaded on any of those folders and device_code property configured with same number.

controller_data

Here you just need to specify the MQTT topic between some other parameters. MQTT topic is present on your tasmotized device configuration

enter image description here

cmnd/<your_mqtt_topic_here>/IRhvac for air conditioner

cmnd/<your_mqtt_topic_here>/IRsend for tv

Example of configuration.yaml configuration


smartir:
  check_updates: false

media_player:
  - platform: smartir
    name: Bedroom TV
    unique_id: bedroom_tv
    device_code: 1070
    controller_data: cmnd/tasmota_smart_ir_bedroom/IRsend
    #power_sensor: media_player.chromecast_cuarto

climate:
  - platform: smartir
    name: Bedroom AC
    unique_id: bedroom_ac
    device_code: 1180
    controller_data: cmnd/tasmota_smart_ir_bedroom/IRhvac
    temperature_sensor: sensor.temp_hum_cuarto_temperature
    humidity_sensor: sensor.temp_hum_cuarto_humidity

Feel free to let me know if something isn't clear!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.