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-http-multiswitch-modern

v2.0.0

Published

Simple HTTP switches for Homebridge - stateful and radio-button/multi-switch (Modernized)

Downloads

95

Readme

homebridge-http-multiswitch-modern

Simple HTTP switches for Homebridge - stateful and radio-button/multi-switch switches.

Modernized for Homebridge 1.6+ and Node.js 18+.

Forked from nitaybz/homebridge-http-multiswitch (originally from homebridge-switcheroo)


What's New in v2.0.x

  • Native Fetch API: Removed the deprecated request library in favor of the modern Node.js fetch API.
  • Improved Reliability: Added state checks and concurrency locks to prevent redundant or overlapping HTTP requests.
  • Better HomeKit Support: Explicitly names individual buttons in Multiswitch mode (e.g., "Low", "Medium", "High") so they appear correctly in the Home app.
  • Better Error Handling: Detailed logs for failed requests, including the full URL and the specific error cause.

Switch Services

Switch (standard on/off)

Meant to be used as a standard on/off switch for lights, projectors, fans, etc.

{
    "accessory": "HttpMultiswitch",
    "switch_type": "Switch",
    "name": "My Projector",
    "http_method": "GET",
    "base_url": "http://192.168.0.XXX/command/",
    "on_url": "on",
    "off_url": "off"
}

Multiswitch (radio buttons)

Meant to be used as a switcher where only one input is ever on (radio button behavior). Turning one on automatically updates the others to off in HomeKit.

Individual button names (e.g., "Apple TV Mode") will be passed to HomeKit. If they appear grouped under the main accessory name, use the "Show as Separate Tiles" option in the Home app settings.

{
    "accessory": "HttpMultiswitch",
    "switch_type": "Multiswitch",
    "name": "Media Center",
    "http_method": "GET",
    "base_url": "http://192.168.0.XXX/command?id=",
    "multiswitch": [
        "Apple TV Mode",
        "PC Mode",
        "Android Mode",
        "The Music Mode"
    ],
    "multiurls": [
        "43",
        "42786sdf787",
        "l1479461871215",
        "44"
    ]
}

Configuration Params

| Parameter | Description | Required | | :--- | :--- | :---: | | name | Name of the accessory | ✓ | | switch_type | Switch or Multiswitch | ✓ | | base_url | Base URL for requests (include trailing slash if needed) | ✓ | | http_method | GET (default), POST, PUT, DELETE | | | username | Username for Basic Auth | | | password | Password for Basic Auth | | | referer | Referer header value | | | on_url | (Switch only) Endpoint for ON state | ✓ | | off_url | (Switch only) Endpoint for OFF state | ✓ | | on_body | (Switch only) Body for ON request | | | off_body | (Switch only) Body for OFF request | | | multiswitch | (Multiswitch only) List of names for the buttons | ✓ | | multiurls | (Multiswitch only) List of endpoints for the buttons | ✓ |

Installation

This plugin requires Node.js 18+ and Homebridge 1.6+.

  1. Install Homebridge: npm install -g homebridge
  2. Install this plugin: npm install -g homebridge-http-multiswitch-modern
  3. Use the Homebridge Config UI X to configure the plugin for the best experience.

Manual Installation (from Git)

If you want to install directly from this repository: npm install -g https://github.com/fellowgeek/homebridge-http-multiswitch-modern.git

Help

  • Trailing Slashes: Ensure your base_url has a trailing slash if your on_url or multiurls are relative paths.
  • Port Numbers: Specify the port if necessary (e.g., http://192.168.0.XXX:2000/).
  • Separate Tiles: If your Multiswitch buttons show up as one tile, long-press it in the Home app, go to Settings, and select "Show as Separate Tiles".