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-sonos-soundfeatures

v0.2.0

Published

Homebridge plugin to expose Sonos soundbar Night Mode and Speech Enhancement as HomeKit switches

Readme

homebridge-sonos-soundfeatures

A Homebridge plugin that exposes Sonos soundbar Night Mode and Speech Enhancement as HomeKit switches.

Supported Devices

Night Mode and Speech Enhancement are available on Sonos soundbars:

  • Sonos Playbar
  • Sonos Beam (Gen 1 & 2)
  • Sonos Arc / Arc Ultra
  • Sonos Ray

Installation

Via Homebridge UI (recommended)

Search for homebridge-sonos-soundfeatures in the Homebridge plugin search and install.

Via npm

npm install -g homebridge-sonos-soundfeatures

Configuration

Add the platform to your Homebridge config.json:

{
  "platforms": [
    {
      "platform": "SonosSoundFeatures",
      "name": "Sonos Sound Features",
      "discoveryTimeout": 5
    }
  ]
}

By default, the plugin discovers Sonos devices via SSDP multicast. If that doesn't work (e.g. Docker), you can use subnet scanning or specify devices manually:

{
  "platforms": [
    {
      "platform": "SonosSoundFeatures",
      "name": "Sonos Sound Features",
      "autoDiscovery": {
        "subnet": "192.168.1",
        "timeout": 5
      }
    }
  ]
}
{
  "platforms": [
    {
      "platform": "SonosSoundFeatures",
      "name": "Sonos Sound Features",
      "devices": [
        {
          "name": "Living Room Soundbar",
          "ip": "192.168.1.100"
        }
      ]
    }
  ]
}

Options

| Option | Required | Default | Description | |--------|----------|---------|-------------| | platform | Yes | — | Must be SonosSoundFeatures | | name | Yes | — | Display name for the platform | | discoveryTimeout | No | 5 | Seconds to wait for SSDP auto-discovery (1–30) | | autoDiscovery.subnet | No | — | First three octets of your network (e.g. 192.168.1). Performs a TCP scan on port 1400 across the /24 range. Use when SSDP is unavailable (e.g. Docker). | | autoDiscovery.timeout | No | 5 | Seconds to wait for each host during subnet scanning (1–30) | | devices | No | — | Array of { name, ip } for manual device config. If provided, all discovery is skipped. |

Discovery priority

  1. Manual — if devices is provided, those IPs are used directly
  2. Subnet scan — if autoDiscovery.subnet is set, a TCP port scan finds Sonos devices
  3. SSDP (default) — multicast discovery on the local network

Development

Prerequisites

  • Node.js 18, 20, or 22
  • npm

Build

npm install
npm run build

Lint

npm run lint

Test

npm test

Debug Web UI

A standalone web UI is included for testing the core Sonos functionality without Homebridge.

  1. Run with VS Code: Use the "Debug Web Server" launch configuration (F5) — this starts with debugger attached.
  2. Run from terminal: npm run web
  3. Open http://localhost:3000
  4. Discover devices or enter an IP manually, then toggle Night Mode and Speech Enhancement.

Link for local Homebridge testing

npm run build
npm link
# Then add the platform config to your Homebridge config.json

Release

Releases are managed via GitHub Actions. To publish a new version:

  1. Go to Actions → Release in GitHub
  2. Click Run workflow
  3. Select the version bump type (patch / minor / major)
  4. Enter changelog entries
  5. The workflow will build, test, bump the version, create a GitHub Release, and publish to npm

Note: Publishing to npm requires the NPM_TOKEN repository secret to be configured.

License

MIT