question

Graydon avatar image
Graydon asked

How to use Cerbo GX relay outputs to trigger a HomeKit switch on raspberry Pi

Hello, I have a raspberry pi running HomeBridge. I would like to run a wire from the Cerbo Relay 2 to a set of pins on the raspberry pi. I think I can use an assistant to turn on Relay 2 based on a SOC value. But is there a program I can run on the raspberry pi to trigger an event based on the Relay 2 action?

cerbo gxRaspberry PiRelay
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
Kevin Windrem avatar image
Kevin Windrem answered ·

Reading the GPIO pins is fairly easy in most programming languages. Even a shell script can access the GPIO to set it's direction and read the state. GPIOs show up in /sys/class/gpio.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.