blanco-smart-home-api-client
Async Python client library for the BLANCO Smart Home Cloud API.
- PyPI package name:
blanco-smart-home-api-client - Import name:
blanco_smart_home_api_client - Requires: Python ≥ 3.13, aiohttp ≥ 3.9
- License: MIT
Installation
pip install blanco-smart-home-api-client
Usage
Basic setup
import aiohttp
from blanco_smart_home_api_client import BlancoApiClient
async def main() -> None:
async with aiohttp.ClientSession() as session:
client = BlancoApiClient(
session,
app_version="1.0.0", # your application version
app_build="1", # your application build number
os_version="3.13.0", # host OS / platform version string
)
# Register the app and obtain an app_id.
reg = await client.register_app("en")
print("app_id:", reg["app_id"])
# Authenticate the device.
auth = await client.authenticate(dev_id="<sha256-derived-device-id>")
print("token:", auth["token"])
# Poll device data.
status, system = await client.get_device_system("<dev_id>")
print("system params:", system["params"])
Error handling
All exceptions are subclasses of BlancoApiError:
from blanco_smart_home_api_client import (
BlancoApiClient,
BlancoAuthError,
BlancoConnectionError,
BlancoDeviceTypeError,
BlancoTokenExpiredError,
)
try:
auth = await client.authenticate(dev_id)
except BlancoAuthError:
print("Access not yet granted — open the BLANCO UNIT App")
except BlancoDeviceTypeError:
print("Device type not supported for Smart Home")
except BlancoConnectionError as err:
print("Network error:", err)
Token renewal
A BlancoTokenExpiredError is raised when any device endpoint returns HTTP 401.
Call renew_token() and then retry:
from blanco_smart_home_api_client import BlancoTokenExpiredError
try:
status, result = await client.get_device_status(dev_id)
except BlancoTokenExpiredError:
await client.renew_token(dev_id)
status, result = await client.get_device_status(dev_id)
Package Structure
blanco_smart_home_api_client/
├── __init__.py # Public API — re-exports all key types
├── client.py # BlancoApiClient — all HTTP methods
├── config.py # API stage config, endpoint constants, API keys
├── errors.py # ApiErrorCode enum + exception hierarchy
├── http_status.py # HttpStatus enum
├── log.py # BlancoLogLevel enum, LOG_LEVEL constant, blanco_log()
├── mask.py # mask_headers(), mask_dev_id(), mask_response_body()
├── models.py # BlancoErrorType, BlancoActionType, BlancoWaterType enums
└── results.py # TypedDict result types and response-parsing helpers
Available Endpoints
| Method | HTTP | Endpoint |
|---|---|---|
register_app(locale) |
POST | /apps/registrations |
update_app_locale(locale) |
PUT | /apps/registrations |
deregister_app() |
DELETE | /apps/registrations |
authenticate(dev_id) |
POST | /auth/token |
renew_token(dev_id) |
POST | /auth/token |
get_device_system(dev_id) |
GET | /devices/{dev_id}/system |
get_device_status(dev_id) |
GET | /devices/{dev_id}/status |
get_device_settings(dev_id) |
GET | /devices/{dev_id}/settings |
get_device_errors(dev_id) |
GET | /devices/{dev_id}/errors |
get_device_actions(dev_id, from_ts, count, asc) |
GET | /devices/{dev_id}/actions |
get_device_stats(dev_id, ranges) |
POST | /devices/{dev_id}/stats |
Home Assistant Integration
This library is used as the HTTP communication layer by the BLANCO Home Assistant integration. All network I/O and response parsing is handled here; the integration only orchestrates polling, state management, and HA-specific entity registration.
Authors
| Name | Role |
|---|---|
| Michael Weiss | Conception, implementation, and documentation |
Metadata
Release files for blanco-smart-home-api-client 1.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 |
|---|---|---|---|---|
| blanco_smart_home_api_client-1.1.0.tar.gz | 19.6 kB | With provenance | Details for blanco_smart_home_api_client-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blanco_smart_home_api_client-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for blanco_smart_home_api_client-1.1.0-py3-none-any.whl |
Total release size: 39.5 kB
Release files / blanco_smart_home_api_client-1.1.0.tar.gz
| Download URL | blanco_smart_home_api_client-1.1.0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c92a244118e5bd4c9666c4a8db19dcbb82e2b9a582a812774804ba43574a728
|
|
BLAKE2b-256 checksum How to use checksums |
889d2bbbdbcbfaff593f522beec4b2574afd487bc6f87edd470f42b840865bb3
|
| 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 Aug 27, 2026.
Transparency logRelease files / blanco_smart_home_api_client-1.1.0-py3-none-any.whl
| Download URL | blanco_smart_home_api_client-1.1.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f46b4b01912eb5795a3bec83f1b1250c4fbc0b1d2053d5cf522d1415bdeec199
|
|
BLAKE2b-256 checksum How to use checksums |
bcd0a827dc2cf86a05aeb803bca552a5ff7735542f16ce76c15761b75ba28a77
|
| 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 Aug 27, 2026.
Transparency logSecurity for blanco-smart-home-api-client 1.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 blanco_smart_home_api_client-1.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 Aug 27, 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.