barban-dev / homeassistant-midea-dehumidifier

Home Assistant Custom Integration for EVA II PRO WiFi Smart Dehumidifier appliance by Midea/Inventor.
GNU General Public License v3.0
83 stars 28 forks source link

EVA Pro II Wifi ION deshumidifier detected as 0xAC device #46

Open sicknesz opened 2 years ago

sicknesz commented 2 years ago

2021-12-16 23:06:18 INFO (MainThread) [custom_components.midea_dehumidifier] midea_dehumidifier: initializing platform... 2021-12-16 23:06:18 DEBUG (MainThread) [custom_components.midea_dehumidifier] midea_dehumidifier: starting async_setup 2021-12-16 23:06:19 INFO (MainThread) [custom_components.midea_dehumidifier] midea_dehumi: logging into Midea API Web Service... 2021-12-16 23:06:19 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumi: login success, sessionId=9f4f5d6dbbf34e019fef953c93303ca620211216220619316 2021-12-16 23:06:20 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumi: [id=3188583xxxxxx type=0xAC name=Salon] is online, is active.

but from what i've read source code included it should be supported (the ion version) and not report as a AirConditionner device oO

I'll look more deeply into it tomorrow, maybe i'll be able to figure it out then i'll submit a pull request cause more and more people are gonna end up with the same version as me i think.

sicknesz commented 2 years ago

Sorry i though that setting the deviceId to 0xAC would work and that it was intended to be configurable but i guess not, to add some information : If i change the 0xA1 in the code with the 0xAC the device is detected properly :

2021-12-16 23:48:39 INFO (MainThread) [custom_components.midea_dehumidifier] midea_dehumidifier: initializing platform...
2021-12-16 23:48:39 DEBUG (MainThread) [custom_components.midea_dehumidifier] midea_dehumidifier: starting async_setup
2021-12-16 23:48:39 INFO (MainThread) [custom_components.midea_dehumidifier] midea_dehumi: logging into Midea API Web Service...
2021-12-16 23:48:40 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumi: login success, sessionId=81b8c44d7e704fd6a63778b3afc3d0f42021121xxxxxxxx
2021-12-16 23:48:41 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumi: [id=3188583xxxxxx type=0xAC name=Salon] is online, is active.
2021-12-16 23:48:41 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumidifier: device type 0xA1 found.
2021-12-16 23:48:41 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumidifier: loading humidifier entity sub-component...
2021-12-16 23:48:41 INFO (MainThread) [custom_components.midea_dehumidifier] midea-dehumidifier: loading sensor entity sub-component...
2021-12-16 23:48:41 INFO (MainThread) [custom_components.midea_dehumidifier] midea_dehumidifier: platform successfuly initialized.
2021-12-16 23:48:43 INFO (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: initializing humidifier platform
2021-12-16 23:48:43 DEBUG (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: starting async_setup_platform
2021-12-16 23:48:43 DEBUG (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: MIDEA_API_CLIENT=midea_api_client
2021-12-16 23:48:43 DEBUG (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: MIDEA_TARGET_DEVICE=midea_target_device
2021-12-16 23:48:43 DEBUG (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: targetDevice = {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Salon', 'modelNumber': '-95', 'id': '3188583xxxxx', 'sn': '41c0ae929980ea89c072ac7bcfe43c326b1ac91ec108f8fc2f58f7aa25ff4f6876331e5003xxxxxxxxxxx', 'type': '0xAC', 'tsn': '', 'mac': ''}
2021-12-16 23:48:43 DEBUG (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: initializing MideaDehumidifierDevice...
2021-12-16 23:48:43 INFO (MainThread) [custom_components.midea_dehumidifier.humidifier] midea_dehumidifier: humidifier entity initialized.

And the entity report accurate data Entity state :

min_humidity: 40
max_humidity: 85
available_modes:
  - Target_humidity
  - Continuos
  - Smart
  - Dryer
humidity: 50
mode: Smart
ion: 0
fan_speed_mode: High
fan_speed: 80
current_humidity: 57
tank_show: false
device_class: dehumidifier
friendly_name: midea_dehumidifier_318858375xxxxx
supported_features: 1

PS: I also noticed something that could be a typo in the code in the file __init__.py of the integration

if not deviceId: here deviceId

if a["type"] == "0xA1" and deviceID == str(a["id"]): 

but in the second line deviceID has a capital D ... typo ?

sicknesz commented 2 years ago

Ok, my device is WEIRD ... i've removed it and re-added it and now it's a 0x1A ... what the heck happens in the first place ? i had a firmware version of 3.0.8, now it reports 1.0.0, but hey, at least i don't have to manually modify the source code to get it detected /working in home-assistant.

before: [id=3188583xxxxxx type=0xAC name=Salon] and now : [id=3188583xxxxx type=0xA1 name=Déshumidificateur_6734]

Name changed but its the same device, pretty scary

varac commented 2 years ago

Same for me with a Comfee MDDF-16DEN7-WF dehumidifier, I also needed to change any occurrence of 0xA1 to 0xAC.

sicknesz commented 2 years ago

Mine restored to the proper 0xA1 value after resetting it with a different app, there's so many app compatible i used the "midea air" one, also as i mentionned my firmware detected version kept changing from 1.0.0 to 3.0.7 -> 3.0.8 and is now back to 1.0.0 again ... those appliciance have identity crisis