Skip to main content

Viessmann API Python Client

A Python library for accessing the Viessmann Climate Solutions API. Designed for integration with Home Assistant and other async Python applications.

Why this library

  • Your heating system as Python objects. Installation, gateway, device, feature: typed, immutable classes that mirror the real world.
  • Flat features instead of nested JSON. Every value is one feature with a name and a value, e.g. heating.circuits.0.heating.curve.slope, whatever device you have.
  • One call to change a setting. set_feature(device, name, value) checks the value against the device's rules and fills in the other parameters the API requires.
  • Try everything offline. FixtureViClient runs the same code against real device data, without an account.

The API returns the heating curve as one nested object whose setCurve command needs both slope and shift. With this library:

device = await client.set_feature(device, "heating.circuits.0.heating.curve.slope", 0.7)
# shift is filled in from its current value; 0.7 is checked against min 0.2 / max 3.5

The API structure guide shows the raw API response next to this call.

Under the hood: async (aiohttp), OAuth2 with automatic token renewal, gateway-wide refresh of several devices, any reported command through run_command, and a strictly typed, PEP 561 complete package. Feature values follow a typed JSON value contract (FeatureValue), because the library reads whatever features a device reports instead of hardcoding them.

Installation

Requires Python 3.14+. Install the released package from PyPI:

python3.14 -m venv .venv
source .venv/bin/activate
pip install vi_api_client

To work on the library itself, install it from a clone in editable mode:

git clone https://github.com/ignazhabibi/vi_api_client.git
cd vi_api_client
pip install -e .

Quick Start

Try it without an account

The library ships real device data, so you can run this right away.

Step by step, from installation to feature:

import asyncio

from vi_api_client import FixtureViClient


async def main():
    client = FixtureViClient("Vitocal250A")

    installations = await client.get_installations()
    installation = installations[0]

    gateways = await client.get_gateways(installation.id)
    gateway = gateways[0]

    devices = await client.get_devices(installation.id, gateway.serial)
    device = devices[0]

    device = await client.refresh_device(device)

    for feature in device.features:
        print(feature.name, feature.value)

    device = await client.set_feature(device, "heating.dhw.temperature.main", 50)


asyncio.run(main())

Each step returns plain objects: installations, gateways, devices, and the features of a device, each with a name and a value. refresh_device loads the features, and set_feature changes one value and returns the updated device.

The shortcut you will usually write: get_full_installation_status walks the gateways and devices for you and returns every device of the installation with its features already loaded.

import asyncio

from vi_api_client import FixtureViClient


async def main():
    client = FixtureViClient("Vitocal250A")

    installations = await client.get_installations()
    installation = installations[0]

    devices = await client.get_full_installation_status(installation.id)
    device = devices[0]

    for feature in device.features:
        print(feature.name, feature.value)

    device = await client.set_feature(device, "heating.dhw.temperature.main", 50)


asyncio.run(main())

With your Viessmann account

Log in once with the CLI; it saves your tokens to tokens.json:

vi-client login --client-id <YOUR_CLIENT_ID>

Then use ViClient instead of FixtureViClient. Everything else stays the same:

import asyncio

import aiohttp

from vi_api_client import OAuth, ViClient


async def main():
    async with aiohttp.ClientSession() as session:
        auth = OAuth(
            client_id="YOUR_CLIENT_ID",
            redirect_uri="http://localhost:4200/",
            token_file="tokens.json",
            websession=session,
        )
        client = ViClient(auth)

        installations = await client.get_installations()
        installation = installations[0]

        devices = await client.get_full_installation_status(installation.id)
        device = devices[0]

        for feature in device.features:
            print(feature.name, feature.value)

        device = await client.set_feature(device, "heating.dhw.temperature.main", 50)


asyncio.run(main())

CLI

vi-client list-devices
vi-client list-features --available --values
vi-client list-writable
vi-client --help

Documentation

The detailed documentation is available in the docs/ directory:

  1. Getting Started: Installation and First Steps.
  2. API Structure & Concepts: Understanding the Flat Architecture.
  3. Authentication & Connection: Tokens, Sessions, and Thread-Safety.
  4. Models Reference: Devices, Features, and Constraints.
  5. Client Reference: The ViClient class methods.
  6. CLI Reference: Using the command line interface.
  7. Exceptions Reference: Handling errors.
  8. Architecture Guide (for contributors): System structure, responsibilities, data flows, and diagrams explained for developers and non-specialists. Consumers can skip this page.

Public API

Import consumer-facing symbols from vi_api_client:

from vi_api_client import (
    AbstractAuth,
    DEFAULT_SCOPES,
    Device,
    ENDPOINT_AUTHORIZE,
    ENDPOINT_TOKEN,
    EventHistoryPage,
    EventHistoryWindow,
    Feature,
    FeatureConstraints,
    FeatureDeprecation,
    FeatureValue,
    Gateway,
    GatewayDeviceRefreshResult,
    Installation,
    InstallationEvent,
    JsonValue,
    FixtureViClient,
    OAuth,
    ScheduleConstraints,
    ValidationDetail,
    ViAuthError,
    ViClient,
    ViCommandRejectedError,
    ViConnectionError,
    ViDeviceCommunicationError,
    ViError,
    ViNotFoundError,
    ViRateLimitError,
    ViResponseError,
    ViServerInternalError,
    ViValidationError,
    format_feature,
    redact_device,
    redact_feature,
    redact_sensitive,
    validate_json_value,
)

DEFAULT_SCOPES, ENDPOINT_AUTHORIZE, and ENDPOINT_TOKEN support external OAuth integrations. JsonValue, FeatureValue, ValidationDetail, and validate_json_value form the public recursive JSON value contract that dynamic feature values and API validation details follow. redact_sensitive, redact_feature, and redact_device redact secrets, address data, identifiers, and coordinates in log text, API documents, and model objects. CLI helpers, transport details, persistence, and parsing remain available from their dedicated modules.

Development

See CONTRIBUTING.md for the development setup and the local quality gate.

Metadata

Release files for vi-api-client 7.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vi-api-client 7.2.0
File Size Uploaded Provenance Actions
vi_api_client-7.2.0.tar.gz 172.3 kB With provenance Details for vi_api_client-7.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vi-api-client 7.2.0
File Interpreter ABI Platform Actions
vi_api_client-7.2.0-py3-none-any.whl Python 3 none any Details for vi_api_client-7.2.0-py3-none-any.whl

Total release size: 354.3 kB

Release files / vi_api_client-7.2.0.tar.gz

Download URL vi_api_client-7.2.0.tar.gz
Size 172.3 kB
Tags Source
SHA-256 checksum
How to use checksums
164023b53661ad0fee002f44d4ea452e9b8f821775109ae313e2eb481f4761f5
BLAKE2b-256 checksum
How to use checksums
9a4711ca41d8e999bf4c87464a1f7b0d02843f90bd4b2a6fb1eeb7df53812a58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / vi_api_client-7.2.0-py3-none-any.whl

Download URL vi_api_client-7.2.0-py3-none-any.whl
Size 181.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e70b9cc1599495f28d9f67ff1387c65b6f9971fa8317ad1eaac0671fd28f7cf
BLAKE2b-256 checksum
How to use checksums
fc78d82141f4d09ff2d273a23bf0522a53f35e83c3882240c20912d747ce1d3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for vi-api-client 7.2.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.

Select from 2 files

Attestation for vi_api_client-7.2.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 Nov 15, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page