Switch.broadlink for RM pro plus 2 "could not be set up"

Hello all, hope everybody’s fine. I have been working hard to set up Home Assistant (presently 0.109.6, System HassOS 3.13) to control my roller blinds according to the sun set and rise time. I feels there is much to be proud at all I’ve achieved: It’s up and running, I have some Hue lights automation working, I succeeded in grabbing RF codes with Broadlink Manager, which also identifies my Broadlink as rm2_pro_plus2. (I can send a command to a blind with it also) Next think is to get a basic communication with Broadlink with HA. No success after reading everything. I am anxious to start automating the blinds. I feel I might be close…

I first set this up as Remote, thinking I would be able to call the service “remote.send.command” on entity “remote.broadlink” that shows up in the Developer Tools, like this:

  - platform: broadlink
    host: 192.xxx.0.xx
    mac: xx:43:0D:xx:9C:xx

but I need a Devide ID and a command to send, don’t know where to set those up. (I thought I could send a RF string but apparently not)

I also read that it should not be set up as remote, but as a switch, so I tried this, but I get “The following integrations and platforms could not be set up: Switch.Broadlink” and “Invalid config for [switch.broadlink]: not a valid value for dictionary value @ data[‘switches’][‘blind’][‘command_on’]. Got 'sgB4AhkMDBgNFxkMGAwZCw0YDBgZ…”

  platform: broadlink
  host: 192.xxx.x.xx
  mac: B4:xx:xx:xx:xx:xx
  type: rm2_pro_plus2
  timeout: 15
      friendly_name: "Store 1 ouvrir fermer"
      command_on: 'sgB4AhkMDBgNFxkMGAwZC....'
      command_off: 'sgC8AhgMDRcNGBgM....'

I erased all the automations I had on the Broadlink app so it is not because of Cloud setup interfering.

I see two Broadlink instances connected with my wifi router, but only one works to make appear a broadlink.remote entity so I disregard the other one.

Would someone willing to help me ? Thank you for your interest, I would appreciate immensely.

here is mine

I dont have the remote: section

in my switches section I have

  - platform: broadlink
    host: bla.bla.bla.bla
    mac: ' Its mac address '
    timeout: 15
        friendly_name: "Gas Heater"
        friendly_name: "Gas Control"
        friendly_name: "Sound Bar"

note the -
at the platform:

Thank you very much for your answer.
The “-” added changes nothing. I still get the error.

  - platform: broadlink
    host: xxx
    mac: xxxx 
    timeout: 15
      store1: *#previously "blind"*
      friendly_name: "Store 1 ouvrir fermer"
      command_on: 'sgB4AhkMDBg...'
      command_off: 'sgC8AhgMD...'

So I haven’t succeeded in setting the switch but I see a service called “switch.turn_on” and an entity “switch.blind”. Shouldn’t I get an entity named “store1” ? ( I changed the name of the switch I am trying to set up from “switch” to “store1” for fun of trying to get something under my control)

If I indent everything one space further to the right I have the reported error no more, but no better success in setting the switch.

I was successful in setting up the temperature sensor of the rm2_pro_plus2 and a basic automation with it !

Now the entity switch.blind has disappeared…

I am now trying every one of those: rm , rm2 , rm_mini , rm_pro_phicomm , rm2_home_plus , rm2_home_plus_gdt , rm2_pro_plus , rm2_pro_plus2 , rm2_pro_plus_bl

I’ve tried different indentation schemes…

What could be next ? Should I try a different type of HA install ? In Docker in Linux ? Buy a different Broadlink box ?

Best regards to all

Can you capture IR/RF through HA using the broadlink.learn service? Or send any?

Thank you !

I don’t have a broadlink.learn service
I don’t remember exactly how, at one point I was trying with Broadlink Manager and the learn command in HA at the same time and suddenly rf codes appeared in HA.

Using remote.learn_command service and remote.broadlink entity, calling service makes a light come on on the Broadlink box. Pointing a IR device makes it blink, pressing repeatedly eventually makes it shut off, but no learned code to be found. RF device does not make the light blink. This would be for troubleshooting purposes only since I already grabbed the RF codes with Broadlink manager.

Wrong RF codes would not prevent the switch from registering, would it ?

did you check in the Developer tools under services

click the call service and the broadlink light should go orange press a button on the remote

and then in the notifications you should see


it be differance ok

Ok, so you deleted the Broadlink integration as a switch and you’re using as a remote. If the light on the device turns on when you use remote.learn_command, then you’re using it correctly. If it is on, you should see a persistent notification with the command captured or, if nothing was captured, you should see a persistent notification saying something like “no signal was received”.

This might be a long shot, since I had a different issue than yours. I have a Broadlink RM Mini 3 (new black bean). I wasn’t able to capture any command through HA (I’ve set it up as a switch since I was using with SmartIR), no light feedback on the device when using broadlink.learn service. Then I would get the “no signal received” notification. Like I said, long shot, but worth a try:

I deleted the Broadlink RM Mini from the app, which made it blink fast waiting to be set up. Then I added it again, but only to the point where it connects to my local network, I didn’t assign it to a home/room. That made it work locally (LAN control) and not exclusively through the Broadlink cloud.

Maybe this would work for you. I don’t know.

But it would be nice to know.

Also, there was an identation problem here:

  - platform: broadlink
    host: xxx
    mac: xxxx 
    timeout: 15
      store1: *#previously "blind"*
        friendly_name: "Store 1 ouvrir fermer" #right here
        command_on: 'sgB4AhkMDBg...' #right here
        command_off: 'sgC8AhgMD...' #right here

Thanks, Bruno,

I don’t see my indentation mistake…this must be it then. Would you explain precisely ?

I redid the “delete the RM from the app, add it again stopping before adding to a room” etc. I noticed a warning that my wifi was 5Ghz and should be 2,4 Hz so I thought I had the solution, but after turning the 5Gz off, nothing better.

I get “Failed to learn ‘Turn on/television’: No code received” when trying to learn IR (but got the light to blink and shut off), nothing when trying RF.
And still get “The following integrations and platforms could not be set up: Switch.Broadlink” and “Invalid config for [switch.broadlink]: not a valid value for dictionary value @ data[‘switches’][‘blind’][‘command_on’]. Got 'sgB4AhkMDBgNFxkMGAwZCw0YDBgZ…”


I’ve got the same wi-fi warning. It’s ok.

It’s odd that you can light up the device, but you get an integration error.

Try just this, remove everything else related to the Broadlink integration:

  platform: broadlink
  host: 192.xxx.x.xx
  mac: B4:xx:xx:xx:xx:xx
  type: rm2_pro_plus2

#remove the switches as well

Assuming you did the steps of adding your Broadlink to your wireless network but not to a home:

Then go to Services and call the broadlink.learn service pointing the host in service data to the correct IP address.

Point some remote to the RM Pro Plus 2 and press and hold any button of said remote.

I’m running out of ideas; :smiley:

OMG I lost the error message !
Before reading your last reply, because you mentioned a indentation error earlier, I removed everything regarding the switches, copied a setup from Rollertroll web site (roller shades manufacturer) and I now have the Broadlink services send and learn.
I can move forward now, I’m so happy !

I’ll take time to find out where my indentations errors were , Thank you so much !

Be well…

1 Like

The error was showing because my base 64 code was not right. I read that it had to be multiple of 16 characters or something…
We must be ultra cautious with indentation, the right kind of apostrophe or question marks (not curled), the right code format etc. Fo somebody who is getting into this HA adventure, know that when you think you understand this, you need to be even more prudent than you thought…