Skip to main content

Winix Controller

This is a Python library for controlling Winix C545 Air Purifier devices. I reverse-engineered the API calls from the Android app. There are a few weird idiosyncrasies with the Winix backends.

Included in this package is a CLI program winixctl.

Setup

Install using PyPI: pip install winix. You then have access to the winix module in python as well as the winixctl command for shell (which uses the library).

winixctl CLI

$ winixctl
usage: winixctl [-h] [--device DEVICE_SELECTOR] {login,refresh,devices,getstate,fan,power,mode,plasmawave} ...

Winix C545 Air Purifier Control

positional arguments:
  {login,refresh,devices,getstate,fan,power,mode,plasmawave}
    login               Authenticate Winix account
    refresh             Refresh account device metadata
    devices             List registered Winix devices
    getstate            Get device state
    fan                 Fan speed controls
    power               Power controls
    mode                Mode controls
    plasmawave          Plasmawave controls

optional arguments:
  -h, --help            show this help message and exit
  --device DEVICE_SELECTOR, -D DEVICE_SELECTOR
                        Device Index/Mac/Alias to use

In order to control your device, you first must run winixctl login. this will save a token from the Winix backend in a file on your system at ~/config/winix/config.json. It will prompt you for a username and password. You can use the --username and --password flags as well.

You can see the devives registered to your winix account with winixctl devices.

~/dev/winix(master*) » winixctl devices
1 devices:
Device#0 (default) -------------------------------
      Device ID : 123456abcde_********** (hidden)
            Mac : 123456abcde
          Alias : Bedroom
       Location : SROU

Missing a device? You might need to run refresh.

The last portion of the Device ID is hidden as it can be used to control the device.

Multi-device Support

By default the commands will work on the first device you have in your Winix account. If you have multiple air purifiers, you can specify which device to use by specifying a value for the top-level --device flag (short: -D).

You may specify one of:

  • The device index. Example: 0 (the default device selector).
  • The device mac. Example: 123456abcde. Mac values stay the same between device registration. If you have a device that you move between Wifi networks frequently then you will want to use this.
  • The device alias. Example: bedroom. This is the most human-friendly version.

Examples

Turn off the bedroom air purifier using an alias as the selector:

winixctl -D bedroom power off

Metadata

Release files for winix 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for winix 0.3.0
File Size Uploaded Provenance Actions
winix-0.3.0.tar.gz 8.9 kB Without provenance Details for winix-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for winix 0.3.0
File Interpreter ABI Platform Actions
winix-0.3.0-py3-none-any.whl Python 3 none any Details for winix-0.3.0-py3-none-any.whl

Total release size: 18.1 kB

Release files / winix-0.3.0.tar.gz

Download URL winix-0.3.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b848f0823c995e9e82dbcf62439322867521a979af2ba22582f554b5830836ac
BLAKE2b-256 checksum
How to use checksums
d0acabc514a6f1fb4fc9f15bb50c059d311c1da7a48a59fd2054590c6c37df02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

Release files / winix-0.3.0-py3-none-any.whl

Download URL winix-0.3.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0d52979e3076ed0a09b9a084fc472dcede39892c9797fdf24088072af503824
BLAKE2b-256 checksum
How to use checksums
a47e986fef7facd7cc6e7891aa548b1a48c6713392d1f444e129e0a024ab14fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

Security for winix 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page