Discover, connect and control Gree based minisplit systems
Project description
Gree Climate
Discover, connect and control Gree based mini-split systems.
greenclimat is a Python3 based package for controll Gree mini-split ACs and heat pumps. Gree is a common brand for minisplit systems and is licensed and resold under many product names. This module may (or may not) work for any of those system, but has been tested on
- Trane mini-split heat pump (4TXK38)
If you have tested and know of others systems that work, please fork and submit a PR with the make and model
Based on the following work
Getting the package
The easiest way to grab greeclimate is through PyPI
pip3 install greeclimate
Use Gree Climate
Findind and binding to devices
Scan the network for devices, select a device and immediately bind. See the notes below for caveats.
try:
gree = GreeClimate()
if not self._device_key:
devices = await gree.search_devices()
if self._mac:
deviceinfo = next((d for d in devices if d.mac == self._mac), None)
else:
deviceinfo = next((d for d in devices if d.ip == self._ip), None)
else:
deviceinfo = DeviceInfo(self._ip, self._port, self._mac, self._name)
device = Device(deviceinfo)
await device.bind(key=self._device_key)
except Exception:
raise CannotConnect
Caveats
Devices have and use 2 encryption keys. 1 for discovery and setup which is the same on all gree devices, and a second which is negotiated during the binding process.
Binding is incredibly finnicky, if you do not have the device key you must first scan and re-bind. The device will not responding to binding requests immediately proceeding a scan.
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
Hashes for greeclimate-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc8f21f0f91251e47ed688e63c9808c54812a5291747948a27feda1f8a05b464 |
|
MD5 | 540efb70994335f1c52c2fb1af4a6e97 |
|
BLAKE2b-256 | c2ecd6ef94f421cb26b73f78d89d3d834acb238cd466ad01fb48380b30f3c0ac |