Giter Site home page Giter Site logo

lwh201314 / midea-ac-py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mac-zhou/midea-ac-py

0.0 1.0 0.0 125 KB

This is a custom component for Home Assistant to integrate the Midea Air Conditioners via the Local area network.

License: MIT License

Shell 2.81% Python 97.19%

midea-ac-py's Introduction

English Version | 中文版

This is a custom component for Home Assistant to integrate the Midea Air Conditioners via the Local area network.

Tested with hass version 0.110.2

Installation

Install from HACS

Type hacs_badge

Search the HACS Store for midea_ac

Install manually

  1. Clone this repo
  2. Place the custom_components/midea_ac folder into your custom_components folder

Configuration

Configuration variables:

key description example
platform (Required) The platform name. midea_ac
host (Required) Midea AC Device's IP Address. 192.168.1.100
id (Required) Midea AC Device's applianceId. 123456789012345
use_fan_only_workaround (Optional) Set this to true if you need to turn off device updates because they turn device on and to fan_only true

How to Get applianceId:

  • you can use command midea-discover to discover midea devices on the host in the same Local area network. Note: This component only supports devices with model 0xac (air conditioner) and words supported in the output.
pip3 install msmart
midea-discover
  • if you use Midea Air app outside China, there is a easy way to get your deviceid.
  1. open Midea Air app, and share the device, you will get a QR Code.
  2. save the QR Code
  3. upload QR Code Sreenshort to https://zxing.org/w/decode.jspx or decode QR code use other tool.
  4. you will get the data like MADEVICESHARE:<base64_string>
  5. decode base64 string online https://www.base64decode.org/ or use other tool
  6. you will get the device id
  • if you use android, you can use adb,filter from log:
adb logcat | grep -i deviceid
  • if you use iPhone,iPhone connects to macOS with a data cable and filters the applianceId from the console log

  • If you do not have the above environment and conditions, you need to capture the air conditioner and save the files, after can be used pcap-decrypt.py to Get. Remember to use the number, not hex string.

Example configuration.yaml:

  • Single device
climate:
  - platform: midea_ac
    host: 192.168.1.100
    id: 123456789012345
  • Multiple device
climate:
  - platform: midea_ac
    host: 192.168.1.100
    id: 123456789012345
  - platform: midea_ac
    host: 192.168.1.200
    id: 543210987654321

Buy me a cup of coffee to help maintain this project further?

Your donation will make me work better for this project.

midea-ac-py's People

Contributors

neoacheron avatar mac-zhou avatar andersonshatch avatar lwh201314 avatar aa755 avatar j0nathan33 avatar jchasey avatar jyz0501 avatar

Watchers

James Cloos 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.