Async Python library for the Weishaupt WebIF heat pump interface.
Project description
Weishaupt WebIF API
A Python library for interacting asynchronously with the Weishaupt heating system web interface (WebIF). This library allows you to programmatically retrieve telemetry data and system statistics.
Features
- Asynchronous Design: Built on
httpxandasynciofor non-blocking I/O. - Selective Updates: Fetch only the categories you need (e.g., "Statistik", "Heizkreis") to minimize load on the device's MCU.
- Persistence: Automatically manages session cookies and internal state (cooldowns, request timing) across restarts using local storage.
- Smart Batching: Includes logic to batch requests safely, preventing resource exhaustion on the hardware interface.
- Robust Error Handling: Detects session expiration, login redirections, and MCU resource errors.
- Mock Mode: Access real-world sample data without polling the device—perfect for developing Home Assistant integrations.
- CLI Monitor: A built-in command-line tool to monitor your heat pump telemetry in real-time.
Installation
Currently, this library can be installed locally:
pip install .
Quick Start
import asyncio
from weishaupt_webif_api import WebifConnection
async def main():
# Initialize the connection
async with WebifConnection(
ip="10.10.1.225",
username="user",
password="pass",
storage_path="./data"
) as api:
# Fetch specific categories
data = await api.update_all(["Statistik", "Heizkreis"])
# Fetch mockup data for developement puposes. This is no real data and wont change!
mcok_data = await api.update_all_mock(["Statistik", "Heizkreis"])
for category, values in data.items():
print(f"--- {category} ---")
for key, value in values.items():
print(f"{key}: {value}")
if __name__ == "__main__":
asyncio.run(main())
Configuration & State
The library creates several files in the storage_path to maintain state:
lwp_cookies.txt: Stores session cookies to avoid redundant logins.lwp_state.json: Stores internal metadata, such as request cooldown timers.weishaupt_webif_api.log: Contains diagnostic logs for troubleshooting.
These files are excluded from version control by default via .gitignore.
Development
Running Tests
The project uses pytest with pytest-asyncio and respx for mocking API responses.
pytest
Tests utilize HTML fixtures located in tests/fixtures/ to simulate real device responses without requiring access to physical hardware.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This project is not affiliated with or endorsed by Weishaupt. Use it at your own risk. Frequent polling can put significant stress on the device's web interface.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weishaupt_webif_api-0.1.1.tar.gz.
File metadata
- Download URL: weishaupt_webif_api-0.1.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cc947e802863338ee9ad9697c40626df7e4e5c53882100ce27da3441bc2ddfd
|
|
| MD5 |
f9fd83eda15b8f9b0e14d1e3994b5b7d
|
|
| BLAKE2b-256 |
0b9213f75765a9d9d0c22027bea1ae6ef563b35f29690c8874fe7e009d335c6c
|
Provenance
The following attestation bundles were made for weishaupt_webif_api-0.1.1.tar.gz:
Publisher:
publish.yml on MadOne/weishaupt_webif_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weishaupt_webif_api-0.1.1.tar.gz -
Subject digest:
7cc947e802863338ee9ad9697c40626df7e4e5c53882100ce27da3441bc2ddfd - Sigstore transparency entry: 1763726099
- Sigstore integration time:
-
Permalink:
MadOne/weishaupt_webif_api@95cfe3960efb07b5e6ccfe19c3ee6bee2c54cd06 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/MadOne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95cfe3960efb07b5e6ccfe19c3ee6bee2c54cd06 -
Trigger Event:
release
-
Statement type:
File details
Details for the file weishaupt_webif_api-0.1.1-py3-none-any.whl.
File metadata
- Download URL: weishaupt_webif_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
091de3a35364a113b5856d7d1f54cdd3d3ce9935e6e281cdddf63ed473355fa5
|
|
| MD5 |
21f0896958647bcd48b547389182e620
|
|
| BLAKE2b-256 |
bad65d77c9bc99794ef373f9c68c9d65685dc9dfe182d618a55a24bd5bba5fc8
|
Provenance
The following attestation bundles were made for weishaupt_webif_api-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on MadOne/weishaupt_webif_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weishaupt_webif_api-0.1.1-py3-none-any.whl -
Subject digest:
091de3a35364a113b5856d7d1f54cdd3d3ce9935e6e281cdddf63ed473355fa5 - Sigstore transparency entry: 1763726506
- Sigstore integration time:
-
Permalink:
MadOne/weishaupt_webif_api@95cfe3960efb07b5e6ccfe19c3ee6bee2c54cd06 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/MadOne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95cfe3960efb07b5e6ccfe19c3ee6bee2c54cd06 -
Trigger Event:
release
-
Statement type: