A python library to control CoolMasterNet HVAC bridges over asyncio.
Project description
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.7 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()
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for pycoolmasternet_async-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81579e37410672376516c877ad9ce53ea4f8acbb4455e622b15474fde45eacb0 |
|
MD5 | fb66e6389136423015ba88d746434fcc |
|
BLAKE2b-256 | 426811a12eb07f88a09993dd1d52074829500c1860b02f594c93195aaf250fba |
Close
Hashes for pycoolmasternet_async-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eca5f1e163e3c8fd31dc3cf38b8c44cbcabd5b7c3909795833e2d742467e942 |
|
MD5 | 0dd51fb0313adff119a4e6933a183648 |
|
BLAKE2b-256 | 31cc8a7b00d84834bff91d6987f5c2f20f3071b1e5c790eb5335e511f1173983 |