home-assistant.io/source/_components/binary_sensor.rpi_gpio.markdown
Jorim Tielemans 920549e7e8 Update Raspberry Pi GPIO Binary Sensor configuration (#6999)
* Update Raspberry Pi GPIO Binary Sensor configuration

* Update binary_sensor.rpi_gpio.markdown

* Update binary_sensor.rpi_gpio.markdown

* Minor change
2018-10-22 23:29:17 +02:00

61 lines
1.6 KiB
Markdown

---
layout: page
title: "Raspberry Pi GPIO Binary Sensor"
description: "Instructions on how to integrate the GPIO sensor capability of a Raspberry Pi into Home Assistant."
date: 2015-08-30 19:00
sidebar: true
comments: false
sharing: true
footer: true
logo: raspberry-pi.png
ha_category: DIY
ha_release: pre 0.7
ha_iot_class: "Local Push"
---
The `rpi_gpio` binary sensor platform allows you to read sensor values of the GPIOs of your [Raspberry Pi](https://www.raspberrypi.org/).
## {% linkable_title Configuration %}
To use your Raspberry Pi's GPIO in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: rpi_gpio
ports:
11: PIR Office
12: PIR Bedroom
```
{% configuration %}
ports:
description: List of used ports.
required: true
type: map
keys:
"port: name":
description: The port numbers (BCM mode pin numbers) and corresponding names.
required: true
type: string
bouncetime:
description: The time in milliseconds for port debouncing.
required: false
type: integer
default: 50
invert_logic:
description: If `true`, inverts the output logic to ACTIVE LOW.
required: false
type: boolean
default: "`false` (ACTIVE HIGH)"
pull_mode:
description: >
Type of internal pull resistor to use.
Options are `UP` - pull-up resistor and `DOWN` - pull-down resistor.
required: false
type: string
default: "`UP`"
{% endconfiguration %}
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.