homebridge-garage-piface

Exposes a garage door and/or a Gate accessory to HomeBridge that uses a RaspberryPi with PiGave board

Usage no npm install needed!

<script type="module">
  import homebridgeGaragePiface from 'https://cdn.skypack.dev/homebridge-garage-piface';
</script>

README

homebridge-garage-piface

npm npm

Description

Garage and/or Gate Opener plugin for HomeBridge for Raspberry Pi with PiFace board.

This plugin is suitable for any device as a garage door or a gate motor that needs a brief contact (switch) to trigger an action as a opening or a closing.

This fork is adapted from homebridge-garage-gate-opener by MForge.org

Requirement

Before installing this plug-in, you need:

  • Download, build and install the C libraries:
sudo apt-get install automake libtool git
git clone https://github.com/thomasmacpherson/piface.git
cd piface/c
./autogen.sh && ./configure && make && sudo make install
sudo ldconfig
cd ../scripts
sudo ./spidev-setup
  • Activate SPI
sudo raspi-config
-> Interfacing Options -> Enable SPI

Installation

npm -g install homebridge-garage-piface

Configuration

config.json

"accessories": [
    {
    "accessory": "GaragePiFace",
    "name": "Garage",
    "switchOutput": 0,
    "switchPressTimeInMs": 1000,		// optional
    "switchValue": 1,			// optional
    "closedSensorInput": 0, 		// optional
    "closedSensorValue": 1, 		// optional
    "openSensorInput": 1,   		// optional
    "openSensorValue": 1,   		// optional
    "pollInMs": 4000,       		// optional
    "opensInSeconds": 10			// optional
    }
]