wuwentao / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
370 stars 17 forks source link

Feature(ED): support Midea Water Purifier JL2245T #402

Open polysa opened 4 days ago

polysa commented 4 days ago

Device type and model (or SN)

The model can be found in Settings -> Devices & Services -> Midea AC LAN -> Devices -> Device Info> The SN can be found in Settings -> Devices & Services -> Midea AC LAN -> Add device -> Just list appliances> The SN also can be found in your SmartHome APP

The detail description of new feature

Hello can we have support for Midea Water Purifier JL2245T

  1. support new device : Midea Water Purifier JL2245T
  2. support new feature: From the app we have Water Cosumption, Water Valume Selection (3 Valumes), Water Temperature (Hot & Cold), Eco Mode, Hot Water Sterilization, PAC Filter (Remaining & and days), C+UF Filter (Remaining % and days)

Appliance code: 152832116925069 Type: ED SN: 0000ED54163100005450721003131PFF Supported: Yes

wuwentao commented 4 days ago

ED device is already supported, could you help to confirm with the details?

https://github.com/wuwentao/midea_ac_lan/blob/master/doc/ED.md

polysa commented 4 days ago

Hello

All entities unknown and unabailable with this model.

image

2024-11-28 09:32:26.828 DEBUG (Water Dispenser ) [midealocal.device] [152832116925069] refresh_status with cmd: {'_device_type': <DeviceType.ED: 237>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X00: 0>, '_message_protocol_version': 0, 'header': 'aa0ced00000000000003', 'body': '0001', 'message_type': 'query', 'body_type': '00', 'self': <midealocal.devices.ed.message.MessageQuery object at 0x7fef1c48fd10>}, unsupported protocol, SKIP 2024-11-28 09:32:26.828 DEBUG (Water Dispenser ) [midealocal.device] [152832116925069] all the query cmds failed [<midealocal.devices.ed.message.MessageQuery object at 0x7fef1c48fd10>], please report bug 2024-11-28 09:32:26.829 DEBUG (Water Dispenser ) [midealocal.device] [152832116925069] No Supported protocol 2024-11-28 09:32:26.829 DEBUG (Water Dispenser ) [midealocal.device] [152832116925069] refresh_status with cmds: [<midealocal.devices.ed.message.MessageQuery object at 0x7fef1c48fd10>], check_protocol False

wuwentao commented 3 days ago

thanks, I have understand your issue with the debug log now, I will check it later.

wuwentao commented 3 days ago

@polysa there is a device subtype for different product, and I'm not sure with your device subtype, as you don't provide me the full debug log in your issue.

maybe you can directly edit the source code and confirm the result. if it still can't works for you, you can upload the detail debug log and we can do future check.

how to manual edit it: you just need to change one line : https://github.com/midea-lan/midea-local/blob/22462e68d8cc776f5c09d9b3bfea97e595701587/midealocal/devices/ed/message.py#L49

body_type: ListTypes = ListTypes.X00,

the last content is ListTypes.X00, you should replace X00 with [X01 , or X03, or X04, or X05 or X06 or X07 or FF (NOT XFF, it's FF)] to test it(replace the default value), and confirm which VALUE can works for your device and got a expected respone. then we can add it later.

in addition, if your changes this value everytime, you should reboot HA to take effect. so just enable debug log via configuration.yaml and you can got all the details after device reboot done.

it's not a finally solution and just a quickly debug/test solution, and I will try to commit it once got confirm with you. thanks

how to change it, below is the detail steps:

  1. if you are using HAOS, you should install Add-on [Advanced SSH & Web Terminal] and disable [Protected Mode], once it done, you can ssh to your HAOS, and enter docker in HAOS docker exec -it homeassistant /bin/bash, contiune the step to check midea-local install path
  2. if you not using HAOS, just check midea-local install path as the next step
  3. get midea-local install path with command pip show midea-local, it will show info for you, for example, my location is Location: /usr/local/lib/python3.12/site-packages
  4. then we can edit the file /usr/local/lib/python3.12/site-packages/midealocal/devices/ed/message.py with the code changes, using vi command line tool or any method you can do it.
    1. reboot HA and test with it, confirm with the result or debug log.
wuwentao commented 3 days ago

in addition, there is a same github issue with ED device: https://github.com/wuwentao/midea_ac_lan/issues/352

and I have submit a fix for this device, but I'm not sure with your device, so you still need to test it and also confirm the result with it.

polysa commented 2 days ago

How can i provide the full debug log?

wuwentao commented 4 hours ago

How can i provide the full debug log?

just download the log from your HA device and upload it as attachment to github issue.

in addition, please also confirm the code changes result, it's a quickly solution for you to confirm the result, then we can quickly fix it. if it's hard to do, we can do it step by step, thanks.