mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-20 15:56:51 +00:00
Documentation for the pilight component (#743)
https://github.com/home-assistant/home-assistant/pull/2742
This commit is contained in:
parent
1b5233b672
commit
945dd10af5
52
source/_components/pilight.markdown
Normal file
52
source/_components/pilight.markdown
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Pilight"
|
||||
description: "Instructions how to setup MQTT within Home Assistant."
|
||||
date: 2015-08-07 18:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: pilight.png
|
||||
ha_category: Hub
|
||||
featured: true
|
||||
ha_release: pre 0.26
|
||||
ha_iot_class: Local Push
|
||||
---
|
||||
|
||||
[Pilight](https://www.pilight.org/) is a modular and open source solution to communicate with 433 MHz devices and runs on various small form factor computers. A lot of common [protocols](https://wiki.pilight.org/doku.php/protocols) are already available.
|
||||
|
||||
This pilight hub connects to the [pilight-daemon](https://wiki.pilight.org/doku.php/pdaemon) via a socket connection to receive and send codes. Thus home assistant does not have to run on the computer in charge of the RF communication.
|
||||
|
||||
The received and supported RF codes are put on the event bus of home assistant and are therefore directly usable by other components (e.g. automation). Additionally a send service is provided to send RF codes.
|
||||
|
||||
To integrate pilight into Home Assistant, add the following section to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
pilight:
|
||||
host: 127.0.0.1
|
||||
port: 5000
|
||||
whitelist: # optional
|
||||
protocol:
|
||||
- daycom
|
||||
- intertechno
|
||||
id:
|
||||
- 42
|
||||
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The IP address of the computer running the pilight-daemon, e.g. 192.168.1.32.
|
||||
- **port** (*Required*): The network port to connect to. The usual port is [5000](https://www.pilight.org/development/api/).
|
||||
- **whitelist** (*Optional*): You can define a whitelist to prevent that too many unwanted RF codes (e.g. the neighbours weather station) are put on your HA event bus. All defined subsections have to be matched. A subsection is matched if one of the items are true.
|
||||
In this example only received RF codes using a daycom or intertechno protocol are put on the event bus and only when the device id is 42. For more possible settings please look at the receiver section of the pilight [API](https://www.pilight.org/development/api/).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- A list of tested RF transceiver hardware is available [here](https://wiki.pilight.org/doku.php/electronics). This might be usefull before buying.
|
||||
- Sending commands is simple when the protocol is known by pilight, but receiving commands can be rather difficult. It can happend that the code is not correctly recognized due to different timings in the sending hardware or the RF receiver. If this happens follow these steps:
|
||||
1. [Install](https://www.pilight.org/get-started/installation/) pilight from source (do not worry that is very easy) and only activate the protocols you are expecting in the pop up menu. This reduces false positives.
|
||||
2. Check the real timings of your device + RF receiver by running `pilight-debug`. Remember the `pulslen` parameter.
|
||||
3. Go to the `libs/pilight/protocols/433.92` subfolder of the pilight source code and open the .c file of your protocol. Search for `MIN_PULSE_LENGTH`, `MAX_PULSE_LENGTH ` and `AVG_PULSE_LENGTH`. Change the pulse lengths to match your measured one. Recompile and install pilight by rerunning ```sudo ./setup.sh```
|
63
source/_components/switch.pilight.markdown
Normal file
63
source/_components/switch.pilight.markdown
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Pilight Switch"
|
||||
description: "Instructions how to have switches using 433 MHz connected to a computer running pilight."
|
||||
date: 2015-06-10 22:41
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: pilight.png
|
||||
ha_category: Switch
|
||||
ha_release: pre 0.7
|
||||
---
|
||||
|
||||
|
||||
A switch platform that issues 433 MHz commands using [pilight](https://www.pilight.org/) to turn a 433 MHz device on or off. The pilight HA hub has to be set up.
|
||||
|
||||
Additionally RF commands can be defined that trigger this switch to turn on and off. This allows you to also use the remote shipped with your 433 MHz switch without mixing up the HA states. You can even define several on/off commands, thus several RF remotes to toggle this switch.
|
||||
|
||||
To be really sure that HA knows the actual state of your device it is recommended to use the RF remote with codes unknown to any of your 433 MHz devices. Thus you use the remote to trigger this switch to send the correct RF code to the device.
|
||||
|
||||
To define a pilight switch, add the following lines to your `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
switch:
|
||||
platform: pilight
|
||||
switches:
|
||||
Bed light:
|
||||
on_code:
|
||||
protocol: intertechno_old # protocol has to be defined
|
||||
unit: 3 # these entries are protocol specific and can differ
|
||||
id: 4 # these entries are protocol specific and can differ
|
||||
'on': 1 # on has to be in apostrophes to be parsed correctly
|
||||
off_code:
|
||||
protocol: intertechno_old # protocol has to be defined
|
||||
unit: 3 # these entries are protocol specific and can differ
|
||||
id: 4 # these entries are protocol specific and can differ
|
||||
'off': 1 # off has to be in apostrophes to be parsed correctly
|
||||
on_code_receive: # optional
|
||||
protocol: daycom # protocol has to be defined
|
||||
systemcode: 14462 # these entries are protocol specific and can differ
|
||||
unit: 6 # these entries are protocol specific and can differ
|
||||
id: 34 # these entries are protocol specific and can differ
|
||||
state: 'on' # off has to be in apostrophes to be parsed correctly
|
||||
off_code_receive: # optional
|
||||
protocol: daycom # protocol has to be defined
|
||||
systemcode: 14462 # these entries are protocol specific and can differ
|
||||
unit: 6 # these entries are protocol specific and can differ
|
||||
id: 34 # these entries are protocol specific and can differ
|
||||
state: 'off' # on has to be in apostrophes to be parsed correctly
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **switches** (*Required*): The array that contains all command switches.
|
||||
- **entry** (*Required*): Name of the command switch. Multiple entries are possible.
|
||||
- **on_code** (*Required*): The code to turn the device on.
|
||||
- **off_code** (*Required*): The code to turn the device off.
|
||||
- **on_code_receive** (*Optional*): If given, this command will turn the switch on if it is received by pilight.
|
||||
- **off_code_receive** (*Optional*): If given, this command will turn the switch off if it is received by pilight.
|
||||
|
||||
For possible code entries look at the [pilight API](https://www.pilight.org/development/api/). All commands allowed by [pilight-send](https://wiki.pilight.org/doku.php/psend) can be used.
|
BIN
source/images/supported_brands/pilight.png
Normal file
BIN
source/images/supported_brands/pilight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Loading…
x
Reference in New Issue
Block a user