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.8.tar.gz
(5.5 kB
view details)
Built Distribution
File details
Details for the file aioschluter-0.1.8.tar.gz
.
File metadata
- Download URL: aioschluter-0.1.8.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 784d4de3c67606ea986e3c9b3267782679db1510dbd0f443fd69d84cc07bcb8c |
|
MD5 | 2d6f0c042fe58ec3f6d83f0d41d8328a |
|
BLAKE2b-256 | 5d1f10b831cf7a05589971812f7528d6bc0154eb5bf24043d97d3cfbd7323e1e |
File details
Details for the file aioschluter-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: aioschluter-0.1.8-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 090384ff19fe63e364afcffacd58fdd3934965f63e958ed1e7ae1d73b03117b8 |
|
MD5 | ba2884bcf347a9d77efce1f5df1c0663 |
|
BLAKE2b-256 | 1323083adf68f935d256d5864474f2341167cd43be41f18de002bf9018b60f44 |