Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycoolmasternet-async-0.1.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

pycoolmasternet_async-0.1.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pycoolmasternet-async-0.1.3.tar.gz.

File metadata

  • Download URL: pycoolmasternet-async-0.1.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.10

File hashes

Hashes for pycoolmasternet-async-0.1.3.tar.gz
Algorithm Hash digest
SHA256 60a734da4e0f1c15454a2fe6156f0cc73a40b7f93263d766f41ff5847ce13e34
MD5 c8af0a4c84cfebd56a39e220f2d63990
BLAKE2b-256 ab638b90f5798676ec762fb1c62ff1843e0fa2b44644e63792e625f789df93aa

See more details on using hashes here.

File details

Details for the file pycoolmasternet_async-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pycoolmasternet_async-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.10

File hashes

Hashes for pycoolmasternet_async-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9531e98f9d321276a3fc954cf795d07ca7ed4497924daf340d613140c4018642
MD5 6d9929c53ecac9aae12bf33a5400e43c
BLAKE2b-256 001d5664668fbf558b259e9a448cc736ccb1dfce19e7b6588caad801e5b0b5ee

See more details on using hashes here.

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