UFO-R11 - Universal smart IR remote control - handling learned codes

Hello, I’ve got the IR remote with the purpose of steering it via MQTT. The issue is that all of the learned codes are concatenated in a long string without obvious separators. Example “Dp8NsgbJAZ4ByQEhBckBniABQAUAySABAJ4gAUAFAMlgAUAHQAMCyQGeIAFABQMhBZ4BQAeAAwLJAZ4gAUAFAMkgAQCeIAFABQDJIAGAJwLJAZ4gAUAFAMkgAQCeIAFABYADAckB4Asj4AMTgAsBngHgAQMByQGAEwHJAUAHAf”

Reading all the codes in some kind of map will be tedious at best.
Do you know if there is an easy way to extract the learned keys? I haven’t connected the device via the official app. Is there a way to export a mapping from there?

I just created a switch

- platform: broadlink
    mac: 'bla:bla:bla'
    switches:
      - name: "Gas Heater"
        command_on: 'JgBIAAABKJYSExE5EhQRFBITEhMSExI4EhQSOBI4ExISFBE5ETkSExITEjkSExITEjgTEhEUEjkTNxEUEjgSORITEjgSOBMTEgANBQ=='
        command_off: 'JgBIAAABKZUTEhI5EhMSExITERQSExI5EhMSOBM3ExMRFBI4EjgSExE6EhMSOBE5EhMSFBITEjgSExI5ERQSExI4EjgSOREUEgANBQ=='

Now I have a switch in call gas heater just I can turn on off

With single or a few commands is easy. I want to map multiple TV/Tuner/Soundbar remotes in to one :wink:
Looking at how long the string is for a few buttons I start feeling the on device memory might overflow, not to mention recording all of those keys will be royal pain in the…

Hi Ivan, did you ever figured this out? Kind off running into the same problem. The learned codes are too long to send back (max 255 and generated are 412 chars) and I don’t know if I can take a segment of the code to send back.

Not really, I gave up on the device. It might work OK with the Tuya app but I don’t intent to install it. Basically my stance is - if it is not working with HA I don’t use the device.

Awesome thanks for the feedback. I’ll see what I can do with it. If I find something, I will post it here too.

1 Like

Old thread, but hopefully somebody can use this.

I learned the codes, which was a bit tedious, but not that bad
Put them in a file
With node red, I read the files into a flow and can address them from there.

First store a file in the HA filesystem. Mine is in .storage/moes_ir_codes
File layout:

{
  "version": 1,
  "minor_version": 1,
  "key": "moes_ir_codes",
  "data": {
    "Qlima_SC5248_HEAT": {
      "30": "CS4RLhEkAmwGJAJAAUAHQXXXXXXXXX",
      "29": "ASQRIAEEAmsGJAJAAUAHQXXXXXXXXX",
      "28": "CUMRQxEkAnIGJAJAAUAHQXXXXXXXXX",
      Etc ,     
    }
  }
}

Use an inject node to trigger a Read File node once

Filename: **Path:** /homeassistant/.storage/moes_ir_codes
Output: **Utf8**

Use a json node

Use: **Convert between json string and object**
Property: Msg.Payload

Use a function node to store the data in a flow

let data = msg.payload.data.Qlima_SC5248_HEAT;

// Read the json file and store the values in the flow
Object.keys(data).forEach(function(key) {
      flow.set(key,data[key]);
});

return msg;

Now you can use this stored data wherever you are in the flow by using it in a function node
flow.get("30")