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-ble-adv

v1.0.0

Published

A Homebridge plugin to convert BLE advertisements to smart devices .

Readme

homebridge-ble-adv

A Homebridge plugin to convert BLE advertisements to smart devices.

This plugin can be used for your ESP32 battery-operated projects. You can just broadcast a BLE advertisement without maintaining the constant connection.

So you can use deep sleep of the ESP32 and also the latency will still be pretty low (<300ms if the ESP32 is about 5m from the receiver in my experience).

This plugin constantly listens for BLE advertisements and if it detects one, it sends a "single click" event to Apple Home.

Configuration

{
  "platforms": [
       {
            "buttons": [
                {
                    "name": "Play",
                    "deviceName": "ESP32BUT2980",
                    "buttonPressAdvPattern": "2;.*"
                },
                {
                    "name": "Pauza",
                    "deviceName": "ESP32BUT2980",
                    "buttonPressAdvPattern": "1;.*"
                }
            ],
            "platform": "BLEAdvHomebridgePlatform"
        }
    ]
}

| Property | Description | |-|-| | name | Button name. This is the name that will be visible in Apple Home. Note: Duplicate names are not allowed. | | deviceName | Bluetooth device local name. The plugin will listen for advertisements of this device. | | buttonPressAdvPattern | Regex used to match the manufacturerData of the advertisements. For example: You may use a single ESP32 to make 3 smart buttons. This pattern is used to match each of them, even if the deviceName is the same. |

Note: This plugin has retransmission detection. It WILL IGNORE DUPLICATE ADVERTISEMENTS. This means you can broadcast the advertisement continuously for 2s to make sure the signal is received.

Personally I just generate a random number with each button press and append the number at the end of the manufacturerData. Example ESP32-C3 code

This is how the above configuration will look like in Apple Home:

Smart buttons in Apple Home

How to find out the BLE device name? Or if it actually advertises?

Install @abandonware/noble

npm install -g @abandonware/noble

Then run ble_test.js.

node ble_test.js

It will scan for advertisements and show them in real time.

Hit ctrl+c to stop listening.

To make the output more readable, edit uncomment line 11 and edit it so it will match your device name:

    if (!localName.startsWith("ESP32")) return;

In my case the device name starts with ESP32, so I wanted to detect if I got the whole deviceName correctly or if the advertisement is actually detected.