Broadlink IR -- What do these items mean/do?

The following items are advertised as associated with a Broadlink RM Pro (category ir_tx subcategory irt, deviceTypeId broadlink_rm_pro). They are not in the current API item docs:

  • learn_ir_code
  • send_ir_code
  • send_rf_code
  • sweep_rf
  • learn_rf_code

What is the meaning of their values, and if set, what is the data format required (or available if multiple) for each and the meaning of setting them?

Are these standard items for all devices in the ir_tx category and/or irt subcategory, or are they (any or all) special for the Broadlink RM Pro? If special, where and how are these device-specific items documented for each supported device (very necessary documentation if device-specific items are possible).

Interesting, because the hub seems to know what it is; the hub user was able to add the device. Hereā€™s a screen shot from the Vera mobile app:

ā€¦and it comes back in hub.devices.list:

            "6059aab5122335123a08b973": {
                "batteryPowered": false,
                "category": "ir_tx",
                "deviceTypeId": "broadlink_rm_pro",
                "info": {
                    "device_type": "10026",
                    "mac": "34:ea:34:c7:84:35",
                    "manufacturer": "Broadlink",
                    "name": "ę™ŗčƒ½é„ęŽ§"
                },
                "name": "RM pro lounge",
                "parentDeviceId": "",
                "reachable": true,
                "ready": false,
                "roomId": "5ef5af2412233516de1adb91",
                "status": "idle",
                "subcategory": "irt"
            }

and these are listed by hub.items.list:

            "6059aab5122335123a08b974": {
                "deviceId": "6059aab5122335123a08b973",
                "hasGetter": false,
                "hasSetter": true,
                "name": "learn_ir_code",
                "show": true,
                "value": 0,
                "valueFormatted": "0",
                "valueType": "int"
            },
            "6059aab5122335123a08b975": {
                "deviceId": "6059aab5122335123a08b973",
                "hasGetter": false,
                "hasSetter": true,
                "name": "send_ir_code",
                "show": true,
                "value": "",
                "valueFormatted": "",
                "valueType": "string"
            },
            "6093b3b9122335171491d136": {
                "deviceId": "6059aab5122335123a08b973",
                "hasGetter": false,
                "hasSetter": true,
                "name": "send_rf_code",
                "show": true,
                "value": "",
                "valueFormatted": "",
                "valueType": "string"
            },
            "60a35a31122335171b85b750": {
                "deviceId": "6059aab5122335123a08b973",
                "hasGetter": false,
                "hasSetter": true,
                "name": "sweep_rf",
                "show": true,
                "value": 0,
                "valueFormatted": "0",
                "valueType": "int"
            },
            "60a35a31122335171b85b751": {
                "deviceId": "6059aab5122335123a08b973",
                "hasGetter": false,
                "hasSetter": true,
                "name": "learn_rf_code",
                "show": true,
                "value": 0,
                "valueFormatted": "0",
                "valueType": "int"
            }

So it appears you have some kind of integration. Somebody in Engineering (@Oleh ?) must know something about it.

Hi @rigpapa,
I will give the full information with the description of these items asap.

1 Like

Items description is here:
IR_items_description.pdf (97.8 KB)

It will be available in our public API description very soon.
Write please if you have any other questions.

Will you had support for controlling IR on Harmony hubs as well as Broadlink?

@Oleh, is there anything in the broadcast response that ties it to the original item in the request/hub.item.values.set, or even the originating device? If you start a learn on two separate Broadlink devices, how would one discern which response is for which device?

Edit: clarification above, and example:

{
  "id": "ui_broadcast",
  "msg_id": "60f4346b122335125b847786",
  "msg_subclass": "hub.extensions.plugin.ui_broadcast",
  "result": {
    "code": "JgBYAAABLJUSFBIUERQUEhMTERURORMTETkSORI5EzgRORI5FBISOREVERQTExE5FBITExEUFBITOBM3EjkSFBI5EjgSORI5EgAFLQABK0sSAAx3AAErSxIADQU=",
    "plugin": "broadlink",
    "type": "IR"
  }
}

The broadcast contains no device ID or item ID, and the broadcast message ID is unrelated to either and is also not the original request ID, apparently. This is data given to my by another user since I donā€™t have a Broadlink device myself.

Hi @rigpapa,
we donā€™t associate codes with devices. We are saving them in the cloud and give them a name then a user can use it in scenes. Learned codes are independent

OK, so how does one set the name? It looks like learn_ir_code takes an int value, not a name/string. How do you know what name to use?

And once you have a named code in the cloud store, how do you send it via a device? send_ir_code seems to take a string, but it appears the string is actually Base64-encoded binary data to be sent, not a name of a stored code. How does that work?

send_ir_code takes as parameter the IR code (the base64 of the binary) itself to send.
The name is only used to identify the code to use when using the app.
Currently it can only be used in scenes afaik.

So, when you learn a code through the app, the app asks for the name and stores it in the cloud under that name, and the hub has no idea what the name is? And later, when building a scene and you want to send a named code, the app retrieves a list of names from the cloud and substitutes in the base64 code for the hub? The name is therefore not stored on the scene, and the hub never knows what the name is?

Whatā€™s the API method for retrieving the list of known codes/names? Since the app must have access to it, I suppose the web API under construction will need to perform in a similar manner, so thereā€™s an API method for it to use?