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-hubspace2

v1.0.6

Published

Homebridge plugin for Hubspace smart home devices (lights, fans, switches, thermostats, locks)

Downloads

742

Readme

homebridge-hubspace2

npm npm License: MIT Homebridge

A Homebridge plugin that brings your Hubspace smart home devices into Apple HomeKit — no Home Assistant required.

Hubspace is The Home Depot's smart home platform (sold under brands like Hampton Bay, EcoSmart, and Defiant). This plugin communicates directly with the Hubspace cloud API.


Supported Devices

| Device Type | HomeKit Service | Notes | |---|---|---| | Lights | Lightbulb | On/off, brightness, color temperature, RGB color | | Ceiling Fans | Fan | On/off, speed (%), direction | | Switches | Switch | On/off | | Outlets | Outlet | On/off | | Thermostats | Thermostat | Heat/cool/auto/off modes, current & target temp | | Locks | Lock Mechanism | Lock / unlock | | Water Valves / Timers | Valve | Open / close |

Unsupported device classes are skipped silently (enable debug in config to log them).


Requirements

  • Homebridge ≥ 1.8.0
  • Node.js ≥ 20.0.0
  • A Hubspace account with at least one paired device

Installation

Via Homebridge UI (recommended)

  1. Open the Homebridge UI in your browser.
  2. Go to Plugins and search for homebridge-hubspace2.
  3. Click Install.
  4. Click Settings and enter your Hubspace username (email) and password.
  5. Restart Homebridge.

Manual

npm install -g homebridge-hubspace2

Then add the platform to your ~/.homebridge/config.json (see Configuration below) and restart Homebridge.


Configuration

Add the following to the platforms array in your Homebridge config.json:

{
  "platforms": [
    {
      "platform": "HubspacePlatform",
      "name": "Hubspace",
      "username": "[email protected]",
      "password": "yourpassword"
    }
  ]
}

All options

| Key | Type | Default | Required | Description | |---|---|---|---|---| | platform | string | — | Yes | Must be HubspacePlatform | | name | string | "Hubspace" | No | Display name in Homebridge logs | | username | string | — | Yes | Your Hubspace account email | | password | string | — | Yes | Your Hubspace account password | | otp | string | — | No | One-time password for 2FA — see Two-Factor Authentication | | pollingInterval | integer | 30 | No | How often (seconds) to poll device state. Minimum 10. | | temperatureUnit | string | "fahrenheit" | No | "fahrenheit" or "celsius" — must match your Hubspace app setting | | debug | boolean | false | No | Log extra detail including skipped device classes |


Two-Factor Authentication

Some Hubspace accounts require an emailed one-time password (OTP) to log in. Because the OTP is only sent after you attempt a login, it cannot be provided upfront. Follow these steps the first time you set up the plugin:

  1. Start Homebridge with just your username and password in the config.

  2. Check the Homebridge log. If your account uses 2FA you will see a banner like this:

    ══════════════════════════════════════════════════════
      Hubspace: Two-factor authentication (OTP) required
    ══════════════════════════════════════════════════════
      A one-time code was just sent to your email address.
      To complete login:
        1. Copy the code from your email.
        2. Add  "otp": "<code>"  to your Hubspace config.
        3. Restart Homebridge.
        4. Once running, remove the "otp" line – it is no
           longer needed after the first successful login.
    ══════════════════════════════════════════════════════
  3. Add the OTP to your config and restart Homebridge:

    {
      "platform": "HubspacePlatform",
      "username": "[email protected]",
      "password": "yourpassword",
      "otp": "123456"
    }
  4. After a successful login, remove the otp line. The plugin saves a refresh token to disk (~/.homebridge/hubspace-tokens.json) and uses it automatically on future restarts. You should not need to go through this process again unless you change your password or manually delete the token file.


How It Works

  • Authentication — Uses the Hubspace OAuth2 PKCE flow (the same method as the official app). Access tokens expire after ~2 minutes; the plugin refreshes them automatically in the background using a long-lived refresh token stored on disk.
  • Device discovery — On startup the plugin fetches all devices from your Hubspace account and registers them as HomeKit accessories. Devices no longer present in your account are automatically removed.
  • State updates — The plugin polls the Hubspace API every pollingInterval seconds (default 30 s) and pushes updated values to HomeKit. Commands sent from HomeKit are applied immediately.

Troubleshooting

No devices appear in HomeKit

  • Confirm your credentials are correct by logging into the Hubspace app.
  • Enable "debug": true in your config and check the logs for skipped device classes.
  • Make sure your Hubspace devices are online and visible in the app before starting Homebridge.

Authentication keeps failing

  • Delete ~/.homebridge/hubspace-tokens.json and restart Homebridge to force a fresh login.
  • If your account uses 2FA, follow the Two-Factor Authentication steps again.

A device type is not supported

Open an issue on GitHub and include the device name and model. Enable "debug": true first — the log will show the deviceClass string the API returns, which helps add support quickly.


Development

git clone https://github.com/ctrlcmdshft/homebridge-hubspace2
cd homebridge-hubspace2
npm install
npm run build       # compile TypeScript
npm run watch       # auto-recompile + restart Homebridge on file changes
npm run lint        # check for lint errors

To test locally against a real Homebridge instance:

npm link
# then add the platform to your Homebridge config and restart

License

MIT © 2025