PiFace Digital I/O


The rpi_pfio component is the base for all related PiFace Digital I/O (PFIO) platforms in Home Assistant. There is no setup needed for the component itself; for the platforms, please check their corresponding pages.

There is currently support for the following device types within Home Assistant:

Set the jumpers on the PiFace board for address 0 (JP1: 1-2, JP2: 1-2).

Use with HassOS

Note that the PiFace Digital 2 uses the Raspberry Pi SPI port, which is disabled by default when using HassOS. When using HassOS, you must mount the SD card on another computer and access the boot partition on the card. Edit the config.txt file and add the line dtparam=spi=on to the end. This should enable SPI when HassOS is booted and allow Home Assistant to access the PiFace Digital 2 board.

Binary Sensor

The rpi_pfio binary sensor platform allows you to read sensor values of the PiFace Digital I/O .

To use your PiFace Digital I/O module in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
binary_sensor:
  - platform: rpi_pfio
    ports:
      0:
        name: PIR Office
        invert_logic: true
      1:
        name: Doorbell
        settle_time: 50

Configuration Variables

ports

(map)(Required)List of used ports.

num

(map)(Required)The port number.

name

(string)(Required)The port name.

settle_time

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

Default value: 20

invert_logic

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

Default value: false (ACTIVE HIGH)

Switch

The rpi_pfio switch platform allows you to control the PiFace Digital I/O module.

To use your PiFace Digital I/O module in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
switch:
  - platform: rpi_pfio
    ports:
      0:
        name: Doorlock
        invert_logic: true
      1:
        name: Light Desk

Configuration Variables

ports

(list)(Required)Array of used ports.

num

(list)(Required)Port number.

name

(string)(Required)Port name.

invert_logic

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

Default value: false