Raspberry PI (pigpio)

The rpi platform can be used to control inputs (switches), outputs (coils), I2C and servos on the RPi remotely (or locally) using pigpio. You need to install the apigpio extension via pip to use it.

This is an example:

hardware:
    platform: rpi

raspberry_pi:
    ip: localhost
    port: 8888

switches:
    s_switch_1:
        number: 1
    s_switch_7:
        number: 7

coils:
    output_23:
        number: 23
        default_pulse_ms: 23
    output_30:
        number: 30
        default_hold_power: 1.0
    output_2:
        number: 2
        default_hold_power: 0.2

servos:
    servo_10:
        number: 10

Configure the ip of your RaspberryPi in the raspberry_pi section. You may use localhost if you are running MPF on the RPi. Any pin on the RPi can be used as either input or output. Additionally, you may use servos on any pin.