# homebridge-w215-kb

> Homebridge plugin for the D-Link DSP-W215 smart plug (switch, temperature and power meter)

Latest version **1.0.9** (published 2026-11-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install homebridge-w215-kb
pnpm add homebridge-w215-kb
yarn add homebridge-w215-kb
bun add homebridge-w215-kb
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2026-11-19 |
| First published | 2022-03-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.12.0 |
| Dependencies | 0 |
| Unpacked size | 66.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Keaton Burleson |
| Maintainers | 128keaton |
| Keywords | homebridge-plugin, supports-hap, D-Link, dlink, w215, w216b, dsp |

## Links

- npm: https://www.npmjs.com/package/homebridge-w215-kb
- Repository: https://github.com/128keaton/homebridge-w215
- Homepage: https://github.com/128keaton/homebridge-w215#readme
- Issues: https://github.com/128keaton/homebridge-w215/issues
- npm.io page: https://npm.io/package/homebridge-w215-kb

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2026-11-19
- 1.0.7 — 2022-03-03
- 1.0.6 — 2022-03-02
- 1.0.5 — 2022-03-02
- 1.0.4 — 2022-03-02
- 1.0.3 — 2022-03-02
- 1.0.2 — 2022-03-02
- 1.0.1 — 2022-03-02
- 1.0.0 — 2022-03-02

## README

# homebridge-w215-kb

[Homebridge](https://homebridge.io) plugin for the **D-Link DSP-W215** smart plug.

| Feature | HomeKit |
| --- | --- |
| On / off | Outlet (including the "in use" indicator) |
| Temperature | Temperature sensor |
| Power draw (W) | Shown in [Eve](https://www.evehome.com/en/eve-app) via the Eve "Consumption" characteristic |
| Device info | Model, MAC address (serial number), firmware and hardware revision, read from the plug |

Changes made with the plug's physical button are picked up by background polling.

## Installation

```sh
npm install -g homebridge-w215-kb
```

Requires Node.js 22.12 or newer and Homebridge 1.6 or newer.

## Configuration

Use the Homebridge UI, or add one entry per plug to the `accessories` array in `config.json`:

```json
{
  "accessories": [
    {
      "accessory": "DSP-W215",
      "name": "Desk Lamp",
      "host": "192.168.1.50",
      "password": "123456"
    }
  ]
}
```

| Option | Default | Description |
| --- | --- | --- |
| `name` | `DSP-W215` | Name shown in HomeKit. |
| `host` | – | IP address or hostname of the plug. Give it a reserved IP address in your router. |
| `password` | – | The PIN printed on the back of the plug, or the password you set in its web interface. Keep it in quotes so leading zeros survive. |
| `username` | `admin` | Only change this if you changed it in the plug's web interface. |
| `pollingInterval` | `15` | Seconds between polls (minimum 5). |
| `timeout` | `5` | Seconds to wait for the plug before giving up. |
| `disableTemperature` | `false` | Don't create the temperature sensor. |
| `disablePowerMeter` | `false` | Don't read power consumption. |

## Troubleshooting

* **"No Response" in the Home app** – the plug can't be reached or rejected the login. The Homebridge log says which
  (`timed out`, `ECONNREFUSED`, `Login rejected by the plug - check the username and PIN`, ...). The plug is a very small
  device: if it keeps dropping out, give it a better Wi-Fi signal and don't poll more often than you need to.
* **Run with `homebridge -D`** to log every request and response.
* **The DSP-W215 only supports the 2.4 GHz band** and is cloud-less once the mydlink service is disabled; this plugin talks
  to it directly over your LAN (HNAP over HTTP, port 80), so keep it on a trusted network.

## Development

```sh
npm install
npm run lint       # Biome: formatting, import order and lint rules
npm run lint:fix   # ...and apply the safe fixes
npm run build
npm test
```

`npm test` runs against an in-process mock plug that reproduces the real firmware's quirks (module numbering, `ERROR`
responses with a bogus `0`, malformed XML in `GetModuleSOAPActions`, `401` for unknown sessions).

To also run the read-only integration tests against a real plug:

```sh
W215_HOST=192.168.1.50 W215_PIN=123456 npm test
```

Add `W215_ALLOW_SWITCH=1` to include a test that briefly switches the plug off/on and restores its original state.
**This toggles whatever is plugged in.**

## Credits

The HNAP protocol details come from the community work in
[bikerp/dsp-w215-hnap](https://github.com/bikerp/dsp-w215-hnap) and [pyW215](https://github.com/LinuxChristian/pyW215).

---
_Source: https://npm.io/package/homebridge-w215-kb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
