Broadlink Integration - add support for RM4 Mini

Just remembered my step!
I connected my laptop to the RM4 over wifi. Mine was called Broadlink_Wifi_Device. I then ran the script. If you don’t see the Broadlink on your list of Wifi options, it’s not in AP Mode.

Mark,
this is exactly my step. The remote wifi a discovered and connected to with my win10 laptop is named “Universal Remote34b25a”.
I’ve tried with another brand new RM4C mini and I get same issue.

Did you get the latest version from https://github.com/mjg59/python-broadlink
If so, then as far as I can see, the only difference is I’m on RM4 Mini and your on the RM4C Mini :frowning:

So thanks for the help @zoogara for getting me to this point but finding i can’t seem to communicate with the RM4 Pro. Has anyone managed to achieve direct communications with it?

Using python-broadlink
Connected to the network and appears to be talking to it

  • devices[0].auth() > True
  • devices[0].host[0] > ‘192.168.1.172’
    Cant get the type (so this may be a concern or compatibility issue)
  • devices[0].get_type() > ‘Unknown’
  • devices[0].enter_learning() > AttributeError: device instance has no attribute ‘enter_learning’

Broadlink Manager > “Writing compatible device not detected!”

Home Assistant 0.109.0b5 (Using as Remote)

  • Shows in the Overview as Remote
  • Service Call : remote.learn_command
    –entity_id: remote.broadlink
    –device: Samsung
    –command: On
    –alternative: true
    –timeout: 15
    – ERROR (MainThread) [homeassistant.components.broadlink.remote] Failed to learn ‘On/Samsung’: no signal received

Broadlink App - I can add devices and control them no problem at all

I can’t help but think possibly the RM4 Pro isn’t supported

@Virtual-Nomad - run this python script: debug.py

It will create a file called debug.txt, you can look in that to confirm that your RM4 is able to communicate locally.

Also, post your broadlink config from your configuration.yaml. I have my RM4 defined both as a switch and a remote.

Lastly - never add your remote to the Broadlink app, it will block local communication.

RM4 Pro is on the list of supported devices:

type

(string)(Optional)

Device type. Choose one from: rm , rm2 , rm_mini , rm_pro_phicomm , rm2_home_plus , rm2_home_plus_gdt , rm2_pro_plus , rm2_pro_plus2 , rm2_pro_plus_bl , rm_mini_shate , rm_mini3_newblackbean , rm_mini3_redbean , rm4_mini , rm4_pro , rm4c_mini , rm4c_pro .

@zoogara config yaml is rather basic

remote:

  • platform: broadlink
    host: 192.168.1.172
    mac: 24:df:a7:b9:c0:5a
    timeout: 15

I have installed debug.py but feeling not really sure how to invoke it. and can’t find much detail. any guidance?

Small update updated my configuration.yaml for a switch configruation
switch:

  • platform: broadlink
    host: 192.168.X.Y
    mac: 24:df:a7:b9:c0:5a
    type: rm4_pro
    timeout: 15
    retry: 5
    switches:
    tv_samsung_power:
    friendly_name: “Samsung TV Power”
    command_on: ‘PowerOnIRSequence’
    command_off: ‘PowerOffIRSequence’
    tv_samsung_volume:
    friendly_name: “Samsung TV Volume”
    command_on: ‘VolumeUpIRSequence’
    command_off: ‘VolumeDownIRSequence’

Both IR Sequences captured using
broadlink.learn
host: 192.168.X.Y

So that is promising.

However, I can’t get it to record RF, which was actually the primary purpose for purchasing the unit :slight_smile:

Thanks again for help getting to this point @zoogara

@Virtual-Nomad I think there is a ticket open re RF, something about packet length. Search the forums as I can’t find the link I was reading but maybe you will have more luck.

I use Sonoff bridge running Tasmota for my RF so I can’t really assist.

1 Like

@Virtual-Nomad I had a thought, did you try broadlink.learn and broadlink.send for RF? You need to grab the packet out of the notification on learn, then specify it when you call the .send service.

Also make sure it is correctly defined as a switch, with the type, to use these services.

@zoogara yes thanks mate could only get it to record IR. Which worked well, will search out the Possible RF issue you’re revered to

@Virtual-Nomad

I have the exact same problem, been searching through forums and all the different methods trying to get the rm4 pro to learn RF commands.

  • the learn command seems to time out
  • the E-Control app doesn’t want to add the rm4 pro as a unit
  • Nodered doesn’t recognise the type of the RM4 pro
  • Unable to added to broadlink manager either

I’m all out of ideas, might just need to buy an older version or get a sonoff bridge…

Feeling like I am heading that way as well

the E-Control App won’t add the rm4 pro as a device…
I can only use the new broadlink app

HA version 0.109.4 released already
Does broadlink.send works for anyone with RM4C mini ?
It’s should be supported on version 0.109 already.

@alexmo - Are you defining it as a switch? The broadlink.send and .receive service use the switch definition, not the remote definition.

Sure,
It is not the first time that I’m using Broadlink RM mini,
I’ve only modified to '‘rm4c_mini’ instead of ‘rm_mini’ + the IP & MAC addressees
As following:

switch:
  - platform: broadlink
    host: !secret broadlink_host
    mac: !secret broadlink_mac
    timeout: 15
    type: 'rm2_pro_plus2'
    friendly_name: 'Broadlink kitchen'

  - platform: broadlink
    host: !secret broadlink_mini_host
    mac: !secret broadlink_mini_mac
    timeout: 15
    type: 'rm4c_mini' #'rm_mini'
    friendly_name: 'Broadlink parents bedroom'

Maybe I need to remove the device from Broadlink App first ?
I’ll check it later today.
Anyway did you manage to use the RM4C like I tried ?

I’m using the RM4 mini, but I had to:

  • remove it from the Broadlink app
  • re-enrol it on my network using python-broadlink and AP mode. The most succinct description of doing that is here: Broadlink RM4 Mini
  • run debug.py if you want, it will discover all local Broadlink devices - confirm local communication and create a file called debug.txt
1 Like

Thanks @zoogara

I used the python script, that you mention… and it’s finally working !!

Thanks again.

I am able to get so far to read from my RM4 Pro using the learn command. The light comes on and disappear after receiving an IR signal but I cannot find the command saved anywhere. This is not under STATES and also not under the Overview Page

Running HA 110.3

Please help

Thanks