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 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-winix-purifiers

v2.0.4

Published

Homebridge plugin for Winix air purifiers

Downloads

44

Readme

homebridge-winix-purifiers

verified-by-homebridge NPM Version npm

Homebridge support for Winix air purifiers.

Table of Contents

Features

  • Dynamic Device Discovery: Automatically discovers and configures Winix purifiers linked to your account.
  • Control: Power on/off, switch between sleep/auto/manual modes, and adjust airflow speed.
  • Customization: Optionally expose Air Quality, Ambient Light, Plasmawave, Auto Mode, and Sleep Mode switches to HomeKit.
  • Filter Management: Exposes the remaining filter life and provides an alert when it's time to change the filter, configurable to trigger at a specified percentage of remaining filter life.
  • Efficiency: Features Winix API response caching to minimize requests and avoid rate limiting.
  • Reliability: Automatically refreshes device list on a configurable interval to ensure devices are always up-to-date.

Device Support

This plugin officially supports the following Winix air purifiers:

  • C545
  • C909

While other models aren't explicitly blocked, they're not yet officially supported and may not work as expected.

Configuration

Alternate Winix Account Setup for Homebridge

Winix's system limits users to a single active session per account. When the same account is used simultaneously on the Winix app and Homebridge, it can lead to being logged out from one of the sessions. An alternate account dedicated to Homebridge prevents this issue, ensuring stable operation without frequent authentication disruptions.

Yes, this is an annoying and tedious one-time setup, but it is well worth not having to continually fix authentication issues.

To create and link an alternate Winix account, please follow the instructions in the Alternate Winix Account: Creating and Linking Wiki page.

Homebridge Configuration UI

Easily configure the plugin through the Homebridge Config UI X. Simply provide your Winix account credentials for automatic device discovery and provisioning.

Manual Configuration

While not recommended, if manual setup is required, add the following to the platforms section of your config.json:

{
  "platforms": [
    {
      "exposeAirQuality": true,
      "exposeAmbientLight": true,
      "exposePlasmawave": false,
      "exposeAutoSwitch": false,
      "exposeSleepSwitch": false,
      "filterReplacementIndicatorPercentage": 10,
      "cacheIntervalSeconds": 300,
      "deviceRefreshIntervalMinutes": 60,
      "auth": {
        "username": "[email protected]",
        "userId": "f470ce5f-6b8e-44b4-a6db-b7f4d4c6f851",
        "refreshToken": "<refresh token>"
      },
      "deviceOverrides": [
        {
          "deviceId": "123ABC456DEF_abc123xyz",
          "serialNumber": "WNXAI12345678",
          "nameDevice": "Living Room Air Purifier"
        },
        {
          "deviceId": "789XYZ987VWX_xyz789abc",
          "serialNumber": "WNXAI87654321",
          "nameDevice": "Bedroom Air Purifier",
          "nameAutoSwitch": "My Auto Switch"
        }
      ],
      "platform": "WinixPurifiers"
    }
  ]
}

Properties

| Name | Default Value | Note | |--------------------------------------------|--------------------|--------------------------------------------------------------------------------------------------------------------| | exposeAirQuality | false | Whether to expose the air quality sensors to HomeKit. | | exposeAmbientLight | false | Whether to expose the ambient light sensors to HomeKit. | | exposePlasmawave | false | Whether to expose switches for Plasmawave on/off. | | exposeAutoSwitch | false | Whether to expose switches for Auto mode on/off. | | exposeSleepSwitch | false | Whether to expose switches for Sleep mode on/off. | | filterReplacementIndicatorPercentage | 10 | Percentage of filter life remaining to trigger a filter replacement alert. | | cacheIntervalSeconds | 60 | Time, in seconds, for how long to reuse cached responses from Winix. | | deviceRefreshIntervalMinutes | 60 | Time, in minutes, for how often to poll Winix to refresh the device list. | | auth.username | "" | Your Winix account username (email). This field is meant to be read-only after being generated in the UI. | | auth.userId | "" | Your Winix user ID for the Cognito User Pool. This field is meant to be read-only after being generated in the UI. | | auth.refreshToken | "" | The refresh token for your Winix account. This field is meant to be read-only after being generated in the UI. | | deviceOverrides[].deviceId | "<deviceId>" | The ID of the device. | | deviceOverrides[].serialNumber | "WNXAI00000000" | The serial number of the device. Optional. | | deviceOverrides[].nameDevice | "<Winix Alias>" | The display name of the device. Optional. | | deviceOverrides[].nameAirQualitySensor | "Air Quality" | The display name of the air quality sensor. Optional. | | deviceOverrides[].nameAmbientLightSensor | "Ambient Light" | The display name of the ambient light sensor. Optional. | | deviceOverrides[].namePlasmawaveSwitch | "Plasmawave" | The display name of the Plasmawave switch. Optional. | | deviceOverrides[].nameAutoSwitch | "Auto Mode" | The display name of the Auto switch. Optional. | | deviceOverrides[].nameSleepSwitch | "Sleep" | The display name of the Sleep switch. Optional. | | platform | "WinixPurifiers" | Must always be "WinixPurifiers" in order for the plugin to load this config. |

FAQ

Upgrading from the old plugin architecture (v1.x.x) to the new one (v2.x.x)?

Unfortunately, there's no way to directly migrate from the old plugin architecture to the new one. Please follow the Migration Guide in the Wiki:

Migrating from v1.x.x to v2.x.x.

Missing “Auto/Manual” switch in Home app?

Please see this issue for more details.

Having issues moving your purifier to a room in the Home app with the same name?

Try moving the purifier to a room with a different name, then move it back to the desired room. For example, if you have a room named “Bedroom” and a purifier named “Bedroom”, try moving the purifier to a room named "Living Room", then move it to "Bedroom".

Acknowledgments