6 KiB
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category | ha_release |
---|---|---|---|---|---|---|---|---|---|---|
page | Broadlink RM Switch | Instructions how to have Broadlink RM switches. | 2016-11-22 22:41 | true | false | true | true | broadlink.png | Switch | 0.35 |
This Broadlink
switch platform allow to you control Broadlink devices.
To enable it, add the following lines to your configuration.yaml
:
# Example configuration.yaml entry
switch:
platform: broadlink
host: IP_ADDRESS
mac: 'MAC_ADDRESS'
switches:
reciever:
command_on: 'switch_packet on'
command_off: 'switch_packet off'
Configuration variables:
- host (Required): The hostname/IP address to connect to.
- mac (Required): Device mac address.
- timeout (Optional): Timeout in seconds for the connection to the device
- friendly_name (Optional): The name used to display the switch in the frontend.
- type (Optional): Switch type. (rm, rm2, rm_mini, rm_pro_phicomm, rm2_home_plus, rm2_home_plus_gdt, rm2_pro_plus, rm2_pro_plus2, rm2_pro_plus_bl, rm_mini_shate, sp1, sp2, honeywell_sp2, sp3, spmini2 or spminiplus)
- switches (Optional): The array that contains all switches.
- identifier (Required): Name of the command switch as slug. Multiple entries are possible.
- friendly_name (Optional): The name used to display the switch in the frontend.
- command_on (Required): Base64 encoded packet from RM device to take for on.
- command_off (Required): Base64 encoded packet from RM device to take for off.
- identifier (Required): Name of the command switch as slug. Multiple entries are possible.
Information about how to install on Windows can be found here: https://home-assistant.io/components/sensor.broadlink/#microsoft-windows-installation
{% linkable_title How to obtain IR/RF packets? %}
Choose Call Service from the Developer Tools. Choose the service broadlink/learn_command from the list of Available services: and hit CALL SERVICE. Press the button on your remote with in 20 seconds. The packet will be printed in the log and as a persistent notification.
Example config for rm, rm2, rm_mini, rm_pro_phicomm, rm2_home_plus, rm2_home_plus_gdt, rm2_pro_plus, rm2_pro_plus2, rm2_pro_plus_bl and rm_mini_shate devices:
switch 2:
platform: broadlink
host: 192.168.1.2
mac: 'B4:43:0D:CC:0F:58'
timeout: 15
# Will work on most Phillips tvs:
tv:
friendly_name: "Phillips Tv"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='
# Will work on most LG tvs
tv_lg:
friendly_name: "LG Tv"
command_on: 'JgBYAAABIJISExETETcSEhISEhQQFBETETcROBESEjcRNhM1EjcTNRMTERISNxEUERMSExE2EjYSNhM2EhIROBE3ETcREhITEgAFGwABH0oSAAwzAAEfShEADQU='
command_off: 'JgBYAAABIJISExETETcSEhISEhQQFBETETcROBESEjcRNhM1EjcTNRMTERISNxEUERMSExE2EjYSNhM2EhIROBE3ETcREhITEgAFGwABH0oSAAwzAAEfShEADQU='
tv_lg_HDMI1_HDMI2:
friendly_name: "LG Tv"
command_on: 'JgBIAAABIZMRExITEjYSExMRERURExEUEDkRNxEUEjYSNhM3ETcSNxITETgSNhI2ExMQExE4ETYSNxIUERMSExE4ETcRFBETEQANBQ=='
command_off: 'JgBQAAABJJMSEhISETgSEhITEBMSEhMSETcSNxMREjcSNxI3EjcSOBETERITNhM2EhITERM2EzcRNxI3ExISEhI3EjcRExETEgAFLQABJEoRAA0FAAAAAAAAAAA='
tv_lg_HDMI3:
friendly_name: "LG Tv"
command_on: 'JgBIAAABIZMSFBISETgRExEUERQQFBETEjcTNhMSETgRNxE3EjcROBM2ERMSFBE4ERMSNxM2EjUSFBE2ETgRExM2ExITEhATEwANBQ=='
tv_lg_AV1_AV2:
friendly_name: "LG Tv"
command_on: 'JgBIAAABIpQPFBITETgSEw8UEhQSEhEVDzgSOBAUETgQOQ84EjgRNxITETgSExA5EDgREhI3EhMROBMSEDkQFBETEjYTEhE4EQANBQ=='
command_off: 'JgBIAAABH5YPFBETETgUERAUEBURFBATETgROBEUETcSNxE4ETcSOBISEBUQFREUEjUSFBA5ETcRNxE4ETkQOBAUEjcRFRAUEQANBQ=='
switch 2:
platform: broadlink
host: 192.168.1.2
mac: 'B4:43:0D:CC:0F:58'
timeout: 15
# Will work on most Phillips tvs:
tv:
friendly_name: "Phillips Tv"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
Example config for sp1, sp2, honeywell_sp2, sp3, spmini2 and spminiplus devices:
switch 1:
platform: broadlink
host: IP_ADDRESS
mac: 'MAC_ADDRESS'
type: sp1
friendly_name: 'Humidifier'
switch 2:
platform: broadlink
host: IP_ADDRESS
mac: 'MAC_ADDRESS'
type: sp2
friendly_name: 'Humidifier'
How to use E-CONTROL remotes on Home Assistant
If you already have your remotes learned on E-Control app you can use this method to "copy" trem to HA.
First get or learn all the remotes you want to add on HA in E-CONTROL
-
download script from https://github.com/NightRang3r/Broadlink-e-control-db-dump5
-
open the e-control app and on the left side menu choose "Share" and then "Share to other phones in WLAN" it should generate the files you will need on the script.
-
Connect your Android device to your computer and browse the SD card / External Storage folder "/broadlink/newremote/SharedData/" You need to get the following files: jsonSubIr jsonButton jsonIrCode and put them in the same folder as this script.
-
Install Requirement: simplejson pip install simplejson (you must install simplejson in the same python version you will use to run the scripts) (to check the version it is installed, you simple try to install again and will get the "already satisfied") (some one got it installed on 2.7 with 'sudo easy_install simplejson')
-
Navigate to the fold you have downloaded and run: python getBroadlinkSharedData.py Follow the screen steps. (those scripts were tested on python2.7)
-
Install python broadlink library: git clone https://github.com/mjg59/python-broadlink.git1 (navigate to folder you downloaded) sudo python setup.py install
-
Test the codes you got by using sendcode script you have already downloded. You need to edit the script with your RM Pro IP Address and MAC Address and with the code in hex format. When run the script, you know the code works when get message Code sent... Not every code works.
-
Convert the working HEX codes to Base64 here: http://tomeko.net/online_tools/hex_to_base64.php?lang=en1 and use on HA.