npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

homebridge-raspi-bft-gate

v0.0.1

Published

Exposes a bft gate accessory to HomeBridge that uses a RaspberryPi GPIO pins

Readme

homebridge-raspi-bft-gate

Raspberry Pi GPIO BFT Gate plugin for HomeBridge

Circuit

This plugin assumes that you are using a Raspberry Pi to directly control your BFT gates.

Depending on the BFT gates controller model, you might need different circuits and configuration.

Example for ZARA BTL2 controller:

* Raspberry Pi Zero Wireless + ModMyPi PiOT Relay Board + 24v relay
* Open/Close command - relay COM pin to controller pin 60, relay NO pin to controller pin 61
* Gates status - connect 24v relay com port to raspi 3v, connect 24 relay NO port to raspi GPIO pin, 24v relay coil contacts to controller pins 20 and 21
* Setup a motor closing delay on the controller, so that we can distinguish between opening and closing of the gates, this is needed because the board does not have a pin that outputs current gates status (open/closed)

Installation

  1. Choose the GPIO pins that you are going to use
  2. Export the GPIO pins to be used and set their direction after reboot
  3. Install homebridge using: npm install -g homebridge
  4. Install this plugin using: npm install -g homebridge-raspi-bft-gate
  5. Update your configuration file

Sample configuration

Configuration sample:

   "accessories": [
       {
           "accessory": "RaspPiGPIOGarageDoor",
           "name": "Garage Door",
           "doorSwitchPin": 23,
           "doorSwitchPressTimeInMs": 1000,
           "doorSwitchValue": 1,
           "closedDoorSensorPin": 24,
           "closedDoorSensorValue": 1,
           "openDoorSensorPin": 25,
           "openDoorSensorValue": 1,
           "doorPollInMs": 4000,
           "doorOpensInSeconds": 14
       }
   ],

Fields:

  • name - Can be anything (required)
  • switchPin - The physical GPIO pin number that controls the relay to trigger the garage door
  • switchValue - 1 = ACTIVE_HIGH, 0 = ACTIVE_LOW, defaults to 1 if not specified. Set to 0 if you have a relay that requires the signal to be 0v to trigger.
  • switchPressTimeInMs - number of milliseconds to trigger the garage door button. defaults to 1000 millseconds (1 second) if not specified
  • statusPin - The physical GPIO pin that senses if the door is closed, do not specify if no sensor present
  • statusValue - 1 = ACTIVE_HIGH, 0 = ACTIVE_LOW, defaults to 1 if not specified
  • statusPollInMs - Number of milliseconds to wait before polling the doorSensorPin to report if the door is open or closed
  • closingDelayInSeconds - Delay in seconds before second motors start closing after the first, this is used to distinguish between opening and closing the gates when initial gate status is unknown

NB! Note on pin selection in case you are not using a ModMyPi PiOT Relay Board

When the Raspberry Pi reboots GPIO pins are reset to their default state. This can cause your garage door to open without you issuing a command. Please make sure you pick the correct pins so that you don't accidentally have your garage door opening after a power loss.

The following pins are pulled HIGH (they output a 3.3 volt signal) on reboot:

  • GPIO0/2
  • GPIO1/3
  • GPIO4
  • GPIO7
  • GPIO8

GPIO14 is configured as a Serial Transmit line, so avoid choosing that pin.

(information comes from raspberrypi forums)