Skip to main content

Async Python wrapper for the Schluter-DITRA-E-WIFI thermostats API.

Project description

Schluter API Python wrapper

An async Python wrapper for the Schluter-DITRA-E-WIFI Wi-Fi Themostat

User

Create a user for your thermostats at https://ditra-heat-e-wifi.schluter.com/

Install

Install the most recent version of the library from Python Package Index

pip install aioschluter

Basic Example

import asyncio
import logging

from aiohttp import ClientError, ClientSession

from aioschluter import (
    ApiError,
    InvalidUserPasswordError,
    InvalidSessionIdError,
    SchluterApi,
)

## specify the username and password that you have on the Schluter DITRA-HEATER-E-WIFI
## site at https://ditra-heat-e-wifi.schluter.com/
SCHLUTER_USERNAME = "XXXX"
SCHLUTER_PASSWORD = "XXXX"

logging.basicConfig(level=logging.DEBUG)


async def main():
    async with ClientSession() as websession:
        try:
            schluter = SchluterApi(websession)

            sessionid = await schluter.async_get_sessionid(
                SCHLUTER_USERNAME, SCHLUTER_PASSWORD
            )
            thermostats = await schluter.async_get_current_thermostats(sessionid)
        except (
            ApiError,
            ClientError,
            InvalidUserPasswordError,
            InvalidSessionIdError,
        ) as error:
            print(f"Error: {error}")
        else:
            for thermostat in thermostats.values():
                print(thermostat)


loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

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

aioschluter-0.1.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

aioschluter-0.1.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file aioschluter-0.1.3.tar.gz.

File metadata

  • Download URL: aioschluter-0.1.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for aioschluter-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ce78ae698dc15f82f1494c92e9a745609a3e2f02bfecb87799c85aa0d7224fcd
MD5 9909626258aff73f346778b1e7621c92
BLAKE2b-256 d3664da4396dac339b1743adb364e2a3c923dfebbb6b4d38447284101f825aba

See more details on using hashes here.

File details

Details for the file aioschluter-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: aioschluter-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for aioschluter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4df6cb04f37c0726b846be4b8ad963d1279cc5d88321dbc4488db0ee7a90865e
MD5 a92d07d08c291f6a54be2069de6fb60a
BLAKE2b-256 3024a17b05615c81d63255e39743d5907a59b050ee576c58bc0280290b2adc7b

See more details on using hashes here.

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