mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-02 09:17:35 +00:00
1.6 KiB
1.6 KiB
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category |
---|---|---|---|---|---|---|---|---|---|
component | Raspberry PI GPIO Binary Sensor | Instructions how to integrate the GPIO sensor capability of a Raspberry PI into Home Assistant. | 2015-08-30 19:00 | true | false | true | true | raspberry-pi.png | Sensor |
The rpi_gpio
binary sensor platform allows you to read sensor values of the GPIOs of your Raspberry Pi.
To use your Raspberry Pi's GPIO in your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
binary_sensor:
platform: rpi_gpio
ports:
11: PIR Office
12: PIR Bedroom
pull_mode: "UP"
bouncetime: 50
invert_logic: false
Configuration variables:
- ports array (Required): Array of used ports.
- port: name (Required): Port numbers and corresponding names.
- pull_mode (Optional): The internal pull to use (UP or DOWN). Default is UP.
- bouncetime (Optional): The time in milliseconds for port debouncing. Default is 50ms.
- invert_logic (Optional): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH).
For more details about the GPIO layout, visit the Wikipedia article about the Raspberry Pi.
If you are not running Raspbian Jessie, you will need to run Home Assistant as root.
To avoid having to run Home Assistant as root when using this component, run a Raspbian version released at or after September 29, 2015.