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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fdea83f6dd2405dc5a7a14cf6fa1527ac3d760f741ca6569a43e49b24f6d8cc |
|
MD5 | 133b5665e21ab4b261b7ff05b74b996c |
|
BLAKE2b-256 | a0a779395b9cc1f64b69de88e49042b778dc77b596f2439c1e9f259daf3fdaf2 |
Close
Hashes for pycoolmasternet_async-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da828dcaf4701239104ecfe4b32211980f5ed56dfd3f68ad75bf2bdd28450125 |
|
MD5 | 304802ce9fb415ea4b36bebe373382ce |
|
BLAKE2b-256 | 2d02cd14d2923f689d6070d80839e10bb0eeff442683e2bf7ac82700fffdfb49 |