Giter VIP home page Giter VIP logo

homeassistant-greeclimatecomponent's Introduction

hacs_badge

HomeAssistant-GreeClimateComponent

Custom Gree climate component written in Python3 for Home Assistant. Controls AC's supporting the Gree protocol.

Tested on:

  • Innova HVAC, Cooper & Hunter HVAC
  • Home-Assistant
    • 0.96.x (for older versions, please see the releases tab)

If you are experiencing issues please be sure to provide details about your device, Home Assistant version and what exactly went wrong.

If your HVAC has already been configured to be controled remotely by an android app, the encryption key might have changed.

Sources used:

HACS

This component is added to HACS default repository list.

Custom Component Installation

!!! PLEASE NOTE !!!: Skip step 1 if you are using HACS.

  1. Copy the custom_components folder to your own hassio /config folder.

  2. In the root of your /config folder, create a file called climate.yaml

    - platform: gree
      name: First AC
      host: <ip of your first AC>
      port: 7000
      mac: '<mac address of your first AC>'
      target_temp_step: 1
      encryption_key: <OPTIONAL: custom encryption key if wifi already configured>
      uid: <some kind of device identifier. NOTE: for some devices this is optional>
      temp_sensor: <entity id of the EXTERNAL temperature sensor. For example: sensor.bedroom_temperature. NOTE: this attaches an external temperature sensor to your AC. Gree unfortunately doesnt support a "current temperature" on its own.>
      lights: <OPTIONAL: input_boolean to switch AC lights mode on/off. For example: input_boolean.first_ac_lights>
      xfan: <OPTIONAL: input_boolean to switch AC xfan mode on/off. For example: input_boolean.first_ac_xfan>
      health: <OPTIONAL: input_boolean used to switch the Health option on/off of your first AC. For example: input_boolean.first_ac_health>
      sleep: <OPTIONAL: input_boolean to switch AC sleep mode on/off. For example: input_boolean.first_ac_sleep>
      powersave: <OPTIONAL: input_boolean to switch AC powersave mode on/off. For example: input_boolean.first_ac_powersave>
      eightdegheat: <OPTIONAL: input_boolean used to switch 8 degree heating on/off on your first AC>
    
    - platform: gree
      name: Second AC
      host: <ip of your second AC>
      port: 7000
      mac: '<mac address of your second AC>'
      target_temp_step: 1
  3. In your configuration.yaml add the following:

    climate: !include climate.yaml
  4. 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
  5. OPTIONAL: Provide encryption key if HVAC's wifi is already configured.

    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>. This solves Issue#1.

  6. OPTIONAL: Provide the uid parameter (can be sniffed) NOTE: This is not needed for all devices

  7. OPTIONAL: Provice input_boolean's to set lights, xfan, sleep and powersave mode on/off.

homeassistant-greeclimatecomponent's People

Contributors

ardeus-ua avatar pltorrent avatar robhofmann avatar wjketting avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.