homebridge-sonos-soundfeatures
v0.2.0
Published
Homebridge plugin to expose Sonos soundbar Night Mode and Speech Enhancement as HomeKit switches
Maintainers
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-soundfeaturesConfiguration
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
- Manual — if
devicesis provided, those IPs are used directly - Subnet scan — if
autoDiscovery.subnetis set, a TCP port scan finds Sonos devices - SSDP (default) — multicast discovery on the local network
Development
Prerequisites
- Node.js 18, 20, or 22
- npm
Build
npm install
npm run buildLint
npm run lintTest
npm testDebug Web UI
A standalone web UI is included for testing the core Sonos functionality without Homebridge.
- Run with VS Code: Use the "Debug Web Server" launch configuration (F5) — this starts with debugger attached.
- Run from terminal:
npm run web - Open
http://localhost:3000 - 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.jsonRelease
Releases are managed via GitHub Actions. To publish a new version:
- Go to Actions → Release in GitHub
- Click Run workflow
- Select the version bump type (patch / minor / major)
- Enter changelog entries
- The workflow will build, test, bump the version, create a GitHub Release, and publish to npm
Note: Publishing to npm requires the
NPM_TOKENrepository secret to be configured.
License
MIT
