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
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) :
- In the openHAB web UI, navigate to your RMx Thing, and click on its Channels tab
- Find the Remote Learning Control channel and create an Item for it if needed
- Click the item, and click the rectangular area that is marked NULL
- In the pop-up menu that appears, select “Enter infrared learn mode”
- The LED on your RM device will illuminate solidly
- Point your IR remote control at your RM device and press the button you’d like to learn
- The LED on your RM device will extinguish once it has learnt the command
- Now click the rectangular area again (which will now show “Enter infrared learn mode”)
- Select the “Check last captured IR code” menu option in the pop-up menu
- Inspect the
openhab.log
file on your openHAB server - you should see the following:
[BroadlinkRemoteHandler] - BEGIN LAST LEARNT CODE (972 bytes)
[BroadlinkRemoteHandler] - 2600bc017239100d0e2b0e0f100c107f55747be51a3e1d4ff4......f5be8b3d4ff4b
4d77c44d105fa530546becaa2bcfbd348b30145447f55747be51a3747be51a3e1d4ff4b3f4f4f......a3e1d4ff4b348
0145447f55747be51a3e1d4ff4b
[BroadlinkRemoteHandler] - END LAST LEARNT CODE (1944 characters)
- If you carefully copy the log line between the
BEGIN
andEND
messages, it should have exactly the number of characters as advised in theEND
message. - You can now paste a new entry into your
map
file, with the name of your choice; for example:
BLURAY_ON=2600bc017239100d0e2b0e0f100c107f55747be51a3e1d4ff4...0145447f55747be51a3e1d4ff4b
- 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