pycoolmasternet-async
A Python 3 library for interacting with a CoolMasterNet HVAC bridge. This is a fork of pycoolmaster, modified to present an async interface and some other small changes.
Installation
You can install pycoolmasternet-async from PyPI:
pip3 install pycoolmasternet-async
Python 3.13 and above are supported.
How to use
from pycoolmasternet_async import CoolMasterNet
cool = CoolMasterNet("coolmaster")
# Supply the IP address and optional port number (default 10102).
cool = CoolMasterNet("192.168.0.123", port=12345, read_timeout=1)
# General information
info = await cool.info()
# Returns a dict of CoolMasterNetUnit objects. Keys are the unit IDs
units = await cool.status()
unit = units["L1.001"]
unit.unit_id
# Temperature unit: Imperial, Celsius
unit.temperature_unit
# Current reading of unit's thermometer
unit.temperature
# Current setting of unit's thermostat
unit.thermostat
# Setters return a new instance with updated info
unit = await unit.set_thermostat(28)
# True if unit is turned on
unit.is_on
unit = await unit.turn_on()
unit = await unit.turn_off()
# Fan speed: low, med, high, auto
unit.fan_speed
unit = await unit.set_fan_speed('med')
# Mode of operation: auto, cool, dry, fan, heat
unit.mode
unit = await unit.set_mode('cool')
# Get fresh info
unit = await unit.refresh()
Errors
Errors raised by this library derive from CoolMasterNetError:
CoolMasterNetConnectionError- the bridge could not be reached, or did not answer as expected. Also aConnectionError, and so anOSError.CoolMasterNetCommandError- the bridge rejected a command. Also aValueError.
They subclass the builtins previously raised, so existing except OSError or
except ValueError handlers keep working. Note that connection failures raised
by asyncio itself (for example TimeoutError, or socket.gaierror for an
unresolvable host) still propagate as plain OSError subclasses.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycoolmasternet_async-0.2.5.tar.gz.
File metadata
- Download URL: pycoolmasternet_async-0.2.5.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4ec728fbbe913b62193cbc57f35d06d5e25a6121ec81312b868c47d595990ad
|
|
| MD5 |
0139b4d2b40bf6913b0c0fe9f7a7c717
|
|
| BLAKE2b-256 |
d4aac0276499d97fde5b2a9433a562dae72db9f19d6f590f6b6a782c6194cd7b
|
Provenance
The following attestation bundles were made for pycoolmasternet_async-0.2.5.tar.gz:
Publisher:
release.yml on OnFreund/pycoolmasternet-async
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycoolmasternet_async-0.2.5.tar.gz -
Subject digest:
c4ec728fbbe913b62193cbc57f35d06d5e25a6121ec81312b868c47d595990ad - Sigstore transparency entry: 2342205483
- Sigstore integration time:
-
Permalink:
OnFreund/pycoolmasternet-async@c108325b7731a630988632720b4c4712f70b4473 -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/OnFreund
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c108325b7731a630988632720b4c4712f70b4473 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycoolmasternet_async-0.2.5-py3-none-any.whl.
File metadata
- Download URL: pycoolmasternet_async-0.2.5-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86b28e9b847116cc54997f49aec689839d666ec845ed30e2e713bbade918e3f2
|
|
| MD5 |
6b0360ca8aec28a88e07dec85cf04e0b
|
|
| BLAKE2b-256 |
7cf53c8885b8f6ae1d0a2974bf8f06f0e75f3eb149ab0da050340fe204e5fe44
|
Provenance
The following attestation bundles were made for pycoolmasternet_async-0.2.5-py3-none-any.whl:
Publisher:
release.yml on OnFreund/pycoolmasternet-async
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycoolmasternet_async-0.2.5-py3-none-any.whl -
Subject digest:
86b28e9b847116cc54997f49aec689839d666ec845ed30e2e713bbade918e3f2 - Sigstore transparency entry: 2342205490
- Sigstore integration time:
-
Permalink:
OnFreund/pycoolmasternet-async@c108325b7731a630988632720b4c4712f70b4473 -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/OnFreund
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c108325b7731a630988632720b4c4712f70b4473 -
Trigger Event:
release
-
Statement type: