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.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03572545d82d917b6384a79d10c87b82a6ca720c3fe8f489930ff534c5c26098 |
|
MD5 | 621d151998d4a5d8a03e61710d5934ae |
|
BLAKE2b-256 | 32c538267ec08a8ae81a845dc35d81074d83aa46ffef9636fe5c73e9684c6c9c |
Close
Hashes for pycoolmasternet_async-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea56517a455da3548ab00312d5959815fc1f8bdf438406b8fb2a3a5f4b72cb4f |
|
MD5 | 4f03d7b0c13156f4a95d482d72bbf9ca |
|
BLAKE2b-256 | aff652dad61253652c65f6260b36d659105835d3ab1301060167f8e3b408f84e |