GithubHelp home page GithubHelp logo

Comments (22)

KangKai1982 avatar KangKai1982 commented on August 27, 2024

I have same issue with Gree 10727.

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

it appears that this worked fine for HA ver: 0.88.1 (or under), has some little bugs though.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

I would like to improve the Gree 10727 support. Do you still use the setup and are you able to provide some details? @KangKai1982 @leungyuan

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

This is the debug log of my following actions:
home-assistant.log

  1. turn on, mode = cool;
  2. mode = cool, temp = 27;
  3. mode = cool, temp = 26;
  4. mode = heat;
  5. mode = heat, temp = 25;
  6. mode = heat, temp = 24;
  7. turn off.

Thank you @syssi .
And yes, I am still useing your code since I have got no other choice (at least I could still put it to work on ey mode). I would love to provide details but could you give me a hint on what kind of details you might need?

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

Could you do the same via the Mi Home app? I want to compare the air_condition_configuration=01011101 of both logs. After each command you've to wait 45 seconds so HA has the chance to retrieve the new configuration value stored at the AC partner. There must be a difference between the HA generated configuration and the one of the Mi Home app.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

I've reduced your log to the most relevant informations and I've marked the configuration requests send to the AC partner and the responses of the AC partner containing the current configuration:

Lines starting with >> are requests.
Lines starting with << are responses.

[...]

>> {'id': 6, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '010101110100010727', '1'], 'id': 6}
                                        --------
power=off,
air_condition_configuration=01011101,
led=True,
target_temperature=17,
swing_mode=SwingMode.Off,
fan_speed=FanSpeed.Low,
mode=OperationMode.Cool

>> {'id': 7, 'method': 'send_cmd', 'params': ['01000107271101111100190120500210200070190120700200000041']}
                                                         --------
<< {'result': ['ok'], 'id': 7}
 ['ok']
>> {'id': 8, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '011120140100010727', '1'], 'id': 8}
                                        --------
power=on,
air_condition_configuration=11201401,
led=True,
target_temperature=20,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Cool

>> {'id': 9, 'method': 'send_cmd', 'params': ['010001072711201B1100190B20500210200010190B207002000000E1']}
                                                         --------
<< {'result': ['ok'], 'id': 9}
 ['ok']
>> {'id': 10, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0111201B0100010727', '8'], 'id': 10}
                                        --------
power=on,
air_condition_configuration=11201B01,
led=True,
target_temperature=27,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Cool

>> {'id': 11, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0111201B0100010727', '8'], 'id': 11}
                                        --------
power=on,
air_condition_configuration=11201B01,
led=True,
target_temperature=27,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Cool

>> {'id': 12, 'method': 'send_cmd', 'params': ['010001072711201A1100190A20500210200000190A207002000000D1']}
                                                          --------
<< {'result': ['ok'], 'id': 12}
 ['ok']
>> {'id': 13, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0111201A0100010727', '13'], 'id': 13}
                                        --------
power=on,
air_condition_configuration=11201A01,
led=True,
target_temperature=26,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Cool

>> {'id': 14, 'method': 'send_cmd', 'params': ['010001072710201A1100190A20500210200000190A207002000000D1']}
                                                          --------
<< {'result': ['ok'], 'id': 14}
 ['ok']
>> {'id': 15, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0110201A0100010727', '14'], 'id': 15}
                                        --------
power=on,
air_condition_configuration=10201A01,
led=True,
target_temperature=26,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

>> {'id': 16, 'method': 'send_cmd', 'params': ['010001072710201911001909205002102000F01909207002000000C1']}
                                                          --------
<< {'result': ['ok'], 'id': 16}
 ['ok']
>> {'id': 17, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '011020190100010727', '15'], 'id': 17}
                                        --------
power=on,
air_condition_configuration=10201901,
led=True,
target_temperature=25,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

>> {'id': 18, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '011020190100010727', '15'], 'id': 18}
                                        --------
power=on,
air_condition_configuration=10201901,
led=True,
target_temperature=25,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

>> {'id': 19, 'method': 'send_cmd', 'params': ['010001072710201811001908205002102000E01908207002000000B1']}
                                                          --------
<< {'result': ['ok'], 'id': 19}
 ['ok']
>> {'id': 20, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '011020180100010727', '14'], 'id': 20}
                                        --------
power=on,
air_condition_configuration=10201801,
led=True,
target_temperature=24,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

>> {'id': 21, 'method': 'send_cmd', 'params': ['010001072701011101004000205002112000D04000207002000000A0']}
                                                          --------
<< {'result': ['ok'], 'id': 21}
 ['ok']
>> {'id': 22, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '010101110100010727', '14'], 'id': 22}
                                        --------
power=off,
air_condition_configuration=01011101,
led=True,
target_temperature=17,
swing_mode=SwingMode.Off,
fan_speed=FanSpeed.Low,
mode=OperationMode.Cool

[...]

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

@syssi , here is the log file:
home-assistan.log
I have done the same via Mi Home app:

  1. turn on, cool, 27
  2. cool, 26
  3. heat, 26
  4. heat, 25
  5. heat, 24
  6. turn off

with swing mode always on and fan mode always high.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

@leungyuan Call me a noob but I've trouble to edit/recode your latest log file. Could you provide an utf-8 encoded file again? ;-) Thanks in advance.

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

Sorry @syssi , My bad.
Here you go:
home-assistant.log

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

I've reduced the log of the MiHome test:

# Step 1 (on, cool, 27)

>> {'id': 3337, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0111201B0100010727', '15'], 'id': 3337}

power=on,
air_condition_configuration=11201B01,
led=True,
target_temperature=27,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Cool

# Step 2 (cool, 26)
>> {'id': 3338, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0111201A0100010727', '14'], 'id': 3338}

power=on,
air_condition_configuration=11201A01,
led=True,
target_temperature=26,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Cool

# Step 3 (heat, 26)
>> {'id': 3342, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '0110201A0100010727', '8'], 'id': 3342}

power=on,
air_condition_configuration=10201A01,
led=True,
target_temperature=26,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

# Step 4 (heat, 25)
>> {'id': 3344, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '011020190100010727', '8'], 'id': 3344}

power=on,
air_condition_configuration=10201901,
led=True,
target_temperature=25,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

# Step 5 (heat, 24)
>> {'id': 3347, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '011020180100010727', '8'], 'id': 3347}

power=on
air_condition_configuration=10201801
led=True
target_temperature=24,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

# Step 6 (OFF, heat, 24)
>> {'id': 3350, 'method': 'get_model_and_state', 'params': []}
<< {'result': ['010500970001072701', '010020180100010727', '7'], 'id': 3350}

power=off,
air_condition_configuration=00201801,
led=True,
target_temperature=24,
swing_mode=SwingMode.On,
fan_speed=FanSpeed.High,
mode=OperationMode.Heat

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024
Configuration python-miio MiHome
on, cool, 27 11201B01 11201B01
on, cool, 26 11201A01 11201A01
on, heat, 26 n/a 10201A01
on, heat, 25 10201901 10201901
on, heat, 24 10201801 10201801
off, heat, 24 n/a 00201801

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

Thank you for the hard work @syssi . As I am not a programer, I can see nothing from the results. Plz let me know if you need some other tests.
Do you want to compare the IR codes sent by HA with that by the MiHome app? I think I can arrange it (with my broadlink rm mini3 as a receiver).

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

Our testing was useless. This part of the implementation looks fine. Are you able to capture the network traffic between the MiHome App and the AC Partner? I would like to capture the send_cmd commands of the MiHome App for another comparison.

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

↓ cool, 27.
cool-27
01005e0000327c49eb86427208004500009c16890000ff11025bc0a80192e000003210e126aa0088b8467b22636d64223a227265706f7274222c226d6f64656c223a226163706172746e65722e7633222c22736964223a22376334396562383634323732222c22706172616d73223a5b7b2261635f7374617465223a3238373331363733377d2c7b2261635f706f776572223a357d2c7b22696c6c756d696e6174696f6e223a307d5d7d

↓ cool, 26.
cool-26
01005e0000327c49eb86427208004500009d175a0000ff110189c0a80192e000003210e126aa0089bf117b22636d64223a227265706f7274222c226d6f64656c223a226163706172746e65722e7633222c22736964223a22376334396562383634323732222c22706172616d73223a5b7b2261635f7374617465223a3238383336353035377d2c7b2261635f706f776572223a31307d2c7b22696c6c756d696e6174696f6e223a307d5d7d

↓ heat, 26.
heat-26
01005e0000327c49eb86427208004500009817de0000ff11010ac0a80192e000003210e126aa0084e0da7b22636d64223a22686561727462656174222c226d6f64656c223a226163706172746e65722e7633222c22736964223a22376334396562383634323732222c22746f6b656e223a2278383439504838546f45423653376a4c222c22706172616d73223a5b7b226970223a223139322e3136382e312e313436227d5d7d

↓ heat, 25.
heat-25
01005e0000327c49eb86427208004500009c183a0000ff1100aac0a80192e000003210e126aa0088bb3c7b22636d64223a227265706f7274222c226d6f64656c223a226163706172746e65722e7633222c22736964223a22376334396562383634323732222c22706172616d73223a5b7b2261635f7374617465223a3237313538373538357d2c7b2261635f706f776572223a387d2c7b22696c6c756d696e6174696f6e223a307d5d7d

↓ heat, 24.
heat-24
01005e0000327c49eb86427208004500009d18b00000ff110033c0a80192e000003210e126aa0089bd117b22636d64223a227265706f7274222c226d6f64656c223a226163706172746e65722e7633222c22736964223a22376334396562383634323732222c22706172616d73223a5b7b2261635f7374617465223a3237313538373332397d2c7b2261635f706f776572223a31327d2c7b22696c6c756d696e6174696f6e223a307d5d7d

↓ turn off.
off
01005e0000327c49eb86427208004500009b191b0000ff11ffc9c0a80192e000003210e126aa0087f0517b22636d64223a227265706f7274222c226d6f64656c223a226163706172746e65722e7633222c22736964223a22376334396562383634323732222c22706172616d73223a5b7b2261635f7374617465223a333135313837337d2c7b2261635f706f776572223a31337d2c7b22696c6c756d696e6174696f6e223a307d5d7d

I am not sure if I have done it right. This is the first time I use WireShark. ╮(╯-╰)╭
Let me know if you need more tests. :) @syssi

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

Good job! I need your TOKEN to decrypt the traffic.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 27, 2024

Oh, you've captured multicast traffic of the acpartner.v3. I need a capture of the UDP messages between your smartphone (MiHome app) and the acpartner.v3. If you are root on your phone you could capture the traffic there. If not, you need a man-in-the-middle (your accesspoint?) to capture the relevant traffic.

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

My IP addresses are listed as follow:

  • My PC: 192.168.1.147
  • My acpartner.v3: 192.168.1.146
  • My phone: 192.168.1.111

My phone and my acpartner.v3 connected to the same hotspot (SSID). My PC connected to the same gateway (router) via its LAN port (wired).
Here is the device info of my acpartner.v3:

Version no:257
网关ID:94096543
Zigbee通道:11
网关信息:
{"life":196919,"cfg_time":0,"token":"8f6640bc7026ed4d0489c19b3d6d6043","mac":"7C:49:EB:86:42:72","fw_ver":"1.4.1_159","hw_ver":"MW300","model":"lumi.acpartner.v3","mcu_fw_ver":"0149","wifi_fw_ver":"SD878x-14.76.36.p84-702.1.0-WM","ap":{"rssi":-63,"ssid":"ChinaNet-7UdF","bssid":"00:23:C9:5B:C9:D4"},"netif":{"localIp":"192.168.1.146","mask":"255.255.255.0","gw":"192.168.1.1","gw_mac":"00:23:C9:5B:C9:D0"},"mmfree":152696,"ot":"otu","otu_stat":[46,75,11817,5,11734,11],"ott_stat":[0,0,0,0]}

Then I ran WireShark on my PC, Mi Home app on my phone, trying of capture any traffic sent from 192.168.1.111 to 192.168.1.146, but got this:
(Sorted by source)
1
This shows only 1 package was captured sent from my phone (192.168.1.111), and its destination was my PC (192.168.1.147). Emmm...
The raw data:

00e04c18ce9864a2f922e26708004500027976c3400040063d69c0a8016fc0a8019322b92d0b82b1fa9f1a9e193a5018588ee4720000817e024d7b2266726f6d223a2270686f6e65222c22766572223a223330323631222c226465766963656964223a226165376666616561366235353738613861386532366464313034633735653338222c227074797065223a226465766963655f6576656e74222c22626964223a2231353539383333303130313234222c226574797065223a2233222c22706b6579223a22222c22626f6479223a22443834303635464245423831303333394142433133443744383739463446383444434232313246344238323234354342424439373146443032443432343445323338414342413337314334394646393536303333434231434441353334444337303438413239393239453935453130313832394438314541433344423631324634323237413630353944413634313436443732333945333844363738334238384342434536304642443930373633453338443744303743433538424337424536323942343437363432413341314441413831323131344431463745363334433335303243413044334643313734434242354639423138323641414337463145353730363039343331363245383038333746454344374631373232344332384141333038453438303146334332353235464536454441323434443033373139363733423943334337444645343741373644443141384437304130304536464436324337344334353436393235463134393436323043413043343038343738463643464130373732313244443937363139413732423242463944433935463243383546384146313942313135323644424131227d285d5b29

I am not root on my phone, and I do not know if this ↑ is useful. I am still trying to find out how to capture the traffic from my phone to the acpartner.v3. If this works, that will be unnecessary. ( ̄▽ ̄)"

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

↑ Only one action was taken on Mi Home app:
on, 27, cool, fan_high, swing_on.

from xiaomi_airconditioningcompanion.

iwzoo avatar iwzoo commented on August 27, 2024

I create a modified version at https://github.com/iwzoo/xiaomi_gree_aircondition, which was initially posted on hassbian.com earlier this year for GREE air conditions (with control model YAP0FB2). It works with latest HA 0.101.3.

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

I create a modified version at https://github.com/iwzoo/xiaomi_gree_aircondition, which was initially posted on hassbian.com earlier this year for GREE air conditions (with control model YAP0FB2). It works with latest HA 0.101.3.

Thank you iwzzo.
Stared for further tests. Hope it works for my YAP0FB3 (NOT YAP0FB2).

from xiaomi_airconditioningcompanion.

leungyuan avatar leungyuan commented on August 27, 2024

I create a modified version at https://github.com/iwzoo/xiaomi_gree_aircondition, which was initially posted on hassbian.com earlier this year for GREE air conditions (with control model YAP0FB2). It works with latest HA 0.101.3.

Hi, @iwzoo .
I have tested your version and it worked well, except for the non-response of the dehumidification mode. I opened an issue.
I have noticed your project was introduced on hassbian.com, because I am a member of hassbian.com, too.

from xiaomi_airconditioningcompanion.

 avatar commented on August 27, 2024

I create a modified version at https://github.com/iwzoo/xiaomi_gree_aircondition, which was initially posted on hassbian.com earlier this year for GREE air conditions (with control model YAP0FB2). It works with latest HA 0.101.3.

OMG Your version works perfectly!!! Thank you for your work! And also thank @syssi for the navigation!!!

from xiaomi_airconditioningcompanion.

Related Issues (20)

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.