Skip to main content

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

Project description

myPyllant

myPyllant

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

Install and test

pip install myPyllant
python3 -m myPyllant.export username password (--data)

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

Samples

import argparse
import asyncio
from datetime import datetime, timedelta

from myPyllant.session import login, get_session
from myPyllant.services import get_systems, set_holiday, cancel_holiday, boost_domestic_hot_water, cancel_quick_veto_zone_temperature, cancel_hot_water_boost, set_domestic_hot_water_temperature, set_set_back_temperature, quick_veto_zone_temperature


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):
    try:
        await login(user, password)
        async for system in get_systems():
            print(await set_holiday(system, datetime.now()))
            print(await set_holiday(system, datetime.now(), datetime.now() + timedelta(days=1)))
            print(await cancel_holiday(system))
            print(await boost_domestic_hot_water(system.domestic_hot_water[0]))
            print(await cancel_hot_water_boost(system.domestic_hot_water[0]))
            print(await set_domestic_hot_water_temperature(system.domestic_hot_water[0], 46))
            print(await set_set_back_temperature(system.zones[0], 15.5))
            print(await quick_veto_zone_temperature(system.zones[0], 21, 5))
            print(await cancel_quick_veto_zone_temperature(system.zones[0]))
    finally:
        await get_session().close()


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

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.4.tar.gz (52.9 kB view hashes)

Uploaded Source

Built Distribution

mypyllant-0.0.4-py3-none-any.whl (8.7 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