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

Hi All,

I have just started the openHAB “journey”.

My first challenge is to get the RM3 working, I have it added as a thing and online. [note" I did see mention of “the original Broadlink-setup-process in the app must not be completed for this to work” but Broadlink Manager worked fine for me]

I got the remote command and put it in broadlink.map

SHD_ON = 2600500000012694133712131237121412371337121312131213113813121337121312131337113813121312131311141213121312371213133712371337123713371237131213371200051F0001274A12000D050000000000000000

I’m completely stumped on how to link a switch item to SHD_ON.

thediyiot.com says like this:

Switch item=SHD_Power label="SHD[]" icon="player" mappings=[SHD_ON="ON", SHD_ON="OFF"]

I’m completely stumped on how to get a switch showing up that sends the code when I toggle it.

I mean with the above switch syntax, that supposedly goes into a sitemap and the mappings connects to the broadlink.map, this is where I come unstuck, I’m not familiar with sitemaps yet… I’m also confused because there is no channel link:

sitemap page_e8003c7ff6 label="New Sitemap" {
    Switch item=IR_CONTROL label="SDH[]" icon="switch" mappings=[SDH_ON="ON",SDH_ON="OFF"]
}

How does the “sitemap” switch know to use the Broadlink RM3 channel?

For example if I create a string or switch item then I can add a link to the Broadlink RM3 channel but the sitemap switch item doesn’t allow me to link a channel?

I’m think I’m missing the glue between the sitemap and the channel, please help.

Thanks.
Richard

I think you are missing somewhere the link to the “Thing” as well as the reference to the broadlink.map file (also make sure you installed the map transformation!).
I am not using txt files to create items though anymore (only GUI), hence not 100% sure on the syntax.

EDIT:
Does the normal switch work (without sitemap)?
Your item is called “SHD_Power” correct?
Maybe show us more of your config.

EDIT2:

How does the “sitemap” switch know to use the Broadlink RM3 channel?

The sitemap “knows” it by your item link, in this case SHD_Power (if this is your item)

1 Like

Thanks @chrismast!

Map transformation is installed.

I would rather use the UI :grinning:

With the RMx, say I have a working thing and a single entry (its a toggle) for on/off in broadlink.map, what do I create in the UI to be able to switch the system on/off via the RMx?

I keep “iterating” the config, trying something and then starting that bit again, I cant get it to switch no matter what I do.

The switch item has the channel setup but for the life of me I can’t see a way to bind the switch to the SHD_ON entry in the broadlink.map (the sitemap switch config seems to allow SHD_ON to be referenced using “mappings” but I can’t see that in a switch item)?

I’m probably doing something silly as I’m so new to all of this.

I got an RM4C, but the logic should be the same, below my config that you maybe can copy:

Thing and Channel:


Example - Power Switch:



The broadlink.map is then similar from what you posted command and IR code.

2 Likes

Thanks @chrismast

This is awesome, could you please put a few words around it as I’m unsure of the image order under “Example - Power Switch” say I don’t have any of the Example - Power Switch config setup, where do I start?

Like I cant figure out how you got the item "Living Room - Samsung TV - IR - Power as a Link beside the command, I cant seem to do that?

The example power switch screenshots are all of the item (sorry should have indicated it) which is linked to the thing’s command channel.

1 Like

[Update: @chrismast got it sorted in minutes, big thank you!]

Thanks for all the help, I’m still missing something.

In the switch I can’t get the item “Living Room - Samsung TV - IR - Power” as a Link beside the command.

I sent you a PM.

1 Like

just to close off here in the post as well.

Had a call with Richard and we walked through setting up the on/off as string, which works.
The switch should also work as long as ON/OFF is in the map file as well (I think that might have been the initial miss).

Glad it works now though!

1 Like

@themillhousegroup The present version of the jar (-3.2.0-SNAPSHOT) does not seem to work in openhab 3.4.0-M5

2022-12-08 11:55:59.312 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.broadlink-3.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.broadlink [26]
  Unresolved requirement: Import-Package: org.openhab.core

        at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]
2022-12-08 11:57:21.443 [INFO ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Constructed
2

There seems to be some activity on a 3.4 version at this link, but I can’t find the jar.
Does anybody know something?

Thank you for your attention

This has been merged and will be in 3.4 Stable support for rm mini devices seems to be in this merged binding.

[broadlinkthermostat] Aesthetic rename and add RM Mini by GiviMAD · Pull Request #13412 · openhab/openhab-addons (github.com)

1 Like

solved

hi i have installed Broadlink 3.2 on my oh 3.3.0
I’ve added the broadlink to my Bundle (status: active), add RM3 as thing (status: Active).

problem

Log:


if i’t’s unreadable
“Couldn’t read /etc/openhab/transform/broadlink.map: /etc/openhab/transform/broadlink.map (No such file or directory)”

I found that while search at this topic:
https://community.openhab.org/t/configuring-oh3-for-rm4-via-broadlink-mqtt/121208/3But still can’t find the right answer.
working on it will be happy to advice.
Thanks for any help!

Edit:
Porlbem solved, I’ve created the Broadlink.map file at /etc/openhab/transform
by ‘sudo nano Broadlink.map’
Then I’ve added the Variable name - TV_POWER={IR-CODE}
And it’s worked.

with sudo nano broadlink.map… you open an editor, and with saving you created the file “broadlink.map”… thats the reason… before you got an error message that there was not the recmonended file “broadlink.map”…

Hey,

I am still new to openHAB, but I am starting to find my way around. I’m running OH 3.3 on Win 10; an easy install. I have configured a few simple TP-Link switches (HS-103) and their bindings without issue.

Encouraged, I moved on to the Broadlink RN4 mini. I’ve configured it with the Broadlink app to connect to the local network, confirmed it’s IP and MAC addresses from the router and installed the unofficial binding (Broadlink 3.2 beta1). Using the console, I confirmed the binding is installed and it is active.

When I add the thing, I get “communications_error. Couldn’t Authenticate”. The openhab.log Broadlink discovery error identifies it as an unknown device.

Device identifying itself as ‘21014’ (0x5216) is not currently supported. Please report this to the developer!

The device is a RM4 mini with temperature and humility sensors. I have this suspicion I am overlooking something.

Solved:
Device security setting. Unlock the device from the property’s tab on the app to allow access to others on network.

I have tested the new broadlink binding in OH3.4 and reported my results on my RM mini in this thread. At present I am not able to use my broadlink.map file with previously captured IR codes.

Support for other devices is not available at present but the docs say that support should be possible.

Just want to let you know, that the version 3.2 BETA 1 (version from Jul 7, 2021) from the themillhousegroup/openhab2-addons is still working without issues after migrating from OH 3.3.0 to OH 3.4.0 (via docker image update). I’m using two RM2 devices and the map files with IR and RF codes are still working.

1 Like

Hello Im using OH 3.3 , everything seems to work, but somtimes command are frozen (not sending) and I get this Log Warn:

“2023-01-05 12:29:00.567 [WARN ] [handler.BroadlinkRemoteModel3Handler] - Online → Offline due to: Couldn’t find statically-IP-addressed device”

I remember that a couple of years ago I had a similar problem with the Broadlink RM3. For me it worked that I ping the RM3 every 60 seconds to keep the network connection alive.

Thank you for creating the binding!
I was able to install and activate the binding on OH 3.4.2 without problems.
However trying to add Broadlink RM4 Pro results in a dreaded “**COMMUNICATION_ERROR** Couldn’t authenticate” problem.
“Lock device” is Off.
Edit, I’ve confirmed that device is accessible using python-broadlink:

 device = broadlink.hello('ipaddress')
 device.auth() --> True
 print(device) --> 智能遥控 (Broadlink RM4 pro 0x5213 / ipaddress / macaddress) 

Any ideas on how to debug further?
Thanks all for your help!
- Vadim