Skip to main content

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 httpx and asyncio for 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

weishaupt_webif_api-0.1.3.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weishaupt_webif_api-0.1.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file weishaupt_webif_api-0.1.3.tar.gz.

File metadata

  • Download URL: weishaupt_webif_api-0.1.3.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for weishaupt_webif_api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5485775619fcf4f4c92c35f556d2647505ed9ab31fb05668ff4728991409e13c
MD5 b69137a0c235ed3d99898343c8043609
BLAKE2b-256 9f1024c702017c3e6316143aaf2c5e084d27a862f24277e62452629fe3780833

See more details on using hashes here.

Provenance

The following attestation bundles were made for weishaupt_webif_api-0.1.3.tar.gz:

Publisher: publish.yml on MadOne/weishaupt_webif_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file weishaupt_webif_api-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for weishaupt_webif_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 543c17b1b790da326ccfaca0cda4fee854fc2d27801c67122f6cb0a4e40d1b93
MD5 b8f5295e276e2ea37e776da9624b35c5
BLAKE2b-256 aee4858a311afa102bda815559bb2a0b555b22e6cbf475a5a1f0c6c383ef24eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for weishaupt_webif_api-0.1.3-py3-none-any.whl:

Publisher: publish.yml on MadOne/weishaupt_webif_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page