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 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-gpio-electric-rim-lock

v3.6.2

Published

Homebridge plugin to open electric rim locks via Raspberry Pi GPIO pins

Readme

homebridge-gpio-electric-rim-lock

npm version license Platform verified-by-homebridge

Homebridge plugin to control electric rim locks using Raspberry Pi GPIO pins. This plugin allows you to open electric rim locks from Apple HomeKit by triggering a relay connected to a Raspberry Pi.

Compatibility

This plugin is designed to run only on Raspberry Pi hardware because it uses the rpio library to access GPIO pins.

⚠️ The plugin will not work on:

  • non-Raspberry Pi Linux systems
  • virtual machines
  • Docker containers without GPIO access

Hardware Setup

This plugin assumes that the Raspberry Pi controls an electric rim lock via a relay module.

Electric rim locks usually include a wall button that briefly closes a circuit to unlock the door.
On many systems this is a 12V AC circuit.

The Raspberry Pi must not be connected directly to the lock, therefore a relay module is required.

When HomeKit sends the unlock command:

  1. the GPIO pin activates the relay
  2. the relay closes the circuit
  3. the door unlocks
  4. the relay is released after the configured delay

Circuit Diagram

Installation

Install via Homebridge UI (Recommended)

  1. Open the Homebridge UI
  2. Navigate to Plugins
  3. Search for: homebridge-gpio-electric-rim-lock
  4. Click Install

Install via npm

npm install -g homebridge-gpio-electric-rim-lock

Restart Homebridge after installation.

Configuration

Using the Homebridge UI

The plugin includes a configuration interface.

Navigate to: Plugins → Homebridge GPIO Electric Rim Lock → Settings

Manual Configuration

Add the following to your Homebridge config.json.

Example:

{
  "platforms": [
    {
      "platform": "Tiro",
      "locks": [
        {
          "name": "Front Door",
          "pin": 11,
          "duration": 500
        },
        {
          "name": "Back Door",
          "pin": 12,
          "duration": 700
        }
      ]
    }
  ]
}

Configuration Options

| Field | Required | Description | |------|------|------| | name | yes | Name of the door lock shown in HomeKit | | pin | yes | Physical GPIO pin connected to the relay (recommended 11, 12, 13 or 15)| | duration | no | Relay activation time in milliseconds (from 100 to 2000, default 500 ms) |

Troubleshooting

Plugin does not start

Make sure Homebridge is running on a Raspberry Pi.

You can verify this with:

cat /proc/cpuinfo

Relay does not trigger

Check:

  • correct GPIO pin number
  • relay module power supply
  • GPIO permissions

GPIO permission errors

Run Homebridge with appropriate permissions or add the user to the gpio group.

Example:

sudo usermod -aG gpio homebridge

Restart the system after changing group permissions.

Safety Notice

This plugin controls physical door locks.

Always ensure:

  • your wiring is correct
  • relay modules are properly isolated
  • the door can still be opened manually in case of failure

The author is not responsible for damage or security issues caused by improper installation.