homebridge-pirelays
Controls relays (or whatever is hooked up to GPIO pins) with a Raspberry Pi using HomeKit. "Hey Siri, turn off the lights in the window".
Hardware
The hardware is quite simple.
- Raspberry Pi 3
- 4-relay module hooked up to 4 GPIO pins.
- 4 cut off extension cords, hooked up to the relays
The raspi can then control the state of the things hooked up the extension cords.
Installation
- Install homebridge using:
sudo npm install --unsafe-perm -g homebridge
- Install this plugin using: `git clone https://github.com/dakl/homebridge-pirelays.git && cd homebridge-pirelays && sudo npm install ``
- Update your configuration file. See
config.json
in this repository for a sample.
Test during development
cp config.json ~/.homebridge/ && sudo homebridge -D -P . -U /home/pi/.homebridge/
rc.local
to start on boot
Add to Add the following line before exit 0
in /etc/rc.local
to make homebridge with the pirelays plugin on boot:
sudo homebridge -P /home/pi/homebridge-pirelays/ -U /home/pi/.homebridge/ &