Raspberry Pi GPIO Binary Sensor


The rpi_gpio binary sensor platform allows you to read sensor values of the GPIOs of your Raspberry Pi.

Configuration

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

Configuration Variables

ports

(map)(Required)List of used ports.

port: name

(string)(Required)The port numbers (BCM mode pin numbers) and corresponding names.

bouncetime

(integer)(Optional)The time in milliseconds for port debouncing.

Default value: 50

invert_logic

(boolean)(Optional)If true, inverts the output logic to ACTIVE LOW.

Default value: false (ACTIVE HIGH)

pull_mode

(string)(Optional)Type of internal pull resistor to use. Options are UP - pull-up resistor and DOWN - pull-down resistor.

Default value: UP

For more details about the GPIO layout, visit the Wikipedia article about the Raspberry Pi.