Fix typo introduced with #2748 and other modifications

This commit is contained in:
Fabian Affolter 2017-06-04 10:43:30 +02:00
parent e8ada0ee2d
commit 7af26b0a0b
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -19,107 +19,93 @@ To enable it, add the following lines to your `configuration.yaml`:
```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'
- 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
- **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)
- **type** (*Optional*): Switch type. Choose one from: `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.
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 as a persistent notification in theg States page of the web interface.
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 as a persistent notification in the States page of the web interface.
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:
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:
```yaml
switch 2:
platform: broadlink
host: 192.168.1.2
mac: 'B4:43:0D:CC:0F:58'
timeout: 15
switches:
# Will work on most Phillips tvs:
tv_phillips:
friendly_name: "Phillips Tv Power"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='
# Will work on most LG tvs
tv_lg:
friendly_name: "LG Tv Power"
command_on: 'JgBYAAABIJISExETETcSEhISEhQQFBETETcROBESEjcRNhM1EjcTNRMTERISNxEUERMSExE2EjYSNhM2EhIROBE3ETcREhITEgAFGwABH0oSAAwzAAEfShEADQU='
command_off: 'JgBYAAABIJISExETETcSEhISEhQQFBETETcROBESEjcRNhM1EjcTNRMTERISNxEUERMSExE2EjYSNhM2EhIROBE3ETcREhITEgAFGwABH0oSAAwzAAEfShEADQU='
tv_lg_hdmi1_hdmi2:
friendly_name: "LG Tv HDMI12"
command_on: 'JgBIAAABIZMRExITEjYSExMRERURExEUEDkRNxEUEjYSNhM3ETcSNxITETgSNhI2ExMQExE4ETYSNxIUERMSExE4ETcRFBETEQANBQ=='
command_off: 'JgBQAAABJJMSEhISETgSEhITEBMSEhMSETcSNxMREjcSNxI3EjcSOBETERITNhM2EhITERM2EzcRNxI3ExISEhI3EjcRExETEgAFLQABJEoRAA0FAAAAAAAAAAA='
tv_lg_hdmi3:
friendly_name: "LG Tv HDMI3"
command_on: 'JgBIAAABIZMSFBISETgRExEUERQQFBETEjcTNhMSETgRNxE3EjcROBM2ERMSFBE4ERMSNxM2EjUSFBE2ETgRExM2ExITEhATEwANBQ=='
tv_lg_av1_av2:
friendly_name: "LG Tv AV12"
command_on: 'JgBIAAABIpQPFBITETgSEw8UEhQSEhEVDzgSOBAUETgQOQ84EjgRNxITETgSExA5EDgREhI3EhMROBMSEDkQFBETEjYTEhE4EQANBQ=='
command_off: 'JgBIAAABH5YPFBETETgUERAUEBURFBATETgROBEUETcSNxE4ETcSOBISEBUQFREUEjUSFBA5ETcRNxE4ETkQOBAUEjcRFRAUEQANBQ=='
switch 2:
platform: broadlink
host: 192.168.1.2
mac: 'B4:43:0D:CC:0F:58'
timeout: 15
switches:
# Will work on most Phillips tvs:
tv:
friendly_name: "Phillips Tv"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='
switch:
- platform: broadlink
host: 192.168.1.2
mac: 'B4:43:0D:CC:0F:58'
timeout: 15
switches:
# Will work on most Phillips TVs:
tv_phillips:
friendly_name: "Phillips Tv Power"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='
# Will work on most LG TVs
tv_lg:
friendly_name: "LG Tv Power"
command_on: 'JgBYAAABIJISExETETcSEhISEhQQFBETETcROBESEjcRNhM1EjcTNRMTERISNxEUERMSExE2EjYSNhM2EhIROBE3ETcREhITEgAFGwABH0oSAAwzAAEfShEADQU='
command_off: 'JgBYAAABIJISExETETcSEhISEhQQFBETETcROBESEjcRNhM1EjcTNRMTERISNxEUERMSExE2EjYSNhM2EhIROBE3ETcREhITEgAFGwABH0oSAAwzAAEfShEADQU='
tv_lg_hdmi1_hdmi2:
friendly_name: "LG Tv HDMI12"
command_on: 'JgBIAAABIZMRExITEjYSExMRERURExEUEDkRNxEUEjYSNhM3ETcSNxITETgSNhI2ExMQExE4ETYSNxIUERMSExE4ETcRFBETEQANBQ=='
command_off: 'JgBQAAABJJMSEhISETgSEhITEBMSEhMSETcSNxMREjcSNxI3EjcSOBETERITNhM2EhITERM2EzcRNxI3ExISEhI3EjcRExETEgAFLQABJEoRAA0FAAAAAAAAAAA='
tv_lg_hdmi3:
friendly_name: "LG Tv HDMI3"
command_on: 'JgBIAAABIZMSFBISETgRExEUERQQFBETEjcTNhMSETgRNxE3EjcROBM2ERMSFBE4ERMSNxM2EjUSFBE2ETgRExM2ExITEhATEwANBQ=='
tv_lg_av1_av2:
friendly_name: "LG Tv AV12"
command_on: 'JgBIAAABIpQPFBITETgSEw8UEhQSEhEVDzgSOBAUETgQOQ84EjgRNxITETgSExA5EDgREhI3EhMROBMSEDkQFBETEjYTEhE4EQANBQ=='
command_off: 'JgBIAAABH5YPFBETETgUERAUEBURFBATETgROBEUETcSNxE4ETcSOBISEBUQFREUEjUSFBA5ETcRNxE4ETkQOBAUEjcRFRAUEQANBQ=='
- platform: broadlink
host: 192.168.1.2
mac: 'B4:43:0D:CC:0F:58'
timeout: 15
switches:
# Will work on most Phillips TVs:
tv:
friendly_name: "Phillips Tv"
command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='
```
Example config for sp1, sp2, honeywell_sp2, sp3, spmini2 and spminiplus devices:
Example config for `sp1`, `sp2`, `honeywell_sp2`, `sp3`, `spmini2` and `spminiplus` devices:
```yaml
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'
switch:
- platform: broadlink
host: IP_ADDRESS
mac: 'MAC_ADDRESS'
type: sp1
friendly_name: 'Humidifier'
- platform: broadlink
host: IP_ADDRESS
mac: 'MAC_ADDRESS'
type: sp2
friendly_name: 'Humidifier'
```
### {% linkable_title Service `send_packet` %}
You can use the service broadlink/send_packet to directly send IR packets without the need to assign a switch entity for each command.
@ -141,12 +127,11 @@ script:
- "JgBGAJSTFDUUNhM2ExITEhMSExITEhM2EzYTNhQRFBEUERQRFBEUNRQ2ExITNhMSExITNhMSExITEhM2ExITNhQ1FBEUNhMADQUAAA=="
```
### {% linkable_title Using E-Control Remotes %}
If you already have your remotes learned on E-Control app you can use this method to "copy" trem to HA.
If you already have your remotes learned on E-Control app you can use this method to "copy" them to Home Assistant.
First get or learn all the remotes you want to add on HA in E-Control
First get or learn all the remotes you want to add to Home Assistant in E-Control
1. Download
@ -158,7 +143,7 @@ First get or learn all the remotes you want to add on HA in E-Control
3. Get data from your Android device
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 and put them in the same folder as this 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 and put them in the same folder as this script:
jsonSubIr
jsonButton
@ -179,11 +164,11 @@ First get or learn all the remotes you want to add on HA in E-Control
3. `sudo python setup.py install`
7. Test the codes
Use the `sendcode` script you have already downloded to test the codes you got from the device
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
Use the `sendcode` script you have already downloded to test the codes you got from the device.
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.
8. Convert the hex codes to base64
8. Convert the HEX codes to base64
Use [this](http://tomeko.net/online_tools/hex_to_base64.php?lang=en1) tool to convert the hex codes to base64 for use with Home Assistant.