Read Xiaomi Smart Air Purifier 4 Lite sensors over Wi-Fi.
pip install purifier-stats Copy PIP instructions
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.
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.
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.
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 Project links Data verified by PyPI on Nov 19, 2026 Data provided by the project maintainers, verified at the time the release was uploaded to PyPI. Source Homepage Key dates PyPI data Data sourced directly from PyPI's database. Released: Nov 19, 2026 Latest release 1 maintainer PyPI data Data sourced directly from PyPI's database. thepushkarp GitHub Statistics Data verified by PyPI on Nov 19, 2026 The GitHub source repository was provided by the project maintainers and verified by PyPI at the time of upload. Stars, forks, and open issues/PRs are derived from that repository and have not been independently verified. Repository Stars: Forks: Open issues: Open PRs: Provenance Data verified by PyPI on Nov 19, 2026 Data provided by the project maintainers and verified by PyPI at the time of upload. Full provenance
Both files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




