barban-dev / midea_inventor_dehumidifier

Client-side Python library for EVA II PRO WiFi Smart Dehumidifier appliance by Midea/Inventor.
GNU General Public License v3.0
41 stars 13 forks source link

Two dehumidifiers return same values #16

Open msedv opened 1 year ago

msedv commented 1 year ago

First: great library, made the integration in our Grafana-environment really simple!

One bug: I have two dehumidifiers. No matter if using the provided dehumi_control.py or my own Python script I alway get the same values if doing set device ID followed by Get device status for the two IDs:

1: List configured appliances [id=145135534995767 type=0xAC name=Entfeuchter_C370] [id=145135534996317 type=0xA1 name=Entfeuchter_1CFC] 2: Set deviceID [deviceId=145135534996317] 3: Get device status [DeHumidification [powerMode=1, mode=1, Filter=False, Water tank=False, Current humidity=51, Current humidity (decimal)=0, Wind speed=60, Set humidity=40, Set humidity (decimal)=0, ionSetSwitch=0, isDisplay=True, dryClothesSetSwitch=0, Up&Down Swing=0]] 3: Get device status [DeHumidification [powerMode=1, mode=1, Filter=False, Water tank=False, Current humidity=51, Current humidity (decimal)=0, Wind speed=60, Set humidity=40, Set humidity (decimal)=0, ionSetSwitch=0, isDisplay=True, dryClothesSetSwitch=0, Up&Down Swing=0]]

In the moment I solved the issue by simply doing a re-login before each API-call:

"145135534995767": {"powerMode": 1, "setMode": 1, "filterShow": false, "tankShow": false, "humidityCurr": 47, "windSpeed": 60, "humiditySet": 35, "ionSet": 0, "isDisplay": true, "dryClothesSet": 0, "upAndDownSwing": 0}, "145135534996317": {"powerMode": 1, "setMode": 1, "filterShow": false, "tankShow": false, "humidityCurr": 51, "windSpeed": 60, "humiditySet": 40, "ionSet": 0, "isDisplay": true, "dryClothesSet": 0, "upAndDownSwing": 0}

Works but is of course only a workaround that doubles the traffic.