Broadlink RM4C mini configuration

@huu I tried following your other instructions…connected iPhone to Broadlink RM4 wifi, did the add device and universal remote and waited for it to discover device…no dice.It ends up as before saying that APP is searching for device AP named “Broadlink_WiFi_Device” and then times out

This gets weirder by the minute. I was about to throw in the towel and return the device when I went into integrations in HA and saw the RM4C-mini! This is quite mysterious to me since every time I tried to add the integration it asked for an IP address and any address I gave it failed. In any case, I was willing to accept magic and so I went to Developer tools and attempted to learn a command (simple power on/off for the TV). I got nowhere except that when I call the Learn Command service, the light on the RM4C mini goes on and when I point the remote and hit the power button it goes out. So SOMEHOW the HA is able to talk to the RM4C. How do I do a simple test to verify that HA can learn and send a command?

Glad you get somewhere, If its show up in HA integration then it definitely connected, Easiest way is use SmartIR custom component. Learning code in HA is complex and time consuming. Go have a look there and see if if your device brand is listed. They have all the common brand LG, Samsung TV, Daikin Aircon etc.

at this point you can try to get it in Broadlink app again. see if it can discover the device when your phone is in the same wifi. Wait at the last step when you choose RM4C but dont choose anything just wait few minutes.

Yes, definite progress. What is the easiest way for me to learn on IR command (Power on/off TV) just to satisfy myself that I can get HA to control a device via the RM4c?

I am able to add the device on the app now but of course that is of secondary importance to making it work with HA.

The intruction for RM4 to learn code is here

go here scroll down all the way to bottom look for your TV

SmartIR/MEDIA_PLAYER.md at 5b1340b4bf7f475ecdf9d58651ee677620178845 · smartHomeHub/SmartIR · GitHub

then put this in your configuration.yaml

switch:
  - platform: broadlink
    mac: MAC_ADDRESS
    switches:
      - name: Your TV
        command_on: JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA=
        command_off: JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA=

restart HA and use the switch to turn on and off your TV

In case anyone experiences similar difficulties in getting their RM4C on the network and talking to HA, I think that the way I finally got it working was by using Rm-Configurator (GitHub - zchumager/RM-Configurator: Python CLI Tool to make RM Mini compatible with Home Assistant (HASSIO). Although, quite honestly I tried so many times with that code and the app, without apparent success, that it is now hard to say for sure what worked.

Once you have it in the HA integration then it will shown up as [remote.rm_name]… now you just need to create, script, switches, button etc to call on to it and blast IR signal out.

@huu Yippee! I was able to learn and send a command. Thanks so much for you patient assistance!

glad it worked. i got the bestcon rm4c and it was a nightmare. next time go for the original broadlink rm4. its alot easier.image

What is the difference between them? Frankly, I got the RM4C on AliExpress because it was inexpensive enough that if it failed to work, I would not be upset. Is the RM4 you refer to on Ali as well?

Also, in your above post you had codes for command on and off but those differ for each TV, so I presume that was just for illustration?

They work exact same way, some seller sell both choose diff model when check out. The original broadlink maybe few dollars more, but with an advantage you can buy a special power cable (HTS-2 cable) with temp and humidity sensor to integrate into the RM4.

yes the code is just example

@huu I am wondering if it is possible to use an IR remote to control HA? I know I can lean IR and Send IR but can I react to IR (not for learning) to execute a script or action? If so, how is this setup?

I suspect not because the RM is built as a “IR transmitter” it can learn only when it put in a “learning mode” which it stay only for a short time and it will revert back to transmitter mode.

You would need a hardware IR reciever connected to the Pi, HA have a built in integration LIRC for that purpose.

@huu Thanks, I figured that might be the case but I thought perhaps someone had hacked the RM4c since it is obviously HW capable of receiving and transmitting. For example, I imagined putting HA into receive_command mode and wait for the IR but instead of storing it, passes it to HA as an event that can be used in some way. and then put it back in receive_mode.

@ihf1 i was thinking exactly the same as you. Have you progressed this? I’d rather purchase an off the shelf IR receiver than build one. I’m pretty new to HA and building my own electronics is a rabbit hole I’d rather not go down at the moment. Got too many other rabbit holes on the go

@HoundDog it works fine although I was a bit disappointed at the relatively short distance it operated as compared with an ordinary remote. I used rm-configurator to get it on the wifi network.

I keep trying and trying and trying to get my new RM4C Mini to be recognized by HA, but am having no such luck. What am I doing wrong? The Broadlink app recognizes the device and my router gives it an IP address. When I try to set up the Broadlink integration and enter the IP address of the RM4C Mini, HA keeps responding with Device Not Supported.

  1. Open Home Assistant and install “SSH & Web Terminal” add-on
  2. Disable Protection mode
  3. Click “Terminal” on the sidebar and install the patch: run the following commands, line by line

docker exec -it homeassistant /bin/bash
pip3 install git+https://github.com/mjg59/python-broadlink.git@new_product_ids --force-reinstall --no-deps

  1. Restart HA

Not taking credit for this, found it somewhere in these threads but can’t find the source. This will stop working after every update to HA until the fix is pushed into HA itself.

Seems that the HA-version you are running is quite outdated. I bought a couple of Broadlink Bestcon RM4C mini in back in May 2022 (HA core-2022.5.x at that time) and the RM4C minis were instantly fully integrated through the Broadlink Integration. See also your cross-posts here and here.

1 Like

This is still a problem. Follow these instructions to solve it:

This solution worked for me to reconnect RM Mini 4 with Home Assistant

Setup RM mini 4 into AP Mode to connect with Broadlink app:
1- Long press the reset button until the blue LED is blinking quickly (like 7 seconds).
2- Long press again until blue LED is blinking slowly (like 14 seconds).

Configure RM mini 4 with Broadlink mobile application
1- Install broadlink app in your cellphone: https://play.google.com/store/apps/details?id=cn.com.broadlink.econtrol.international
2- First Open Press plus sign (+) to open menu then press Add device
3- Press Add a new device then press Universal Remote
4- Select your RM Version then press Next (My case RM4 mini - 2019 version)
5- Press button to confirm you are already connected

Add Air conditioner to RM Mini 4
1- Press RM mini already configured then press plus sign (+) to open menu
2- Select AC Remote Full Display
3- Press Add appliance button

Unlock RM Mini and Get IP address for Home Assistant
1- Press RM mini already configured
2- Press elipsis sign (…) to open menu
3- Press property
4- Disable toggle with label Unlock device
5- Press Device information then get IP Address displayed into their corresponding section

Docker configuration
1- Install docker in Raspberry with get.docker.sh script with curl

curl -fsSL https://get.docker.com/ | sh

2- Verify docker installation

docker --version

My Docker compose file

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "homeassistant/home-assistant:2023.6.2"
    volumes:
      - /home/admin/Repos/domotic-server/container/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
  • Start Home Assistant using docker-compose.yml

docker compose up -d

Home Assistant configuration

1- Navigate to http://localhost:8123/ in the raspberry or http://<raspberry.pi.ip.address>:8123/
2- Let Home Assistant to autodetect your location
3- Add Broadlink integration and set RM mini’s ip address given by broadlink mobile application
4- Click the device labeled with Chinese characters then click the gear icon and finally set a better readable name (My case RM Mini 4)
5- Stop Home Assistant Container from domotic-server directory with command: docker compose down
6- Clone repo GitHub - smartHomeHub/SmartIR: Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
7- Copy custom_components into container/config directory generated by docker
8- Open container/configuration.yml then paste example configuration, below existing configuration
9- Set name and unique_id with values set on Broadlink mobile app for the Air Conditioner device

# put below Home Assistant existing configuration in container/configuration.yml

smartir:

climate:
  - platform: smartir
    name: <Name of the device defined in the app>
    unique_id: <name_of_the_device_defined_in_the_app_separated_by_underscore>
    device_code: 2100
    controller_data: remote.zhi_neng_yao_kong


# For further information visit https://github.com/smartHomeHub/SmartIR/blob/48d7f1ff3865aeddb5bcb493177df7e868193b7d/docs/CLIMATE.md