Skip to main content

A Python library to interact with the API behind the myVAILLANT app

Project description

myPyllant

PyPI GitHub Workflow Status

A Python library to interact with the API behind the myVAILLANT app, needs at least Python 3.10.

Not affiliated with Vaillant, the developers take no responsibility for anything that happens to your Vaillant devices because of this library.

myPyllant

Install and Test

Warning

You need at least Python 3.10

pip install myPyllant
python3 -m myPyllant.export user password
# See python3 -m myPyllant.export -h for more options

The --data argument exports historical data of the devices in your system. Without this keyword, information about your system will be exported as JSON.

Usage

import argparse
import asyncio
from datetime import datetime, timedelta

from myPyllant.api import MyPyllantAPI


parser = argparse.ArgumentParser(description="Export data from myVaillant API   .")
parser.add_argument("user", help="Username (email address) for the myVaillant app")
parser.add_argument("password", help="Password for the myVaillant app")


async def main(user, password):
    async with MyPyllantAPI(user, password) as api:
        async for system in api.get_systems():
            print(await api.set_holiday(system, datetime.now()))
            print(
                await api.set_holiday(
                    system, datetime.now(), datetime.now() + timedelta(days=1)
                )
            )
            print(await api.cancel_holiday(system))
            print(await api.boost_domestic_hot_water(system.domestic_hot_water[0]))
            print(await api.cancel_hot_water_boost(system.domestic_hot_water[0]))
            print(
                await api.set_domestic_hot_water_temperature(
                    system.domestic_hot_water[0], 46
                )
            )
            print(await api.set_set_back_temperature(system.zones[0], 15.5))
            print(await api.quick_veto_zone_temperature(system.zones[0], 21, 5))
            print(await api.cancel_quick_veto_zone_temperature(system.zones[0]))


if __name__ == "__main__":
    args = parser.parse_args()
    asyncio.run(main(args.user, args.password))

Tested Configurations

Contributing

Warning

You need at least Python 3.10

I'm happy to accept PRs, if you run the pre-commit checks and test your changes:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pre-commit install
pytest

Contributing Test Data

Because the myVAILLANT API isn't documented, you can help the development of this library by contributing test data:

python3 tests/generate_test_data.py username password

Create a fork of this repository and create a PR with the newly created folder in test/json.

Notes

Logo based on Hase Icons erstellt von Freepik - Flaticon & Ouroboros Icons erstellt von Freepik - Flaticon.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mypyllant-0.0.20.tar.gz (63.5 kB view hashes)

Uploaded Source

Built Distribution

mypyllant-0.0.20-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

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