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.2.tar.gz (15.3 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.2-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: weishaupt_webif_api-0.1.2.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

Hashes for weishaupt_webif_api-0.1.2.tar.gz
Algorithm Hash digest
SHA256 72af3af0069e0d6b083918b7539bc8c00a26b3a3c9d6220ba8e4c788d14bdbd8
MD5 ba68e50cd1b242979a12bc5008933b6b
BLAKE2b-256 4c1fc31395848fe927c1a279cb834a168930b29611082da4c6a4fece0d6b8e84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for weishaupt_webif_api-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a018e6eb406049fe08fc68553cea6dff5d2f8096235cf11ee760369beb8bc587
MD5 9626ebbdcc70581a930c78fa60eda3d1
BLAKE2b-256 51118c1bccec913de1bde879b0b352ced071b56942734807e40f5e0ad06074df

See more details on using hashes here.

Provenance

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