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-simple-wled

v2.0.0

Published

An accessory plugin for homebridge to support WLED Strips

Readme

Homebridge Simple WLED

npm downloads last commit build TypeScript Node.js Version License Test Coverage

Homebridge Plugin for WLED Strips (WLED-Project by Aircoookie)

✨ Features

  • WebSocket Support: Real-time communication with WLED devices via WebSocket for instant updates
  • Homebridge v2 Compatible: Works with both Homebridge v1.8+ and v2.0+
  • Improved Color Calculations: Enhanced RGB/HSL/HSV color conversion with better precision
  • Effect Autocomplete: Typeahead suggestions for all 127+ WLED effects
  • Custom Effect Support: Add custom effects for newer/older WLED versions with automatic validation
  • Multiple Host Support: Control multiple WLED devices with a single accessory
  • Effect & Preset Control: Switch between effects and presets via HomeKit
  • Ambilight Support: Toggle between Ambilight and Moodlight modes
  • Effect Speed Control: Adjustable effect speed via HomeKit

❓ Help

For faster support and information, join our Discord: https://discord.gg/qpbUtZCB2H

⚙️ Installation / NPM Package

Install via Homebridge UI or NPM: NPM Package

🔨 Configuration

The plugin can be configured via the Homebridge UI. The configuration schema provides:

  • Typeahead Effect Selection: Autocomplete suggestions for all WLED effects
  • Custom Effect Support: Type any effect name - the plugin validates it against your WLED device
  • Automatic Validation: Effects are checked against your device's supported effects at startup

Manual Configuration

Add the platform to your config.json in the platforms section:

{
  "platforms": [
    {
      "platform": "WLED",
      "wleds": [
        {
          "name": "LED-Table",
          "host": "192.168.1.100",
          "effects": ["Rainbow Runner", "Circus", "Fireworks"],
          "log": true
        },
        {
          "name": "LED-Box",
          "host": ["192.168.1.101", "192.168.1.102"],
          "effects": ["Rainbow Runner", "Circus"]
        }
      ]
    }
  ]
}

After editing the config, restart your Homebridge server and add the accessory manually from the Home app.

💡 Configure Effect Switch

Note: You can't enable the Effect-Switch and Preset-Switch at the same time!

Using the Homebridge UI

  1. Open the plugin configuration in Homebridge UI
  2. Add effects using the typeahead field - suggestions will appear as you type
  3. You can select from the list or type custom effect names
  4. Effects are automatically validated against your WLED device's supported effects

Manual Configuration

Add an effects array to your WLED configuration. All available effects can be found in the WLED Effects Documentation.

{
  "platform": "WLED",
  "wleds": [
    {
      "name": "LED-Table",
      "host": "192.168.1.100",
      "effects": ["Rainbow Runner", "Circus", "Fireworks", "Aurora"],
      "log": false
    }
  ]
}

Custom Effects

You can add custom effect names for:

  • Newer WLED versions with effects not yet in the list
  • Older WLED versions with retired effects
  • Custom compiled WLED builds

The plugin will:

  • Validate effects against your device's supported effects at startup
  • Show warnings for unsupported effects but still allow them
  • Use fallback effects if a custom effect is not found

Effect Options

Turn off WLED when effect is turned off:

{
  "name": "LED-Table",
  "host": "192.168.1.100",
  "effects": ["Rainbow Runner", "Circus"],
  "turnOffWledWithEffect": true
}

Disable Effect Switch: Simply remove the effects option to use only the standard LightBulb functionality.

🛠 Configure Effect Speed

Default Effect Speed:

{
  "name": "LED-Table",
  "host": "192.168.1.100",
  "effects": ["Rainbow Runner", "Circus"],
  "defaultEffectSpeed": 20
}

Effect Speed Control (HomeKit Accessory):

{
  "name": "LED-Table",
  "host": "192.168.1.100",
  "effects": ["Rainbow Runner", "Circus"],
  "showEffectControl": true
}

💡 Configure Preset Switch

Note: You can't enable the Effect-Switch and Preset-Switch at the same time!

Add a presets array with your preset names. The order must match your WLED presets (Preset 1 = first index, Preset 2 = second index, etc.):

{
  "platform": "WLED",
  "wleds": [
    {
      "name": "LED-Table",
      "host": "192.168.1.100",
      "presets": ["Christmas", "Halloween", "Morning", "Night"],
      "log": false
    }
  ]
}

To disable the Preset Switch, simply remove the presets option.

💡💡💡 Multiple WLED Hosts

Control multiple WLED devices with a single accessory by setting host to an array:

Important: The first WLED host acts as the primary device. Changes made to the primary WLED (e.g., via the web panel) will sync to all other WLEDs in the array.

{
  "platform": "WLED",
  "wleds": [
    {
      "name": "LED-Table",
      "host": ["192.168.1.100", "192.168.1.101", "192.168.1.102"],
      "effects": ["Rainbow Runner", "Circus", "Fireworks"]
    }
  ]
}

🌦 Ambilight Switch

Add a switch to toggle between Ambilight and Moodlight modes:

{
  "platform": "WLED",
  "wleds": [
    {
      "name": "LED-Table",
      "host": "192.168.1.100",
      "effects": ["Rainbow Runner", "Circus"],
      "ambilightSwitch": true
    }
  ]
}

This works with multiple IP addresses and effects as described above. Default is false if not specified.

🔧 Technical Details

WebSocket Communication

The plugin uses WebSocket connections (ws://[WLED-IP]/ws) for real-time communication:

  • Instant state updates from WLED devices
  • Automatic reconnection on connection loss
  • Message queuing when disconnected
  • Support for up to 4 concurrent WebSocket connections per device

Color Handling

  • Improved HSV to RGB conversion with better precision
  • Enhanced color picker support for low saturation colors
  • Automatic color synchronization across multiple WLED devices

Effect Validation

  • Effects are loaded from your WLED device at startup
  • Custom effects are validated and warnings are shown if not supported
  • Fallback mechanisms ensure the plugin continues working even with unsupported effects

🧪 Testing

The plugin includes comprehensive unit tests:

# Run all tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

📝 Development

See DEVELOPMENT.md for local development and build instructions.

🤝 Contributing

If you have any ideas or improvements, feel free to fork the repository and submit a pull request.

☕ Donation

You can support the development of this plugin by buying me a coffee:

Powered by:

Thanks to everyone who supports this project!

📄 License

ISC