Broadlink RM-PRO and TC2 switch

I wouldn’t have even worried about TC2 switches if sonoff switches had 2/3 gang options, so far their devices have been fantastic :slight_smile:

So I finally got my switches and having issues setting them up on Hassbian.

I’m able to test the hex strings with RM-plugin on my phone and the on and off test strings send to the switch without a hitch. When I convert though using (http://tomeko.net/online_tools/hex_to_base64.php?lang=en1) and put them into my HA config file I get no response from my RM2(No orange light) when I try and send the commands.

I tried the “learn_command_” under services and as soon as I click “Call Service” my RM2’s orange light comes on until I send the first command to the switch, then for the next 10 seconds I guess commands are just sent but the status of the switch doesn’t change until the learn_command has finished. All I get from that though is:

Broadlink switch
Recieved packet is: AAAAAAAAAAAAAAAA

So could someone please point me in the right direction.

you have a RMPRO? I did all with the RMPRO and worked perfectly following the HA component instructions

I have the following in my switches.yaml file

- platform: broadlink
  host: xxx.xxx.x.xxx
  mac: xx:xx:xx:xx:'
  timeout: 15
  switches:
    sstvpower:
      friendly_name: "SStvpower"
      command_on: 'JgDSAJWRFTQVNBU0Fg8VEBUPFRAVDxU0FjMVNRUPFg8VDxYPFRAVDxU0Fg8VEBUPFg8VDxYPFTQV
    DxY0FTQVNBU0FTQVNBUABhKWkBU0FTQVNBYPFRAVDxUQFQ8VNBU0FTUVDxUQFQ8WDxUPFg8VNBUQ
    FQ8WDxUQFQ8VDxY0FQ8VNBU0FTQWNBU0FTQVAAYSlpAVNRU0FTQVEBUPFg8VEBUPFTQVNBU0Fg8V
    EBUPFRAVDxYPFTQVEBUPFRAVDxYPFQ8VNRUPFTQVNBU0FjQVNBU0FQANBQAAAAAAAA=='

That’s the power on/off for my Samsung TV (it’s 9 years old so probably won’t work with anyone else’s TV)

I used Renetodes file to get the codes directly from the RMPRO via the app.

I’m using the RM PRO yes.

The best I get is “AAAAAAAAAAAAAAAA”

Not sure why when I use the RM Plugin data from my phone that it sends the command.

Surely though if I had to say send the command in HA I would at least see my RM PRO’s orange light flash, whether it sent an incorrect signal or not? Or does it only flash when it send a signal that it’s stored?

I think it has to do with when I send the learn request, what is it meant to look like exactly?
The orange light goes solid until I send a command using the eControl App, then from there onward it will keep sending the command for the duration of the learn command because every time I select" on" on my phone I see the orange light flash but the switch won’t turn on until the learn command has finished. Does that sound right?

Errm I don’t think so, You send the command via the remote the RMPRO learns it and sends it back to HA or your phone. So if you want to learn it in the app on your phone tap the key to learn and then the remote key and the phone will then create the button. However what I do is create a remote in the app with all the keys named (so create a bespoke remote not a generic one) and use renetodes code from here …

to pull it into HA

1 Like

I am going according to the steps on the HA documentation, I have already set the switch up in econtrol and named it “switch1” and it works perfectly… I call the “learn” function in HA and then use the econtrol app to then send the on command to the light switch… is that really the wrong way?

Yep it’s the wrong way as what you are doing is asking the RMPRO to send it’s self the code, the phone doesn’t send the code the RMPRO does, so it’s best to use the original remote. So in HA use dev-tools to run the learn command and then press the button on the remote and HA will tell you what the RMPRO got as the code for that remote button. You can then copy the code and format it as I showed above :slight_smile:

1 Like

Ok so I send the learn request, I went to my TC2 switch and pushed the button but all I got from HA on the states page is:

Broadlink switch
Did not received any signal

I have the following in my log file:

OK, sorry didn’t realise you were using a TC2, that’ll teach me to read the title :P, the phone app should know about the TC2 and you should be able to pair it, hopefully you’ve done that as you said. So next follow the link above (the share your projects one) to enable you to get the data into HA.

I used the script that ReneTode made the other night actually but without success, I just did it again and got the following… baring in mind I only have 1 switch called switch1 in econtrol:

switches:
  switch1_1-Gang:
    friendly_name: switch1 1-Gang
    command_on: '6RRGAN8JCRYWCRYJCRYWCRYJCRYJFgkWCRYJFhYJFgkWCRYJFgkJFgkWFgkWCQkWCRYJ

FhYJCRYWCQkWFgkWCRYJCRYWCQkAAUg=’
switch1_1-Gang:
friendly_name: switch1 1-Gang
command_on: ‘6RRGAN8JCRYJFhYJFgkWCQkWFgkWCRYJFgkJFgkWFgkJFgkWFgkJFhYJCRYJFhYJCRYJFhYJFgkJ
FgkWCRYJFgkWCRYJFgkAAUg=’

group:
switch1:
name: switch1
view: yes
entities:
- switch.switch1_1-Gang
- switch.switch1_1-Gang

Edit:

So this is what my config file looks like now:

switch:
platform: broadlink
host: 192.168.0.6
mac: ‘XX:XX:XX:XX:XX’
timeout: 10
switches:
switch1:
friendly_name: “Test Switch”
command_on: ‘6RRGAN8JCRYWCRYJCRYWCRYJCRYJFgkWCRYJFhYJFgkWCRYJFgkJFgkWFgkWCQkWCRYJFhYJCRYW
CQkWFgkWCRYJCRYWCQkAAUg=’
command_off: ‘6RRGAN8JCRYJFhYJFgkWCQkWFgkWCRYJFgkJFgkWFgkJFgkWFgkJFhYJCRYJFhYJCRYJFhYJFgkJ
FgkWCRYJFgkWCRYJFgkAAUg=’

That looks right to me based on the rest of this thread, you may have to add

‘AAA==’

to the end of each command.

Why just AAA==? Are you determining ‘AAA==’ because of my output or just saying that because its a generic addition to the end. Sorry I’m just trying to understand, not intending to be rude.

One other question though and relating to what I previously asked… even if the code it’s sending is wrong, surely when I push the “on lighting bolt” in HA I should at least see the RM PRO flash orange as in it’s trying to send the signal, wrong or not?

Just checked my logs and this happens every time I push the switch… I think:

The ‘AAA==’ just makes sure the code has a definite finish and pads it out.

If it (the RMPRO) thinks the code is wrong it probably won’t send it.

That error looks like HA can’t find the code to send.

You need to format any yaml code with the </> when you paste it in here, so select it after pasting and press </> so that it is formatted so we can see the correct spacing (very important in yaml)

Here’s a snippet of my config file, it’s a fresh install basically as this pi will only be used to control these TC2 switches.

See here …
--------------------------------- V

So does the new code generate the same error? Are there any other errors in the log relating to the RMPro?

1 Like

Sorry I don’t understand what you’re suggesting I do?

The top bit tells you how to paste code to the forum :stuck_out_tongue:

The line under is asking if there are any setup errors in the HA log or does the new code work as expected?

The part I’m unsure of is:

You need to format any yaml code with the when you paste it in here, so select it after pasting and press so that it is formatted so we can see the correct spacing (very important in yaml)

See here …
--------------------------------- V

What do you mean by the “--------------------------------- V” ?

where the V is, is the button you press to format the code after selecting it < / > symbol