Broadlink commands and configuration

I have set up several broadlink devices around the house and they are integrating automatically with Alexa but I am not able to get them working on my HASSio.
Following the Component Broadlink RM switch instructions I have put the following in my config file:

Broadlink

switch:

  • platform: broadlink
    name: Broadlink
    type: rm2_pro_plus2
    host: 192.168.1.36
    mac: ‘34:EA:34:43:36:72’
    timeout: 15

The “switch.broadlink_learn_command” doesn’t appear on the service page under development tools
Nothing seems to be coming up on my entities page and I have no idea how to generate the command on/off packets either.

bump
I am still struggling with this confusing broadlink set up.
I have now unplugged all except one device, a RM mini 3 and put the following in my yaml file:

  switch:
  - platform: broadlink
    name: 'Broadlink'
    host: 192.168.1.18
    mac: '34:EA:34:41:2E:7F'
    type: rm_mini_3
    timeout: 15
    switches:
      tv_panasonic:
        friendly name: "Panasonic"

How do I know if HASS is picking it up as nothing is coming up under “services” or “entities” in the development tools?
I’m finding this broadlink set up particularly tricky and searching the forum no one seems to have any “get packet” issues so I must be doing something silly.

I started with IR receivers learning the codes for my remotes but putting the codes in a format that I could send using mqtt seemed very complicated so went down the broadlink route thinking it would be a doddle as there is already a component for it.
I have spent so much time on this crap that I probably would have figured out how to send the raw code through mqtt by now and saved some money in the process.

I would very much appreciate some help on this from anyone that has got their broadlink up and running

What version HA?

There is issue with broadcom library that affect v66 an v67. I don’t know if it affect minicom but may be worth trying v65 HA to see if your issue improve

I have broadcom sp2 and in 66 it not see my switches and 67 it see but cannot control them

EDIT
Also check HA logs. I would see setup error for the switches in logs. If switch working you should see it on entity page in HA

I’m on HASSiO 0.65.5

I’m not sure where to find the HA logs, are they under developer tools?

Developer tools>>>“I” surrounded by circle

1 Like

Thanks for that. Yes I’ve seen that before but nothing there other then some updates on items like neato etc.

Looks like the broadlink is not being picked up then. I’ll try put an entry in my yaml for each of the 3 broadlink devices and see if it sees any of them. The instructions on how to “learn” the packets don’t seem to make much sense eithèr but I’m hoping things will become clearer once I can select the “learn command” under the entities.

I just have Mac,IP,type and friendly name…rest may not be required.

If found it likely won’t show in error log. Look in entity states page “<>”

I dont understand why its not coming up under entities.
I have reduced the yaml to the following:

switch 100:
  - platform: broadlink
    name: 'Broadlink Rotel'
    host: 192.168.1.11
    mac: '34:EA:34:43:36:72'

switch 101:
  - platform: broadlink
    name: 'Broadlink Panasonic
    host: 192.168.1.18
    mac: '34:EA:34:41:2E:7F'

switch 102:
  - platform: broadlink
    name: 'Broadlink LG'
    host: 192.168.1.14
    mac: '34:EA:34:58:AB:45'

I get the following error message:

2018-04-24 13:40:07 WARNING (MainThread) [homeassistant.components.switch] Setup of platform broadlink is taking over 10 seconds.
2018-04-24 13:40:07 ERROR (SyncWorker_11) [homeassistant.components.switch.broadlink] Failed to connect to device

in configuration.yaml

switch: !include_dir_list config/switches/  <== I make a folder  homeassistant/config/switches
group: !include config/groups.yaml  <== I make group.yaml at homeassistant/config/group.yaml

Inside switches folder I have 4 yaml files. broadlink1.yaml, broadlink2.yaml, broadlink3.yaml and broadlink4.yaml <== you can name whatever you like and easy for you to remember.

Insdie broadlink1.yaml file. I have switches that control by broadlink1

platform: broadlink
host: !secret ip_pro1
mac: !secret mac_pro1
timeout: 30
friendly_name: "Pro1"
type: rm
switches:
  kitchen_aircon:
    friendly_name: "Kitchen aircon"
    command_on: 'JgBAAGoAAUESMxESEBIQEhA0EBIREREREREREREREREREhERERESEBIyEhARMxIQEhASMhIQEhASMhIyETMSEBEADQUAAAAAAAAAAA=='
    command_off: 'JgBAAGYAAUYPNQ8TDxMPEw81DxMPEw8TDzYONg8TDxMPEw8TDxMPEw8TDxMPFA4TDxMQNA8UDjYREQ8TDxMPNQ8ADQUAAAAAAAAAAA=='      
  office_light:
    friendly_name: "Office light"
    command_on: 'sgk0AAwjDCIMAAFeDCIkDCQMDCMMIyQMDCMkDCQMDSMMIyQMJAwMIyQMDSMkDAwjDCIkDAwjJAwAAAAA'
    command_off: 'si80AAwjDCMkDA0iJAwkDA0iDSIkDCQMDCMkDA0jJAwMIwwjJAwkDAwjDCMMIwwAAV4MIyQMJAwAAAAA'
  front_light:
    friendly_name: "Front light"
    command_on: 'sj00AAwjDCMkDAwiJAwkDAwjDCIkDCQMDCMkDAwjJAwMIgwjJAwNIwwjDCMjDAwAAV4NIiQMJAwAAAAA'
    command_off: 'siE0ACQMDSIlDA0jDCIlDA0iDCIkDA0iDAABXQwjJAwkDA0jDCIkDA0jJAwkDA0iDSIkDCQMDSMAAAAA'
  gate_light:
    friendly_name: "Gate light"
    command_on: 'shg0AA0AAWMNIg0iJAwNIg0iJQslCw0iDSINIg0iDSIkDCQMDSIkDCQMDSINIiQMDSIlDA0iDSIAAAAA'
    command_off: 'shs0ACQMJAsNIiQMJAwNIw0iJQslDA0iDSINIw0AAWMNIg0iJQsNIw0iJAskDA0iDSINIg0iDSMAAAAA'

In group.yaml I make a group of my office lights

  office_lights:
    name: Office Lights
    entities:
     - switch.office_light
     - switch.front_light
     - switch.gate_light
1 Like

@Sunonline
Your suggestion require adding secrets.yaml file?
This may make troubleshooting more difficult

@lessmann
You were missing “type” in tour config.
I don’t use "command on/off’ so I cannot say required or not. I would try without first

Yes. I do have secrets.yaml to keep information that doesn’t want to be display.
If you don’t have you can put

host: 192.168.1.2  <== ip of broadlink
mac: 'B4:43:0D:CC:0F:58'  <== mac address of broadlink

Switch can be display once you created, as you can see from the group.office_lights.

For the switch.broadlink_learn_command to appear in service. You have to create the switch above first. left with blank for command on and command off. Then you will have the switch.broadlink_learn_command_ip_address and switch.broadlink_send_packet_ip_address

platform: broadlink
host: 192.168.1.2  <== ip of broadlink
mac: 'B4:43:0D:CC:0F:58'  <== mac address of broadlink
timeout: 30
friendly_name: "Pro1"
type: rm
switches:
  kitchen_aircon:
    friendly_name: "Kitchen aircon"
    command_on: ''
    command_off: ''

Thank you for your yaml file, very helpfull to see how you have set it up. I think I am getting somewhere now as the “switch.broadlink_learn_command” is now showing in my entities.
I think the problem is down to trying to set more than one broadlink device up at once, when I removed the others to test just one it came up in my entities. Excellent!

I have put the following in my yaml:

switch 100:
  platform: broadlink
  name: 'Broadlink rotel'
  type: rm
  host: 192.168.1.11
  mac: '34:EA:34:43:36:72'
  switches:
    Rotel:
      friendly name: "Amplifier"
      command on: ''
      commandoff: ''

Even though the device is an RM pro + I can only put “rm” under type otherwise it comes up with error.

I am still getting the following error when clicking “check config” but I don’t care because it is looking for the packet date for the said command I guess.

Invalid config for [switch.broadlink]: [Rotel] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->Rotel. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.broadlink/

One hurdle down, now how do I get this packet data malarkey!?
I am following the component directions:
step 1- Choose the service “switch.broadlink_learn_command_192_168_1_14CHECK

step 2- hit CALL SERVICE. Press the button on your remote with in 20 seconds. The packet will be printed as a persistent notification in the States page of the web interface CHECK

my persistant notification is showing:
title: Invalid config
message: The following components and platforms could not be set up:

Please check your config.

Try:
Rotel -> rotel

1 Like

good point Danielhiversen, changed to rotel.

switch 100:
  platform: broadlink
  name: 'Broadlink Rotel'
  type: rm
  host: 192.168.1.11
  mac: '34:EA:34:43:36:72'
  switches:
    rotel:
      friendly name: "Amplifier"
      command on: ''
      commandoff: ''

Just to check I’m not being an idiot… I am pointing the actual remote at the broadlink device and pushing the “on” button after clicking the “learn” button. Is this correct?

I’m getting the same error message under ‘persistent_notification.invalid_config’ as before… something is wrong with my yaml entry and I don;t know what it is.

Also my yaml IP for the device is 192.168.1.11 and not 192.168.1.14 as per the “learn command” in the entities.
I’ll try set up another broadlink device and remove this one for now. What a palaver!

Should just be…

switch:
  - platform: broadlink
    etc, etc.

  - platform: broadlink
    etc, etc.

  - platform: broadlink
    etc, etc.
1 Like

thanks bobby_noble I will try that.
I think I’m getting there finally, thank you all for your helpfull input its very much appreciated.
Entities are being picked up now and I managed to “learn” the first command

Hi, you can make a switch that sends the code and keeps the signal for a second or more
since my TV remote has a shortcut as if holding a number down for a second or more

Just learn the command with the button pressed for a seccond - I did the same for Volume up key and down key’s

I tried everything and I am just not getting a learn command. does this still work? could anyone confirm?

this is what I have:

  - platform: broadlink
    type: rm
    host: 10.0.0.22
    mac: '78:0f:77:b9:4b:43'
    timeout: 15
    switches:
      test1:
       friendly_name: "test1"
       command_on: ''
       command_off: ''

When you say not getting a learn command, what do you mean? You are not getting the command from the learn service that you call in developer options? or you do not see the broadling.learn service showing in the developers tools?

Personally I am using Broadlinlk manager app in windows (google search - you can download it from sourceforge) to pair tot he broadlink RM and learn the codes. I then copy / paste the codes into home assistant and have it working. I never got the broadlink.learn service working properly myself, but found this to be a good workaround.