Skip to main content

Lightweight Python API for CoolMasterNet HVAC bridges

Project description

A Python 3 library for interacting with a CoolMasterNet HVAC bridge.

Installation

pip install pycoolmasternet

Or you can get the code from https://github.com/koreth/pycoolmasternet

Usage

from pycoolmasternet import CoolMasterNet

# Supply the IP address and optional port number (default 10102).
#
# By default, properties will be refreshed by querying the device
# if last refresh was more than 1 second ago; pass auto_update=False
# to disable that behavior (in which case you will need to call
# update_status() explicitly).
cool = CoolMasterNet('192.168.0.123', port=12345, auto_update=False)

# Returns a list of CoolMasterDevice objects
devices = cool.devices()

# Device's unit ID on the CoolMasterNet bridge, e.g., "L7.001"
device.uid

# Temperature unit: imperial, celsius
device.unit

# Current reading of device's thermometer
device.temperature

# Current setting of device's thermostat
device.thermostat
device.set_thermostat(28)

# True if device is turned on
device.is_on
device.turn_on()
device.turn_off()

# Fan speed: low, med, high
device.fan_speed
device.set_fan_speed('med')

# Mode of operation: auto, cool, dry, fan, heat
device.mode
device.set_mode('cool')

# Swing mode: horizontal, vertical, auto, 30, 45, 60, stop
# Numeric settings are degrees of louver tilt. On read, the property can
# be None if the bridge reports that the device doesn't support swing.
device.swing
device.set_swing('30')

# Dict with all the properties listed above
device.status

# Force refresh of status (by default, device auto-updates its status
# if most recent update is more than 1 second ago)
device.update_status()

License

This code is released under the MIT license.

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-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file pycoolmasternet-0.2.0.tar.gz.

File metadata

  • Download URL: pycoolmasternet-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for pycoolmasternet-0.2.0.tar.gz
Algorithm Hash digest
SHA256 44c556b7ccb207e98a75d953925a7f08c395d9bd1deeb5dc6ca9ec8782ea9ff1
MD5 b4a0e7dedb15f16688df13aeb980e690
BLAKE2b-256 310648322d5f9ee5a56c9d959808ba7f7a1adb8ec845a3949ee92eff1e6985ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page