Skip to main content

An async client for connecting to Honeywell's TCC RESTful API.

Project description

evohome-async

Python client to asynchronously access the Total Connect Comfort RESTful API.

It is intended to be a faithful port of https://github.com/watchforstock/evohome-client, but async-aware. That is, it exposes a superset of the evohome-client schema (same namespace, same JSON), but with some notable differences between the two (see below).

It provides support for Honeywell/Resideo TCC-based systems, such as Evohome, Round Thermostat, VisonPro and others:

This client requires the aiohttp library. If you prefer a non-async client, evohome-client uses requests instead.

Please contact me (e.g. open an issue) if you would like to help extending the functionality of evohome-async to include cooling, as support for such is minimal currently.

CLI for schedules

If you download the git repo you can use a basic CLI for backup/restore of schedules (incl. DHW, if any), for example:

python client.py -u username@gmail.com -p password get-schedules --loc-idx 2 > schedules.json

... and to restore:

python client.py -u username@gmail.com -p password set-schedules --loc-idx 2 -f schedules.json

To avoid exceeding the vendor's API rate limit, you can cache the access tokens via the --cache-tokens switch.

Beware that the above switch will save your tokens to .evo-cache.tmp: this presents a security concern.

Differences from non-async version

The difference between the evohomeasync and evohomeclient libraries have been kept to the minimum, and it is planned for exisiting docs to be useful. Thus, it should be relatively easy to port your code over to this async library should you wish.

The non-async documentation (from evohomeclient) is available at http://evohome-client.readthedocs.org/en/latest/

Technical differences

Some additional functionality has been added to the methods that wrap the vendor APIs (e.g. restore schedules by name, as an alternative to by id). Note that this library is not able to expose more core functionality than it's non-async cousin (i.e. they both use the same vendor API).

Note that since 0.4.0, some attributes have been renamed, and a few have been deprecated altogether (when required, an informative exception will be thrown).

In both cases (evohomeclient2 and evohomeclient):

  • requires aiohttp instead of requests:
  • added a new instantiation argument, session to allow the client to utilize the consumer's aiohttp session
   self._session = kwargs.get('session', aiohttp.ClientSession(
       timeout=aiohttp.ClientTimeout(total=30)
   ))

For the newer evohome API (evohomeclient2):

  • import evohomeasync2 instead of import evohomeclient2
  • must invoke await client.login() after instntiating EvohomeClient
  • gerneric Exceptions have changed... requests.ConnectionError becomes: aiohttp.ClientConnectionError requests.HTTPError becomes aiohttp.ClientResponseError
  • but in most case, exceptions are no longer generic (since 0.4.0)... RateLimitExceeded, and AuthenticationFailed (among others)

For the older evohome API (evohomeclient):

  • import evohomeasync instead of import evohomeclient
  • Exceptions change similar to the above

Other minor changes:

  • some attrs/methods have been renamed (invoking the old name will advise the new name)
  • Hotwater.zoneId is deprecated (can use .dhwId, or _id)
  • ZoneBase.zone_type is deprecated (use .TYPE))
  • some sentinel values are now None

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

evohome_async-0.4.12.tar.gz (70.9 kB view details)

Uploaded Source

Built Distribution

evohome_async-0.4.12-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file evohome_async-0.4.12.tar.gz.

File metadata

  • Download URL: evohome_async-0.4.12.tar.gz
  • Upload date:
  • Size: 70.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for evohome_async-0.4.12.tar.gz
Algorithm Hash digest
SHA256 eaadfbbc791fa56bef56c0541fb17f17abe7a6fe0ac39a6a60d6f6861a192c15
MD5 bf5ff8de5c5606f0eefd5eb9ad0cdf88
BLAKE2b-256 c44ac25e9517f3594506fa66110c41679ecbe56ba05e49fda4ee9f6b645f1490

See more details on using hashes here.

Provenance

File details

Details for the file evohome_async-0.4.12-py3-none-any.whl.

File metadata

File hashes

Hashes for evohome_async-0.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8710185119d910135ad4efbafa6f997f7fc6d4f6b889962e7cc8b3de2691ef
MD5 d503b7196fe037b715497a2a553465b9
BLAKE2b-256 2272c0de02e312fb71f6a85bfea0849c6e67ee9d70a7adfd40fea877b77f30ca

See more details on using hashes here.

Provenance

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