From 582428548d7183f94629c73b1d903693814b8ffe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 19 Dec 2016 19:24:58 +0100 Subject: [PATCH] Update broadlink docs --- source/_components/sensor.broadlink.markdown | 44 ++++++++++++++------ source/_components/switch.broadlink.markdown | 2 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/source/_components/sensor.broadlink.markdown b/source/_components/sensor.broadlink.markdown index a61a90932eb..7f7fe469f99 100644 --- a/source/_components/sensor.broadlink.markdown +++ b/source/_components/sensor.broadlink.markdown @@ -13,16 +13,27 @@ ha_release: 0.35 --- -The `broadlink` sensor platform let you monitor data from an RM2 and A1 E-air. -There is currently no support for the cloud API. +The `broadlink` sensor platform let you monitor data from an RM2 and A1 E-air. There is currently no support for the cloud API. +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' + monitored_conditions: + - 'temperature' +``` Configuration options: -- **name** (*Optional*): Default BL. Sensor name -- **update_interval** (*Optional*): Default 300. Time in seconds to fetch data from sensors + - **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 +- **name** (*Optional*): Default BL. Sensor name +- **update_interval** (*Optional*): Time in seconds to fetch data from sensors. Default 300. +- **timeout** (*Optional*): Timeout in seconds for the connection to the device. - **monitored_conditions** array (*Required*): States to monitor. - 'temperature' - 'humidity' @@ -33,9 +44,10 @@ Configuration options: To set it up, add the following information to your `configuration.yaml` file: Obtain sensor data from an A1: + ```yaml sensor: - platform: broadlink + - platform: broadlink update_interval: 60 host: IP_ADDRESS mac: 'MAC_ADDRESS' @@ -48,9 +60,10 @@ sensor: ``` Obtain temperature data from an RM2: + ```yaml sensor: - platform: broadlink + - platform: broadlink update_interval: 60 host: IP_ADDRESS mac: 'MAC_ADDRESS' @@ -58,11 +71,16 @@ sensor: - temperature ``` -**note**: The pycrypto library needs to be available on your platform. -on a typical windows sysytem `pip install pycrypto` will fail, as a compiler needs to be installed. +### {% linkable_title Microsoft Windows installation %} -The quickest way around this is to use a pre-built binary, e.g. from here: -https://github.com/sfbahr/PyCrypto-Wheels +

+The pycrypto library needs to be available on your platform. On a typical windows sysytem `pip install pycrypto` will fail, as a compiler needs to be installed first. +

-be sure to get the correct 64 or 32-bit binary for your system, the full commandline will look someting like this (64bit): -`pip install --use-wheel --no-index --find-links=https://github.com/sfbahr/PyCrypto-Wheels/raw/master/pycrypto-2.6.1-cp35-none-win_amd64.whl pycrypto` +The quickest way around this is to use a pre-built binary, e.g. from https://github.com/sfbahr/PyCrypto-Wheels + +Be sure to get the correct 64 or 32-bit binary for your system, the full commandline will look something like the sample below for a 64-bit system: + +```bash +pip install --use-wheel --no-index --find-links=https://github.com/sfbahr/PyCrypto-Wheels/raw/master/pycrypto-2.6.1-cp35-none-win_amd64.whl pycrypto +``` diff --git a/source/_components/switch.broadlink.markdown b/source/_components/switch.broadlink.markdown index f6889a5b9dc..41b67330382 100644 --- a/source/_components/switch.broadlink.markdown +++ b/source/_components/switch.broadlink.markdown @@ -29,6 +29,7 @@ switch: ``` 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 @@ -39,7 +40,6 @@ Configuration variables: - **command_off** (*Required*): Base64 encoded packet from RM device to take for off. - 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.