Broadlink RM-PRO and TC2 switch

With the latest HASS (v0.36), SP2 switch are supported:

- platform: broadlink
  host: 192.168.0.123
  mac: "B4:48:0D:FA:B6:C1"
  type: sp2
  switches:
    switch1:
      friendly_name: BlaBlop
1 Like

switch 1:
platform: broadlink
host: 10.0.0.12
mac: ‘b4:43:00:00:00:00’
type: sp2
friendly_name: “Lamp”

works for me

I am completely lost, can somebody point me in the right direction. I got a RM Pro the other day, I am running HA 36.1 as a docker in unraid. I followed the config instructions and put this in my yaml

switch:
platform: broadlink
host: 192.168.0.155
mac: ‘xx-xx-xx-xx-xx’
switches:
reciever:
command_on: ‘switch_packet on’
command_off: ‘switch_packet off’

Just to see how it works. according to the instructions it says I should be able to see this

Choose Call Service from the Developer Tools. Choose the service broadlink/learn_command from the list of Available services: and hit CALL SERVICE.

I don’t see that option anywhere in the list or even broadlink listed anywhere. any idea as to what I am doing wrong?

Thanks

@chepnut
https://home-assistant.io/getting-started/troubleshooting-configuration/#my-component-does-not-show-up

I will check out that link, I have only had HA installed for about 1 week and havent had a lot of time to really dig into it.

Thanks

I restarted HA and watched the logs as it started and it looks like its bombing out at this part

e[32m17-01-20 15:24:41 INFO (MainThread) [homeassistant.loader] Loaded switch.broadlink from homeassistant.components.switch.broadlinke[0m
e[32m17-01-20 15:24:41 INFO (MainThread) [homeassistant.bootstrap] Setting up switche[0m
e[32m17-01-20 15:24:41 INFO (MainThread) [homeassistant.components.switch] Setting up switch.broadlinke[0m
e[31m17-01-20 15:24:41 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlinke[0m

Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_component.py”, line 151, in _async_setup_platform
entity_platform.add_entities, discovery_info
File “uvloop/future.pyx”, line 230, in iter (uvloop/loop.c:110600)
File “uvloop/future.pyx”, line 432, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:113980)
File “uvloop/future.pyx”, line 101, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:108900)
File “/usr/local/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/switch/broadlink.py”, line 65, in setup_platform
config.get(CONF_MAC).encode().replace(b’:’, b’’))
binascii.Error: Odd-length stringe[0m

I sorted out my error message, I had dashes instead of colons, whoops :slight_smile: Now to delve deeper down the rabbit hole

Hey everyone - I’m considering buying this TC2 switch because I hear that it can communicate its state back to the original eControl app (meaning, if you turn off the switch manually, you will see it updated to off in the app)
My question is - will this state be read by HA?

No, it doesn’t.

Thanks for the fast reply :slight_smile: do you know of any similar switches that will be supported better?

Sorry. No idea. I only have TC2. Anyway, I have no regrets using it. There is no need for me to use the eControl app and I don’t need to know the state of the switches for my automations.

All the SP2 types should report the the state back

@Danielhiversen, he was asking about TC2, not SP2. Confuse again eh?

This is TC2…

This is SP2…

2 Likes

Since TC2 is able to report its state back - do you think it should be easy to add support for this in HA?

it should not difficult to put the circuit of the STATE of the SP2 (or similar) into the TC2 (or similar.

Anyone knows how this could be possible?

is NOT …

Are you sure about this? from what I hear from a friend who has one, when you turn off the switch by hand, you see it updated in the eControl app.

From what I see in daniel’s library,
It might just be a matter of finding the correct devtype and seeing if it happens to communicate just like an sp2 plug. It might just be wishful thinking, but worth a try…

(python-broadlink/broadlink/__init__.py at master ¡ Danielhiversen/python-broadlink ¡ GitHub)

no, but I haven’t red otherwise.

Mine is arriving, ordered a month ago, 5 pieces

You can’t get the state, even if you see it in the e-Control app it doesn’t mean that the operation succeeded, the TC2 is a RF switch, which means that it is doesn’t report back it’s only one way, if you want to get the state use zwave, sp2 works differently they are wifi.

1 Like

Hello guys,

i’m new to all this stuff. I have some issues with the Broadlink RM2 component. I want to control my TC2 Switches. I managed to geht the HEX dump from the Instruction, but if i try to send it via the sendCode.py through my rm2 i get the error that the input string must be a multiple of 16! I tried several tools and searched for several days in the internet but still every time i get a 100 or 200 digit base64 string. Has anyone an idea? HEX dump from getBroadlinkSharedData.py is:

“e90a4200df0909161609160909160916091609160916160909160916091609160916091609161609091609160916160916090916091609160916091616091609160909160916”