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
usage: winixctl [-h] {login,refresh,devices,fan,power,mode,plasmawave} ...
Winix C545 Air Purifier Control
positional arguments:
{login,refresh,devices,fan,power,mode,plasmawave}
login Authenticate Winix account
refresh Refresh account device metadata
devices List registered Winix devices
fan Fan speed controls
power Power controls
mode Mode controls
plasmawave Plasmawave 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.1.tar.gz
.
File metadata
- Download URL: winix-0.1.1.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 | 45e3c6be28f711cc59f7869d2f4026c920175038cf0c14018f760c63d5f0ab01 |
|
MD5 | 20c645af717a317afdc30bd16091f406 |
|
BLAKE2b-256 | 466f7d19c94639510558eff75836cdb6609f57520a25badfecf30b57c53e52f3 |
File details
Details for the file winix-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: winix-0.1.1-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 | 9a148a2d321dfeadfcf0f356b2966e30d1605ee5c69a4b04cee599039db1427d |
|
MD5 | 31031f766e2d3b711ff28cd7fdeca96f |
|
BLAKE2b-256 | 16d0904f5527aa6dee25960bd296a4105a295f79441ffd771b12aad47cfce4af |