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/

Basic Example

import asyncio
import logging

from aiohttp import ClientError, ClientSession

from aioschluter import ApiError, InvalidUserPasswordError, 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(
                SCHLUTER_USERNAME,
                SCHLUTER_PASSWORD,
                websession
            )
            # Login to the Schluter API to get a session id
            sessionid = await schluter.async_login()
            # Retreive your currently configured thermostats
            thermostats = await schluter.async_get_current_thermostats(sessionid)
        except (
            ApiError,
            ClientError,
            InvalidUserPasswordError,
        ) 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.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

aioschluter-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioschluter-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 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.1.tar.gz
Algorithm Hash digest
SHA256 0149ddf0621dcdb11c799a570a1cf721c193b632eec10f886d521b7157f5a08a
MD5 359b5c0b8b3c768b65dd925ed81019f7
BLAKE2b-256 f6852681d7f1dc2271d96aec6b6e455429524daa1f47a86646c83bcda54e8705

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aioschluter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1249bdf9e7ab4a7cd7290ba35d70a81d8db1c29bbe19ae2a6e1de69f60f88f1b
MD5 705bb09571093900303cdb6f51e18478
BLAKE2b-256 7fc644f960b5018570402cf31fbd2d6561eefdcb4296107b65f91e3ff7f647a3

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