Broadlink RM4 Mini

Thanks.

In that case I’d rather buy another to test on.
Too much to gamble with

Do you mean we shouldn’t ever open the app again? Because I’ve got another RM4 mini I would like to add, and I’m not sure how to go about it.

Use another device?
Delete the app and install again with a new account.

I think you can simply delete that RM from the app. It will still work with HA.

Sorry to take this back a bit, but I’ve now realised that the first RM4 mini I added doesn’t actually seem to show up as connected on my router’s network map, and instead shows as offline.

I added it to HA anyway (with switch platform) in order to verify, and it doesn’t receive any IR signals with broadlink.learn, which makes me think it’s actually disconnected from my LAN.

However, when I open the Broadlink app, I’m still prompted to add it to the app, which I always cancel.
I thought this meant I’d set it up right (closed the app immediately after WiFi was configured and before adding it to the app), but since it’s not showing up on my network, did I actually do something wrong?

I tried reinstalling the app and resetting the RM4 mini and configuring WiFi again, but it still shows up as connected for about a minute before going offline again.

Is this normal? Am I doing something wrong in the process? Or is my RM4 mini just faulty?

This is probably why I used python-broadlink to add mine. I think I had all sorts of problems doing it the App way.

Are you able to run Python scripts? Adding using python-broadlink is real easy once you have done the hard work getting the script to run.

If you can run Python scripts, the broadlink integration author also has a script that will confirm local comms and do a test learn.

See this post: Broadlink Integration - add support for RM4 Mini and have a read of that thread.

Alright, thanks! I’ll check that out. Not too familiar with Python but I’ll learn. :slight_smile:

Good luck. Maybe I will do a tutorial post. Seems to be plenty of people having issues.

All the info is here, just spread over several topics.

I’m still gonna give it a try anyway (been looking through several topics for information on how to do this correctly), but a tutorial would be really useful. I’m sure myself and many others would appreciate it.

I had a problem to set mi rm4 mini. It did showed up on the AP, but not in the app.
I must have resetted it like 15 times.

Then, i left for the night to sleep. Try the app next day, and it recognize the thing w/o doing nothing and set it up correctly. Later i learn about this script. Maybe one needs to wait a bit?

I have one working flawlessly in HA i only read the integration documentation, it says you have to avoid attach your rm4 mini to the cloud since it blocks the rm4 to work locally so once you put the wifi credentials close the app and asign a static ip in your router, then add it to configuration.yaml and that’s all

After looking through some of the other Broadlink topics and a lot of trial and error, I managed to get my Broadlink devices added to my network using python-broadlink, so I’m gonna post the steps I took, in case anyone else needs help with it.

Do keep in mind that I’m by no means an expert at this (as is obvious from my helpless posts in this thread alone haha), so there might be better, more efficient methods to do this that I overlooked. This is simply what worked for me.

  1. Run PowerShell as admin in Windows.
  2. Follow these instructions to install Python 3 via Chocolatey https://docs.python-guide.org/starting/install3/win/#install3-windows. You’ll need to install Chocolatey first, then use it to install Python.
  3. Enter pip install --upgrade https://github.com/mjg59/python-broadlink/archive/master.zip to install python-broadlink
  4. Set your Broadlink device to AP mode and connect to it via wifi
  5. Enter python to start Python
  6. In Python, enter import broadlink
  7. Then enter broadlink.setup('myssid', 'mynetworkpass', 3), where the first 2 parameters are your own wifi info. Check the python-broadlink Github for more info on the parameters.
  8. If done correctly, the indicator light on the Broadlink device should stop flashing and it will show up in your local network.
  9. To verify, while still in Python, enter devices = broadlink.discover(timeout=5) and wait it to finish
  10. Then enter devices[0].auth(). It should return true
  11. Finally enter devices[0].host[0] to get the device’s IP address on local network.

That should do it! Hope this will be of use to anyone who encountered issues using the app and is looking to use python-broadlink instead.

3 Likes

this worked fine for me. At the end I could see the IP. Now what?

If your Broadlink device is already connected to your local network, you can either capture IR codes using the broadlink.learn service on HA (search for the HOW TO OBTAIN IR/RF PACKETS section here, or capture RF codes using broadlink_cli (explained here).

Has anyone used the sensor on the rm4 mini hts2?

Managed to install hts2 as sensor but the temperature value is showing as unknown unfortunately. Otherwise, rm4_mini is working good like my rm3 mini.
Hoping for new updates that will make hts2 work wonders.

Anyone managed to succeed in getting the temp and humidity reading from hts2 + rm4_mini combi?

after restarting the raspberry it already works with this configuration

sensor:
  - platform: broadlink
    scan_interval: 60
    host: ip
    type: rm4_mini
    mac: mac
    monitored_conditions:
      - temperature
      - humidity

I use 0.111.4

Thanks for sharing the configuration sample!
It seemed that it might be just the formatting and arranging of the parameter but its all good now :smiley:

I received my HTS2 sensor for my RM4 Pro. Installed it and added the sensor to HA. The digits are displaying as

26.99 C
61.32 %

How can I omit the last digit?

Using templates:

Here is an example where I do a calculation on a raw air pressure vales and convert it to MSL, then limit it to one decimal place:

  # reads 1 hPa high compared to local stations
  - platform: template
    sensors:
      outside_pressure_msl:
        friendly_name: "Outside Air Pressure MSL"
        unit_of_measurement: hPa
        value_template: "{{ '%0.1f'|format(((states('sensor.outside_air_pressure')|float * (1 - (0.0065 * 175) / (states('sensor.outside_temperature')|float + (0.0065 * 175) + 273.15)) ** -5.257) | round(1)) - 1)  }}"
        icon_template: mdi:gauge

This is doing calculations based on the original sensor:

  - platform: mqtt
    name: "Outside Air Pressure"
    state_topic: "tele/extbridge/SENSOR"
    value_template: "{{ value_json['BME280'].Pressure }}"
    unit_of_measurement: "hPa"

If you already have a correct value, you just need to apply the format.