Programmatically control the Winix C545
Project description
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
~/dev/winix(master*) » winixctl hfern@arrakis
usage: winixctl [-h] {login,refresh,devices,fan,power} ...
Winix C545 Air Purifier Control
positional arguments:
{login,refresh,devices,fan,power}
login Authenticate Winix account
refresh Refresh account device metadata
devices List registered Winix devices
fan Fan speed controls
power Power controls
optional arguments:
-h, --help show this help message and exit
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file winix-0.1.0.tar.gz
.
File metadata
- Download URL: winix-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f48364422d4fcd09ca3e4a99535eaf8bfae45f9a386ae527d494f27c3c7146 |
|
MD5 | bfa0f6cb446eed2f36bdbc483de47669 |
|
BLAKE2b-256 | ec511bd003863aa541b04ce0752f4e117d9a85400ad00c574d2db0b3379369fc |
File details
Details for the file winix-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: winix-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dc4cbf6c2196e49aacbf7ee6824e94319f90e4f5b2295aefece84ccdfbdddf0 |
|
MD5 | 3bf6837a928a16b77c546bed2bd2b680 |
|
BLAKE2b-256 | dff68f9d2c8d60ba67be337e9a1126390ec3357616223a5d68e3f61611fa0d43 |