homerun-client
Unofficial async Python client for Homerun (霍曼) smart air purifiers, built on
aiohttp. It talks to the same cloud API as the official Homerun app and powers the
Home Assistant integration.
This project is not affiliated with or endorsed by Homerun. The cloud API is undocumented and may change without notice.
Supported devices
- Homerun air purifier S1 (Wi-Fi)
Other Homerun air purifiers that use the same app are likely to work.
Installation
pip install homerun-client
Usage
import asyncio
import aiohttp
from homerun_client import HomerunClient, PurifierMode, new_client_device_id
async def main() -> None:
async with aiohttp.ClientSession() as session:
# Keep the client device id and the token; reuse them next time.
client = HomerunClient(session, new_client_device_id())
await client.login_email_password("user@example.com", "password")
for device in await client.devices():
props = await client.get_properties(device.serial)
print(device.name, props.get("pm25"), props.get("fan_speed"))
await client.set_properties(device.serial, {"switch": True, "mode": PurifierMode.AUTO})
asyncio.run(main())
Login methods
| Account | Password | Verification code |
|---|---|---|
| Phone | login_phone_password(area_code, phone, password) |
send_code("phone", phone, area_code) then login_phone_code(area_code, phone, code) |
login_email_password(email, password) |
send_code("email", email) then login_email_code(email, code) |
send_code raises HomerunCaptchaRequired when the server asks for a slider
captcha; use password login in that case.
Region
The defaults match the Chinese mainland app (country_code="CN", region="Asia",
language="zh_CN"). Pass other values to HomerunClient if your account was
registered elsewhere.
Common properties
| Property | Type | Notes |
|---|---|---|
switch |
bool | Power |
mode |
int | PurifierMode: 0 manual, 1 auto, 2 sleep, 3 pet |
fan_speed |
int | 1–5, effective in manual mode |
pm25 |
int | µg/m³ |
tvoc |
int | µg/m³ |
air_quality |
int | AirQuality: 0 unknown, 1 good, 2 medium, 3 severe |
filter_life |
int | Remaining filter life, % |
filter_reset |
bool | Write true to reset the filter |
child_lock |
bool | |
mute |
bool | |
countdown_set / countdown_left |
int | Timer, minutes |
online_status |
bool | Device is connected to the cloud |
Development
python -m venv .venv
.venv/bin/pip install -e ".[test]" ruff
.venv/bin/ruff check . && .venv/bin/pytest
License
MIT
Metadata
Release files for homerun-client 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 |
|---|---|---|---|---|
| homerun_client-0.1.0.tar.gz | 10.4 kB | With provenance | Details for homerun_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| homerun_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for homerun_client-0.1.0-py3-none-any.whl |
Total release size: 20.5 kB
Release files / homerun_client-0.1.0.tar.gz
| Download URL | homerun_client-0.1.0.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea84dca207c0178222cf9e42966ded9ef4d5e188ab293117a38402adb80ca148
|
|
BLAKE2b-256 checksum How to use checksums |
7350d5a639d1afe143101ee9f41552882a5fc7dc83f25e0ba0e91343c8b4cfb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 18, 2026.
Transparency logRelease files / homerun_client-0.1.0-py3-none-any.whl
| Download URL | homerun_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b5e9aeea20c783d59716304b7bf1a336977d28ecf57cf2342c761a88d5d0590
|
|
BLAKE2b-256 checksum How to use checksums |
00dca626eacc1b147f79c90b1a185d2e6dc8cc3c2a559cf69bee885012c09731
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 18, 2026.
Transparency logSecurity for homerun-client 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 homerun_client-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 18, 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.