Remote Raspberry Pi GPIO


The rpi_gpio component is the base for all related GPIO platforms in Home Assistant. There is no setup needed for the component itself, for the platforms please check their corresponding sections.

Binary Sensor

The remote_rpi_gpio binary sensor platform allows you to read sensor values of the GPIOs of a Remote Raspberry Pi.

To use your Remote Raspberry Pi’s GPIO in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
binary_sensor:
  - platform: remote_rpi_gpio
    host: IP_ADDRESS_OF_REMOTE_PI
    ports:
      11: PIR Office
      12: PIR Bedroom

Configuration Variables

host

(string)(Required)IP Address of remote Raspberry Pi.

ports

(map)(Required)List of used ports.

port: name

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

invert_logic

(boolean)(Optional)If true, inverts the output logic

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. Pull-Up defaults to active LOW and Pull-down defaults to active HIGH. This can be adjusted with invert_logic

Default value: UP

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

Switch

The remote_rpi_gpio switch platform allows you to control the GPIOs of a Remote Raspberry Pi.

To use your Remote Raspberry Pi’s GPIO in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
switch:
  - platform: remote_rpi_gpio
    host: IP_ADDRESS_OF_REMOTE_PI
    ports:
      11: Fan Office
      12: Light Desk

Configuration Variables

host

(string)(Required)IP Address of remote Raspberry Pi.

ports

(list)(Required)Array of used ports.

port

(integer | string)(Required)Port numbers and corresponding names (GPIO

invert_logic

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

Default value: false

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

Note that a pin managed by HASS is expected to be exclusive to HASS.

A common question is what does port refer to, this number is the actual GPIO #, not the pin #. For example, if you have a relay connected to pin 11 its GPIO # is 17.

# Example configuration.yaml entry
switch:
  - platform: remote_rpi_gpio
    host: 192.168.0.123
    ports:
      17: Speaker Relay