BroadLink RM Pro is a WiFi to RF/IR gateway for smart home. First of all you need it to control BroadLink TC2 smart switches. Also it is very useful if you want to control IR devices from Home Assistant.
There is a documentation on home-assistant.io on broadlink platform. Here is just a quick summery with notes.
- Add new device to BroadLink E-Control app
- In the app go to Menu -> Share -> Share to other phones in WLAN -> Cancel
jsonIrCodefiles from phone’s
/broadlink/newremote/SharedData/folder to PC
- Install python 2.7 on PC
pip install simplejson
getBroadlinkSharedData.pyfrom NightRang3r’s repository to a folder near files from p.3
- Select a device to get codes
- Find results in a newly created file in the same directory.
- Remove all new line symbols from code prior of using it in Home Assistant
Home Assistant TC2 configuration example and how to make a light component based on switch component:
switch: – platform: broadlink host: 192.168.2.93 mac: "78:0F:77:00:C8:95" timeout: 15 switches: living_room_lights_power: friendly_name: "Living room lights power" command_on: ‘6RRGAN8JCRYJFhYJCRYJFgkWCRYWCRYJFgkJFgkWCRYJFhYJCRYJFgkWFgkWCRYJFgkWCQkWFgkWCQkWCRYJFgkWFgkJFgkAAUg=’ command_off: ‘6RRGAN8JFgkWCQkWFgkWCRYJFgkWCRYJCRYJFgkWCRYWCQkWCRYWCRYJCRYWCQkWCRYJFgkWFgkWCRYJCRYJFhYJCRYJFgkAAUg=’ hallway_lights_power: friendly_name: "Hallway lights power" command_on: ‘6RRGAN8JFgkJFgkWCRYJFhYJCRYWCQkWCRYJFhYJFgkJFhYJFgkJFhYJCRYJFhYJFgkJFhYJFgkWCQkWFgkJFhYJCRYJFgkAAUg=’ command_off: ‘6RRGAN8JFgkJFgkWFgkJFhYJCRYJFgkWFgkJFhYJCRYWCRYJCRYWCQkWFgkWCRYJCRYWCQkWCRYJFgkWCRYWCRYJFgkWCQkAAUg=’ light: – platform: template lights: living_room: friendly_name: "Living room lights" value_template: "" turn_on: service: switch.turn_on data: entity_id: switch.living_room_lights_power turn_off: service: switch.turn_off data: entity_id: switch.living_room_lights_power hallway: friendly_name: "Hallway lights" value_template: "" turn_on: service: switch.turn_on data: entity_id: switch.hallway_lights_power turn_off: service: switch.turn_off data: entity_id: switch.hallway_lights_power