meine
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
Custom Gree climate component written in Python3 for Home Assistant. Controls AC's supporting the Gree protocol.
git clone https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent.gitRobHofmann/HomeAssistant-GreeClimateComponentCustom Gree climate component written in Python3 for Home Assistant. Controls ACs supporting the Gree protocol.
For a comprehensive list of tested devices, see Supported Devices.
Tested on Home Assistant 2025.6.3
If you are experiencing issues please be sure to provide details about your device, Home Assistant version and what exactly went wrong.
This integration connects directly to your HVAC devices via their IP address on the local network, unlike the official mobile app, which establish a direct connection only during initial setup and subsequently operate through Gree’s servers. The integration attempts to obtain the encryption key by the initial setup protocol, which has been reverse-engineered.
Official mobile applications:
If your HVAC device was previously set up for remote access using a mobile app, the integration may fail to retrieve the encryption key automatically.
To extract encryption keys from an account on Gree’s cloud server: https://github.com/luc10/gree-api-client
To configure HVAC wifi (without the mobile app): https://github.com/arthurkrupa/gree-hvac-mqtt-bridge#configuring-hvac-wifi
This component is added to HACS default repository list.
The integration can be added from the Home Assistant UI.
name, host, port and MAC address.Standard discovery relies on UDP broadcast, which routers do not forward between VLANs. If your AC is in a different subnet than Home Assistant, pick Discover devices on other VLANs/subnets on the first setup screen and enter one or both of the following:
192.168.30.0/24 or 10.10.20.0/24, 10.10.30.0/24.192.168.30.50, 192.168.30.51.Each address is probed directly with a UDP unicast packet on port 7000, so inter-VLAN routing and any firewall between Home Assistant and the target subnet must allow UDP/7000.
Limits and notes:
/16 like 192.168.0.0/16. Anything larger (e.g. 10.0.0.0/8, 172.16.0.0/12) must be split into multiple CIDRs or covered by the hosts field. Scanning a whole /16 fires tens of thousands of UDP packets and can stress consumer routers — prefer the narrowest CIDR you can identify.(Skip if using HACS) Copy the custom_components folder to your own hassio /config folder.
YAML Configuration: See manual-configuration.yaml for a complete configuration example with all available options and detailed comments.
Basic example:
gree:
- name: "First AC"
host: "192.168.1.101"
mac: "20-FA-BB-12-34-56"
encryption_version: 2
In your configuration.yaml add the following:
climate: !include your_configuration.yaml
(Optional) Add info logging to this component (to see if/how it works)
logger:
default: error
logs:
custom_components.gree: debug
custom_components.gree.climate: debug
(Optional) Provide encryption key if you have it or feel like extracting it.
One way is to pull the sqlite db from android device like described here:
https://stackoverflow.com/questions/9997976/android-pulling-sqlite-database-android-device
adb backup -f ~/backup.ab -noapk com.gree.ewpesmart dd if=data.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf - sqlite3 data.ab 'select privateKey from db_device_20170503;' # but table name can differ a little bit.
Write it down in climate.yaml: encryption_key: <key>.
If you are getting an UTF-8 error (like: "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 1: invalid continuation byte"), see #318.
(Optional) Provide the uid parameter (can be sniffed). This is not needed for all devices.
(Optional) You can set custom icons by modifying the icon translation file icons.json. Refer to this documentation: https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/icon-translations/
The integration supports additional sensors if your Gree device has them:
If your AC unit has an outside temperature sensor, it will be automatically detected and exposed as:
outside_temperature (accessible via {{ state_attr('climate.your_ac', 'outside_temperature') }})sensor.your_ac_outside_temperatureIf your AC unit has a built-in room humidity sensor, it will be automatically detected and exposed as:
room_humidity (accessible via {{ state_attr('climate.your_ac', 'room_humidity') }})sensor.your_ac_room_humidityThe integration exposes various entities to configure additional features of your Gree AC unit. All entities are created by default when the integration is set up, but their availability depends on the current HVAC mode and status. Entity availability may also vary depending on your specific Gree AC model and firmware version. These controls allow you to toggle special modes and adjust settings:
This project is based on the work of several contributors and projects:
Due to the many issues being created revolving "TimeOut"/"Cannot connect" errors, I will be closing these. Feel free to make a PR fixing your TimeOut/Cannot connect error. More information on the "why" can be found here: #405 (comment)
more like this
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
Create and add progress bars, Office365 Files and Dropbox Paper papers by labels and link them to your Todoist tasks.
search projects, people, and tags