home-assistant.io/source/_components/switch.rpi_gpio.markdown
Tabakhase 653b4bae03 clearify rpi_gpio sharing + revert #4608 (#4660)
* Revert "add documentation for "shared_gpio" flag to component switch.rpi_gpio"

This reverts commit f2dba1f614af51f84eadbdeab5ca2f566f334ad6.

* clearify that rpi_gpio pins are exclusive to HASS-ussage when assigned
2018-02-13 10:40:34 -08:00

1.5 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page Raspberry Pi GPIO Switch Instructions how to integrate the GPIO of a Raspberry Pi into Home Assistant as a switch. 2015-08-07 14:00 true false true true raspberry-pi.png Switch pre 0.7 Local Push

The rpi_gpio switch platform allows you to control 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
switch:
  - platform: rpi_gpio
    ports:
      11: Fan Office
      12: Light Desk

Configuration variables:

  • ports array (Required): Array of used ports.
    • port: name (Required): Port numbers and corresponding names (GPIO #).
  • 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.

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: rpi_gpio
    ports:
      17: Speaker Relay