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.0.tar.gz (15.0 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.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: weishaupt_webif_api-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 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.0.tar.gz
Algorithm Hash digest
SHA256 66732180d6e6de764c13650298dd52b0cfa6577f02713e70966ca1d2d87feb45
MD5 6e88be44dd2640a808680e6cffed5e5c
BLAKE2b-256 55d199350326754d0c91b4b01d79c5d0d9016ada45002244f9c08bd5a1b9dd5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for weishaupt_webif_api-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for weishaupt_webif_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba36ca95b882eefcfcef1dadfe93f6fdd19bb9188af0b545a1ab6c4da4c26b75
MD5 5132a1ac9570bc1aaded441d070ef950
BLAKE2b-256 350bf512d4e1808901ea47e4a85b463c29ae4b64c25bcaa5f8b5fe777abf5e8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for weishaupt_webif_api-0.1.0-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