purifier-stats
Read PM2.5 (µg/m³), temperature (°C), relative humidity (%), remaining filter life (%), power, and mode from a Xiaomi Smart Air Purifier 4 Lite on your Wi-Fi.
Hardware-tested on zhimi.airp.rmb1. The driver also accepts zhimi.airpurifier.rma1, which still needs hardware verification.
Website and interactive sample
Install and pair
Requires Python 3.10+ and an OS credential store for saved pairing. On a computer connected to the purifier’s Wi-Fi, run:
uv tool install --python 3.12 purifier-stats
purifier-stats setup
purifier-stats
Select the region shown in Xiaomi Home with ↑/↓ and Enter. Scan the QR in Xiaomi Home, approve sign-in, then confirm the purifier. Setup reads the device before saving its IP, model and token in your credential store. Subsequent reads use the LAN. Run setup again if its address or token changes.
To skip the menu and save a QR image, use purifier-stats setup --region i2 --qr-image sign-in.png (India). Use a fresh path and keep setup running while you scan. The file contains a temporary sign-in credential. Remove it after use. See purifier-stats setup --help for all regions.
Python
Install in your virtual environment with pip install purifier-stats. After pairing, read the sensors from Python:
from purifier_stats import Purifier
readings = Purifier.paired().stats()
print(readings["pm2_5_ug_m3"])
With your own credentials, use Purifier(ip=ip, token=token, model=model).stats(). Both interfaces return the same fields. Unavailable sensor values are None in Python and null in JSON.
Agent skill
Install the agent skill directly from GitHub with the skills.sh CLI. Select your agent when prompted.
npx skills add thepushkarp/purifier-stats --skill purifier-stats
Metadata
Release files for purifier-stats 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| purifier_stats-0.1.0.tar.gz | 7.9 kB | With provenance | Details for purifier_stats-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| purifier_stats-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for purifier_stats-0.1.0-py3-none-any.whl |
Total release size: 16.6 kB
Release files / purifier_stats-0.1.0.tar.gz
| Download URL | purifier_stats-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7fcb7e333819b543e48ee6105aa45f21e744d9d6b08e0288ac0cb482a3b6db6
|
|
BLAKE2b-256 checksum How to use checksums |
5c6eb3c7d31e18f27a60eec173533fbc272c789a9b69bba257fa810bbaf63fbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / purifier_stats-0.1.0-py3-none-any.whl
| Download URL | purifier_stats-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2acaaa5b30c8204965779872a16784f9de40d70c6e0593cf1d3b6000c4004406
|
|
BLAKE2b-256 checksum How to use checksums |
77f3e7270b316fa06cfc4fcfef46add58fe47ce9cfc9b2b990d277931c76eb4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for purifier-stats 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for purifier_stats-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA 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.