Broadlink binding [4.1.0.0;4.3.0.0)

Hi all,

A small update from my side. @Bernd_Ritter I found that the old RM Pro models are mapped to something called RM2. This is very confusing and it also misses the RF part. Hence, I am in the process of renaming RM2 to RM Pro and also adding the RF code, as you suggested to the base class. I hope to have an alpha version ready in a couple of days for you all to test.

3 Likes

mjeshurun,

My previous OpenHAB version was 3.x in a docker configuration in a Synology NAS. The addons folder was /opt/openhab/addons and the other related OpenHAB folders are in /opt/openhab.

However for OpenHAB 4.x, I am using the OpenHABian distribution in a Raspberry Pi device and the directory (folder) structure and files are organized very differently. The addons folder is /usr/share/openhab/addons - which is distinctly relocated away from the rest of the setup OpenHAB folders, split between /etc/openhab and /var/lib/openhab.

Assuming these differences were not a result of deliberate changes by the OpenHAB docker and/or OpenHABian developers, I suspect that you were adding the jar file to the wrong addon folder.

Hopefully, this gives you a clue on where to look.

@AntonJansen @munt @Bernd_Ritter ,

Thank you all for your help. I finally found why the binding’s jar file wasn’t recognized by OpenHAB.

As some of you thought, the problem was caused due to a stupid mistake on my part. I didn’t notice the internal docker container path mapping for the addons folder was pointed to the wrong place.

Now that I corrected it, the binding is found by the system :pray::pray:

Good day, @AntonJansen .

Now that my OpenHAB system finally recognizes the RM4 Pro, I would like to start the process of re-learning the RF remote codes I previously used with the older unofficial Broadlink binding.

I read the documentation of your binding, but when I press NULL and then Learn RF command, I immediately see a message saying RF command learnt, even though I didn’t press any remote button yet. Later when I actually press a remote button nothing happens and when I press Check and save the RF command no remote code is sent.

Am I doing something wrong?

Check the status led of your broadlink device to know whether you are done or not.

Hi all,

I just released alpha 0.5 (see top of page). This enables the RF piece for RM Pro models. When using this new build, you have to remove your existing broadlink things and re-create them, as the channel names and types have changed. My old RM Pro does not seem to function with the RF, also not with the Python tool this binding is based on. In the broadlink app it does work, so this requires more investigation. Let me know your findings!

2 Likes

Hi @AntonJansen

Tried the new released alpha 0.5 as you provided instructed.

I have a RM4_Pro works fine in the broadlink app and its showing online in Openhab with the Temp and Humidity sensors working.

However neither IR or RF learn items will let me click on the NULL. The Command Items do, but only “cancel” in the menu is shown as an option.

Unable to find any errors in the log file, is the below correct?

Any suggestions on what i might be doing wrong or where to look next?

2024-06-07 12:20:58.136 [DEBUG] [ink.internal.BroadlinkHandlerFactory] - Creating Thing handler for ‘broadlink:rm4pro’
2024-06-07 12:20:58.227 [TRACE] [dler.BroadlinkRemoteModel4ProHandler] - updateItemStatus; device not currently online, resolving
2024-06-07 12:20:58.228 [DEBUG] [dler.BroadlinkRemoteModel4ProHandler] - We’ve never actually successfully authenticated with this device in this session. Doing so now
2024-06-07 12:20:58.242 [DEBUG] [dler.BroadlinkRemoteModel4ProHandler] - Authenticated with id ‘01000000’ and key ‘864C865A5EE4751B61DAB59D6F0D500D’
2024-06-07 12:20:58.243 [DEBUG] [dler.BroadlinkRemoteModel4ProHandler] - Authenticated with newly-detected device, will now get its status
2024-06-07 12:20:58.258 [DEBUG] [ink.internal.BroadlinkMappingService] - notifying framework about 0 commands: for single IR device
2024-06-07 12:20:58.258 [DEBUG] [ink.internal.BroadlinkMappingService] - notifying framework about 0 commands: for single RF device
2024-06-07 12:20:58.258 [DEBUG] [ink.internal.BroadlinkMappingService] - BroadlinkMappingService constructed on behalf of broadlink:rm4pro:d97d30e89f:command and broadlink:rm4pro:d97d30e89f:rfcommand

Did you create an item for the channel?

Hi @AntonJansen,

Yes, I created an Item for each channel of the RM4_pro thing, see below. I am running Openhab 4.1.3 in docker. Last image shows the single “cancel” menu I get when I click the null for the command item. I can’t see either rf.json or ir_json in jsondb folder.

My bad, the broadlink app shows it as a rm4 mini, but its a BestCon RM4c Pro - which looks the same as the mini, but has RF support.

@rharman See my screenshots


Thanks @Bernd_Ritter ,

That is the NULL I have tried to click.

For command items I can click it, but only the cancel appears in the menu at the bottom.

For learn items I can’t click the null at all.

Any suggestions?

The screenshot you posted show a different view. Are you sure you are in the model where the item is and not in the editor of the item?

@AntonJansen I just installed 0.5 and can confirm that now IR and RF are working for the old RM Pro and the RM 4 Pro.
I did not try learning a command, but sending does work :slight_smile:

Thank you!

Hi @Bernd_Ritter

It’s the same behaviour on the model page as well.

Regards

Hi @Bernd_Ritter,

The only difference I can see between our configuration is my RM4 Pro has the Humidity and Temperature sensors. Does your RM4 pro have these?

They are working and providing correct values in Openhab.

Yes, it has. But I have not linked the channels.

Hi Bernd,

Good to hear it works for you. Sadly for my own RM Pro it does not work :frowning: . Hence, I have kept it out of the first openhab release, as we first need to figure out what is going on. I guess it has to do with the version of the device I have. However, this will require some heavy reverse engineering, as the available open source python program also does not work with my old RM Pro ;-(.

@rharman this is really strange. Try to see if removing the whole thing and then re-adding it solves the issue. It looks like openhab is not relating the binding and thing correctly.

Hi Friends,

I finally got the binding to work and I learned my RF remote codes.
However, I have a problem with two of the codes I’m trying to send to my RF devices.

Both remote codes are supposed to simulate pressing the Reverse buttons on two different remotes for 2 ceiling fans, to change the fans turn direction. But unlike other buttons on these remotes (OFF, Speed, Timer) that need to be pressed shortly, the Reverse button needs to be long pressed for the command to function.

Could this be related to why the Broadlink Binding can’t simulate these two codes?