Adding more than one Broadlink RM Mini 3

Good afternoon all,

I have been trying to find out what it is that I am doing wrong in trying to add two Broadlink RM Mini’s. They’re in separate rooms, they’ve been added as integrations and the remotes themselves show up, but I can only get one to transmit codes. As soon as I add the codes for the second the first one’s commands disappear from my set up - though they’re still showing in the configuration.yaml and the switch.yaml.

I’ve now moved everything to do with the Broadlink remotes in the switch.yaml and with one, again, it runs fine. Add in the second one and I get the following error message when I try to test the config:

Invalid config for [switch]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 12). 

However, when I look at my configuration.yaml the line referring to switches isn’t on line 12, it’s on 13. I can’t see anything in the switch.yaml either.

Configuration.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
input_boolean: !include input_boolean.yaml
switch: !include switch.yaml

My switch.yaml file goes like this:

switch:
- platform: Broadlink
  host: 192.168.68.153
  mac: 24-DF-A7-36-D4-38
  switches:
    - name: Samsung_3D_Power
      command_on: "JgCMAI6VEjgSNxI4ERQRFBETEhMSExE5EjcSOBITERQRFBETEhMRFBE5ERMSExEUERQRFBETEjgSExE5EjcSOBI4ETgSOBEABgmPkhQ4EjgRNxMTEhMRFBEUERQROBI4ETkRExITERQRFBEUERQROBITERQRFBETEhMRFBE5ERQROBI4EjgROBI4EjgRAA0FAAAAAAAAAAAAAAAA"
      command_off: "JgCMAI6VEjgSNxI4ERQRFBETEhMSExE5EjcSOBITERQRFBETEhMRFBE5ERMSExEUERQRFBETEjgSExE5EjcSOBI4ETgSOBEABgmPkhQ4EjgRNxMTEhMRFBEUERQROBI4ETkRExITERQRFBEUERQROBITERQRFBETEhMRFBE5ERQROBI4EjgROBI4EjgRAA0FAAAAAAAAAAAAAAAA"
    - name: Samsung_3D_Source
      command_on: "JgCMAI+UEzYTNxM3ExITERMSExITEhE4FDYTNhQSExETEhMSExITNhQRExITEhMSExITERMSExITNxM2EzcTNxM2EzcTNxMABgKVlBM2EzcTNxMSExETEhMSExITNxM2ETkTEhMRFBETEhMSEzcRExQRExITEhMSExITERQRETkTNxM2EzcTNxM2EzcTAA0FAAAAAAAAAAAAAAAA"
- platform: broadlink
  host: 192.168.68.101
  mac: A0-43-B0-77-07-0E
  switches:
    - name: Lily TV Power
      command_on: "JgCMAI2SEzYTNhI3ExISEhMRExITERM2EzYSNxMRExITERMSEhITEhI2ExITERMSExETEhISEjcUEBM2EzYTNhM2EjcSNhMABg+SkxI3EjYTNxISEhITEhISExETNhM2EzYTEhISExITERMSEhISNxMRExISEhQREhIUEBM3ExESNxI2EzYTNhM2EzYSAA0F"
      command_off: "JgCMAI2SEzYTNhI3ExISEhMRExITERM2EzYSNxMRExITERMSEhITEhI2ExITERMSExETEhISEjcUEBM2EzYTNhM2EjcSNhMABg+SkxI3EjYTNxISEhITEhISExETNhM2EzYTEhISExITERMSEhISNxMRExISEhQREhIUEBM3ExESNxI2EzYTNhM2EzYSAA0F"
    - name: Lily Speakers Power
      command_on: "JgBYAAABI5QSExITEhMSORETExISFBETEzgSOBE5EhMSOBQ2EjgSOBMSEhQSEhMTETkSExEUEhMSOBI4EjgTOBETEzgSOBE4EwAFIwABKUoSAAxhAAEoSxEADQU="
      command_off: "JgBYAAABI5QSExITEhMSORETExISFBETEzgSOBE5EhMSOBQ2EjgSOBMSEhQSEhMTETkSExEUEhMSOBI4EjgTOBETEzgSOBE4EwAFIwABKUoSAAxhAAEoSxEADQU="
    - name: Lily Speakers Optical1
      command_on: "JgBQAAABIpUSFBETExISOBMTERQSEhMTEjgSOBI4EhMSOBI4EzgSOBE5EhMSExITEjgTEhITEhMSExM4EjgROBMTETkSOBI4EgAFJAABKEsTAA0F"
    - name: Lily Speakers Direct
      command_on: "JgBQAAABJJQSExITEhMTOBETExISFBISEzgSOBI4EhMSOBM3EjgSOBM4EjgRFBITEjgSExITEhMSExITEjgTOBETEzgSOBE5EgAFJAABKEoSAA0F"

I’ve shortened it to save scrolling, but is there anything that I need to change in this set up to get things working as I really am stumped?

Thanks in advance,

Tom

I have two Broadlinks running, though admittedly one mini and one pro.

After adding them as integrations I did not use any .yaml. Instead I used Developer Tools and the remote learn_command service, which allows you to select which entity you wish to associate with the command.

It’s a bit laborious if you have a lot of commands, but works well.

1 Like

Thanks for that. I did that for the learning of the commands, but the way I saw (YouTube) meant you then had to go to the .yaml file.

How did you get the commands to show up in the list as they didn’t show up for me until I wrote them in the .yaml file. Sorry, I’ve not yet had Home Assistant running for a week and I’ve zero experience of coding. I’ve made some big strides in a week, or it feels it, but this one has me scratching my head!

This is the tutorial that I used.

Not sure what you mean by “show up in the list”.

Do you mean when you are using the UI to write automations etc.? If so, there is no list of commands. You get the “call service” panel and choose with remote you want to use:

…then you have to complete the service data manually.

Don’t know how I ended up with such ridiculous names for my broadlinks.

1 Like

In my ‘Developer Tools’, States list I have all of the commands that I wrote in listed as switches, which I can then use. That’s how I saw to do it. What I couldn’t do was get the learnt commands from the second remote to show up without over writing the original commands from my living room remote.

I suppose this way they’re not switches though, they’re remote commands so they won’t show up in the same way. I’ll have a look and see what I find. The screenshots are helpful, but I don’t have to do that code at remote.send_command (which is just as well as when I’ve looked at that I’ve had no idea what to write) in the automations I’m, in effect, flipping a switch.

Hm.

In my Developer Tools states list I only have the two remotes listed, with possible states “on” and “off” for each. (This is the remotes that are on or off, not the devices they are controlling.) No switches.

My understanding is that the devices being controlled by the Broadlink don’t exist as far as HA is concerned - only the Broadlink itself is integrated.

Silly question, but when you were learning the commands, did you give the two Broadlinks different names? The commands HA has registered are saved in the folder config/.storage and there should be a file for each Broadlink. If there’s only one they must be overwriting each other.

I did, they create two separate files, but when I added them to the configuration.yaml I was listing the IP and MAC addresses of each remote. It seems adding them as switches isn’t quite right and I need to learn the way you are doing it. I’m having a go at the moment but I’ve not had that much luck yet! I’ve got a lot to learn!

I’ve done it! Perfect, thank you very much for your help! It shouldn’t take too long to get them to work, but I have quite a list of commands to work through. Really appreciate the help :slight_smile: