Broadlink RM mini 3 home assistant

Hi,

There’s a example in the broadlink component page (see the broadlink.send - select_tv_source). There’s some room to improve by using yaml anchors and packages. So… a your package file could look like this:

homeassistant:
  customize:
    package.node_anchors: # This is just a dummy entry
      key1: &key1 <broadlink ir code for key1>
      key2: &key2 <broadlink ir code for key2>
      key3: &key3 <broadlink ir code for key3>

script:
  select_channel_123:
    sequence:
       - service: broadlink.send
         data:
           host: 192.168.0.107
           packet:
             - *key1
             - *key2
             - *key3
  select_channel_321:
    sequence:
       - service: broadlink.send
         data:
           host: 192.168.0.107
           packet:
             - *key3
             - *key2
             - *key1

of course, there’s room to improve even more :-).

@clyra thank you for taking the time to reply! I’m not too Familiar with package and Anchors… reading the section on Broadlink.send do I put this into my script file? And make a script with the following
script:
tv_channel_103:
sequence:
- service: broadlink.send
data:
host: 192.168.0.107 (my IP address)
packet:
-
“Key for 1”
-
“Key for 2”
-
“Key for 3”

If that is correct how do I call the script to my configuration.yawl file? For it to become a switch to add to HomeKit?
Thanks again…

Sorry configuration.yaml

now it’s my time of not being familiar… Dont know how homekit works but you may use template switch to call the scripts.

Hi, I’m running HA 0.94.1 and I am not able to use my RM mini3 with it. How did you manage to make it work?

my config yaml is:

switch:
  - platform: broadlink
    host: 192.168.1.249
    mac: "xx:xx:xx:xx:xx:xx"
    friendly_name: RM mini 3

When I try to use the broadlink.learn service I get a nice message in the log file…

2019-06-10 21:47:32 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to device

I read about some bugs in versions prior to 0.92… but I hope it was solved in 0.94.x; any idea?

Thanks!

edit: I tried several types (rm_mini, rm2_pro_plus…) but it does not make any effect.

hi @apedrosac, the line where your mac address is change " to ’ I think that’s why its not working. so mac: ‘xx:xx:xx:xx:xx:xx’
get rid of friendly_name: and replace with type: rm_mini
let me know if that works…

Thanks jack123uk for your answer.
I modified my .yaml, now it looks like:

switch:
  - platform: broadlink
    host: 192.168.1.249
    mac: 'xx:xx:xx:xx:xx:xx'
    type: rm_mini

But, unfortunately, no changes… I got the same message:

2019-06-11 16:47:00 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to device

On the other hand, I have tried the Broadlink Manager from Tomer_Klein

no success…

Well the only other thing is if it can’t connect are you sure your IP address and MAC address are connect… does the broadlink manger connect to your rm mini 3 when you press scan? That will also bring up the ip address and MAC address that you need to use!

You have connected the rm mini 3 up by the app first haven’t you android or iOS app?

Hi again @jak123uk,

Yes, I used the Broadlink App in my android device to setup the RM mini 3. It is correctly connected to my WiFi network. I can see it in my router’s list. I have also assigned a fixed IP to it based on the MAC address.

Using the App, I can see that firmware is updated and I configured some IR Remotes.
Everything is working fine when I use the smartphone as remote controller.

But…
Broadlink Manager does not see it, even if I modify the .json config file.
Same happens with HA…

Good news!
I made a reset to the RM Mini3 and reconfigured it using e-Control App from Broadlink.
Now it is correctly connecting from either Broadlink Manager and Home Assistant.
Thanks @jak123uk!

1 Like

That is great news… glad you got
It working!! If you are trying to program tv channels let me know I will help you

I’ve a similar problem with my RM Mini 3

Failed to connect to device
15:48 components/broadlink/init.py (ERROR)

PS: I’m able to ping the RM Mini 3 (it’s very close to my Nightawk x10)

Hi @valerix85 , please post your config… elsewhere, it is difficult to help you!

Hi @jak123uk,
sure I will try to program TV channels, I’ll let you know.
For the moment, just playing with it.
By the way, any hint in getting to know if the TV is already ON or OFF (in case someone used the “boring” :stuck_out_tongue_winking_eye: TV remote as usual)?

Hi @apedrosac I’ve fixed using the Android App “Broadlink RM Plugin Lite” because the broadlink component is not working with the latest version as you can see here:

Hey @jak123uk

Any chance you could paste the part of your configuration.yaml that brings volume control to HomeKit?

It is two switches, one for volume up and one for down?

Thanks mate!!

Hello good people,

even though this has not been active for a while, i’ll give it a try:

Just got my RM mini 3 in the mail, set it up using the broadlink app, then added

switch:
  - platform: broadlink
    host: 192.168.2.181
    mac: 24:DF:A7:42:DD:3F
    type: rm_mini

to my configuration.yaml, saved the file, restarted Hassio and am now seeing e.g. the remote.send command in dev-tools. Nice.

However now i am stumped what to do next. How exactly do i teach IR-commands, how do i trigger them in lovelace and how do i expose them to Node-Red? I am pretty new to HA and not so good with code, so please dumb it down for me!

Thanks in advance!

If you’re running Windows I’d recommend you start by using Broadlink Manager This is referenced above as well for the record. Using that it will spit out hex and Base64 encoded commands that it records for each button. You want to use the Base64 output for your scripts. Always make sure it has “==” at the end and add it if it doesn’t have it. It’s my understanding that’s required, but I honestly never verified it because there are a number of posts here that indicate that it’s required so I’ve just always done so!

Once you have some/all of your button commands mapped for some/all of your remotes then you can start creating scripts to use those mapped buttons. For example, to turn my TV on or off…

tv_on:
  alias: TV
  sequence:
    - service: broadlink.send
      data:
        host: !secret rm_mini_ip
        packet:
          - "JgCQAAUAAdFOFCcUFBMoEhQTKBMUFBMTJxQTFBcRExMUAANLTxMoExMTKBMTFCkTEhQTFCcUExUUExIUEwADS08UJhMUEycUExUmFBMUExQoFBIUExQUExMAA0tPEycUExQoExUSJxMUFBQTJxMUExQUExQTAANLThMoExMUKBMTFCcUExQUEyUVFBQTFBMUFAANBQAAAAAAAAAA=="

In my case I generally just use that by telling Alexa, “Turn [on|off] the TV” at that point. You could also call it via an automation if you so desire.

1 Like

Thanks for the answers - unfortunately i have no Windows in the house, i’ll try once my girlfriend has her Surface around.

I saw that there is a way of calling the “learn” service in HA, however that is not working for me. Any ideas?

About the scrips: So i have to write such a script for every single command i want the broadlink to send out? And where do these scrips go? In the config.yaml, or in the “script” section in Hassio? If the latter, do i put them all in one file?

In the end I want to be able to trigger actions from within node-red, using inputs from the Google Actions API, so that i can tell Google Home that i want to watch a movie and it’l trigger the Node-Red flow to set the lighting scene, close the blinds, start my beamer and fire up the audio system. (I know this could probably all be done from within HA scripts, but NR is a thousand times more intuitive for me than scripting)