# Broadlink binding for RMx, A1, SPx and MP. Any interest?

**URL:** <https://community.openhab.org/t/broadlink-binding-for-rmx-a1-spx-and-mp-any-interest/22768>\
**Category:** Bindings\
**Created:** [February 12, 2017, 11:57am UTC](https://community.openhab.org/t/broadlink-binding-for-rmx-a1-spx-and-mp-any-interest/22768 "2017-02-12T11:57:10Z")\
**Posts on this page:** 1\
**Showing post:** 1420

<div class="post-metadata">

**Author:** ![themillhousegroup](https://community.openhab.org/user_avatar/community.openhab.org/themillhousegroup/32/73746_2.png) [@themillhousegroup](https://community.openhab.org/u/themillhousegroup)\
**Post date:** [June 26, 2021, 10:37am UTC](https://community.openhab.org/t/broadlink-binding-for-rmx-a1-spx-and-mp-any-interest/22768/1420 "2021-06-26T10:37:42Z")

</div>

Hi Carl, and thanks for the bug report, you were correct, that version of the binding was not cleaning up after itself properly. That is now fixed in version [M5.3](https://github.com/themillhousegroup/openhab2-addons/releases/tag/BROADLINK_3.1.M5.3)

I recommend this version to all Broadlink users on openHAB 3.1, it’s got a great new feature that was prompted (again) by @matt1 reviewing the PR - he wanted me to document in the binding’s README how you actually add remote codes to your `broadlink.map` if you have an RMx device - and I realised that it is a really nasty and complex process that requires external tools.

So I looked into it and it turned out to be reasonably easy to do it all entirely within openHAB - so, as of this release, you can tell your RMx to go into “learn mode” and get it to dump out the code that it learns. Here are the steps (note it’s quite similar to the “send command” process I explained a few posts ago) :

1. In the openHAB web UI, navigate to your RMx Thing, and click on its _Channels_ tab
2. Find the _Remote Learning Control_ channel and create an Item for it if needed
3. Click the item, and click the rectangular area that is marked NULL
4. In the pop-up menu that appears, select “Enter infrared learn mode”
5. _The LED on your RM device will illuminate solidly_
6. Point your IR remote control at your RM device and press the button you’d like to learn
7. _The LED on your RM device will extinguish once it has learnt the command_
8. Now click the rectangular area again (which will now show “Enter infrared learn mode”)
9. Select the “Check last captured IR code” menu option in the pop-up menu
10. Inspect the `openhab.log` file on your openHAB server - you should see the following:

```auto
[BroadlinkRemoteHandler] - BEGIN LAST LEARNT CODE (972 bytes)
[BroadlinkRemoteHandler] - 2600bc017239100d0e2b0e0f100c107f55747be51a3e1d4ff4......f5be8b3d4ff4b
4d77c44d105fa530546becaa2bcfbd348b30145447f55747be51a3747be51a3e1d4ff4b3f4f4f......a3e1d4ff4b348
0145447f55747be51a3e1d4ff4b
[BroadlinkRemoteHandler] - END LAST LEARNT CODE (1944 characters)

```

1. If you carefully copy the log line between the `BEGIN` and `END` messages, it should have exactly the number of characters as advised in the `END` message.
2. You can now paste a new entry into your `map` file, with the name of your choice; for example:

```auto
BLURAY_ON=2600bc017239100d0e2b0e0f100c107f55747be51a3e1d4ff4...0145447f55747be51a3e1d4ff4b

```

1. Now you can head over to the `command` channel and try it out

As usual with these 3.1.M5 builds, please be sure to remove all previously-added Broadlink Things and Items, and rediscover them with the new binding to avoid strange problems.

Cheers,  
John

---

_[View the full topic](https://community.openhab.org/t/broadlink-binding-for-rmx-a1-spx-and-mp-any-interest/22768)._
