Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature(C3): (Heat Pump Wi-Fi Controller) - add new parameters to entities #404

Closed
michalszym opened this issue Nov 27, 2024 · 16 comments · Fixed by midea-lan/midea-local#340
Labels
add_new_feature enhancement New feature or request
Milestone

Comments

@michalszym
Copy link

michalszym commented Nov 27, 2024

Device type and model (or SN)

Heat Pump Wi-Fi Controller 171H120F (0), 0000C3310171H120F28044101688DYU8

The detail description of new feature

In reference to the discussion in the thread: #387, please add all parameters that can be read from the heat pump wi-fi controller, so that each integration user can decide which of them they need .
I am attaching photos of the controller with available parameters to the application.

I don't know if it will help, but in one of the manuals for the Midea Heatpump WiFi controller that I found, the modbus parameters are described in detail.
The manual can be found here: https://kaisai.com/pl/files/page_files/464/kaisai-arctic-power-instrukcja-sterownika-pl-v02.pdf and information about modbus starts on page 48 (41).

kaisai_01
kaisai_02
kaisai_03
kaisai_04
kaisai_05
kaisai_06
kaisai_07
kaisai_08
kaisai_09

@michalszym michalszym added the enhancement New feature or request label Nov 27, 2024
@wuwentao wuwentao changed the title C3 device (Heat Pump Wi-Fi Controller) - add new parameters to entities Feature(C3): (Heat Pump Wi-Fi Controller) - add new parameters to entities Nov 28, 2024
@wuwentao
Copy link
Owner

wuwentao commented Dec 13, 2024

@michalszym sorry, we can't add all parameters,as different parameters have different units/type.
so please add your expected features/parameters list.

in addition, I will also try to add some basic and easy to do parameters.
please try to description it in english or translate software based on your document, as the document link is not english.

thanks

@AndreasTUHU

@wuwentao
Copy link
Owner

wuwentao commented Dec 18, 2024

@michalszym @AndreasTUHU

@fagallo
add some debug code in this PR: midea-lan/midea-local#340
try with this draft PR.

  1. login to HAOS
  2. start homeassitant docker
  3. replace file for midealocal python pip package in homeassitant core(use wget to download github PR raw file and replace it)
  4. enable debug log for both midea_ac_lan and midealocal in configuration.yaml
  5. reboot HA.
  6. after your C3 device works well(start about 3-5 minutes), try to upload full debug log file to current github issue and I will check the detail.

in addition ,it should be the feature requirement for current issue, need to got some debug log and confirm the result.
also try to add some new params, but I don't think we need to add all these params.
we can confirm it later.

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.
  5. reboot HA and test with it, confirm with the result or debug log.

if you want to check debug log output with your device display name and value.
just search keyword UnitPara or C3UnitParaMessageBody, and you will find more value output , I'm not sure the real value.
if possible, you can check your device params value with debug log params value.
the name maybe not the same, and I'm also not sure the name in your device and current debug log.
you can select someone with the name in your device ,and give the finally result to me.
I will continue improve and try to add it with what you expected.

@wuwentao
Copy link
Owner

@micturkey @fagallo @AndreasTUHU @erikgieseler @bdecl

If you are interested in these C3 device params, you can test this draft PR, verify the output and give feedback with what you expected params, i will try to add some with it.
if you not interested with it, and current C3 params is enough for you, just ignore it, thanks

@erikgieseler
Copy link
Contributor

Hi,
please find attached a debug log from after the adjustments.
The attached error is displayed in the log:

2024-12-18 18:04:39.659 DEBUG (Heat Pump Wi-Fi Controller) [midealocal.device] [142936511731561] refresh_status with cmd: {'_device_type': <DeviceType.C3: 195>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X10: 16>, '_message_protocol_version': 0, 'header': 'aa0bc300000000000003', 'body': '10', 'message_type': 'query', 'body_type': '10', 'self': <midealocal.devices.c3.message.MessageQueryUnitPara object at 0x7f4a3d532900>}, unsupported protocol, SKIP

home-assistant.log

@bdecl
Copy link

bdecl commented Dec 18, 2024

Hi,

In att some logs. I also getting unsupported protocol for MessageQueryAppliance, MessageQueryDisinfect and MessageQueryUnitPara. Do we also has to share the firmware version of the Controller ?

home-assistant_midea_ac_lan_2024-12-18T17-21-49.463Z.log

@wuwentao
Copy link
Owner

wuwentao commented Dec 19, 2024

@bdecl @erikgieseler thanks for your info update.
this unsupported protocol mean: our midea_ac_lan send queery msg to your device, and device don't response any msg to us, so we can only skip it.

  1. for QueryDisinfect, I think both of our current device NOT support disinfect feature? as the response message not match it. it required more device to test and confirm the result.
  2. for QueryAppliance, just ignore
  3. for QueryUnitPara, this is what we expected for current github issue, seems device not response to our query. I don't have any good idea now.

as this is a draft test version, so I have add 3 new query: QueryECO/QueryInstall/QueryHMIPara with a new push today.
I'm not sure which query can got a response(response will be a Unidentified protocol debug msg), so just add it for test purpose.

in addition, all these query expected a response msg from device, if we can't recv msg, we can do nothing.
like QuerySilence and QueryBasic can got a expected repsonse, so we can parse it and report the result to HA.

@erikgieseler
Copy link
Contributor

Hi,
enclosed is an updated log.
home-assistant.log

@bdecl
Copy link

bdecl commented Dec 19, 2024

Hi,
My logs with the latest changes.

home-assistant_midea_ac_lan_2024-12-19T23-02-48.325Z.log

Firmware versions visible on Heatpump controller
ODU 17-03-2022V62
HMI 14-05-2022V35A
IDU 26-10-2021V99

Midea C3 Smart Home detected Firmware V.0521318_0000

@wuwentao
Copy link
Owner

@bdecl @erikgieseler thanks.

seems both of our device only support QueryECO and got a Unidentified protocol(expected result, we have recvied response and not parse it)
most of the new query can't got respone.

2024-12-19 23:57:37.657 DEBUG (Chauffe eau de chauffage central) [custom_components.midea_ac_lan.midealocalbjorn.device] [146235046631753] Sending: {'_device_type': <DeviceType.C3: 195>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X07: 7>, '_message_protocol_version': 0, 'header': 'aa0bc300000000000003', 'body': '07', 'message_type': 'query', 'body_type': '07', 'self': <custom_components.midea_ac_lan.midealocalbjorn.devices.c3.message.MessageQueryECO object at 0xffff8410c6e0>}, query is True
2024-12-19 23:57:37.786 DEBUG (Chauffe eau de chauffage central) [custom_components.midea_ac_lan.midealocalbjorn.devices.c3] [146235046631753] Received: {'_device_type': <DeviceType.C3: 195>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X07: 7>, '_message_protocol_version': 0, '_header': 'aa10c300000000000003', '_body': <custom_components.midea_ac_lan.midealocalbjorn.message.MessageBody object at 0xffff7f4bc2d0>, '_data': '070008001300', 'parser_list': [], 'header': 'aa10c300000000000003', 'body': '070008001300', 'message_type': 'query', 'body_type': '07', 'self': <custom_components.midea_ac_lan.midealocalbjorn.devices.c3.message.MessageC3Response object at 0xffff7f9ef9d0>}
2024-12-19 23:57:37.787 DEBUG (Chauffe eau de chauffage central) [custom_components.midea_ac_lan.midealocalbjorn.device] [146235046631753] Unidentified protocol

could you help to test the latest changes with your device? and provide the full debug log?
@michalszym @AndreasTUHU @fagallo

@restudio
Copy link

restudio commented Dec 25, 2024

Hi, I tried this.

Log

home-assistant_midea_ac_lan_2024-12-25T20-23-27.673Z.log

@wuwentao
Copy link
Owner

@restudio thank you very much for your test and debug log.
seems we can't got these operation params from device.

if device can't response to our query message, also not send these update message to our HA device, we can't support these params.

wuwentao added a commit to midea-lan/midea-local that referenced this issue Jan 15, 2025
1. current disinfect is the same as tbh, fix tbh set error
2. add disinfect query
3.  TO BE DONE: set disinfect, as it's a switch
4. add some addition attrs

fix wuwentao/midea_ac_lan#399

and wuwentao/midea_ac_lan#404 maybe need a new
PR for it.
@wuwentao
Copy link
Owner

sorry, I have add all these values to current v0.6.6 in midea-local lib side with debug log output, NOT available in midea_ac_lan, as our devices can't response to these new queries, we can't got these params value.

so I have closed current issue, anyway, there is still some C3 device issue opening, I will continue improve it if there is any new updates.

@michalszym
Copy link
Author

Sorry for such a long time without response, but I had health problems.
There is someone in the Polish HA group who uses Modbus to extract much more information from the heat pump. Here is a link: https://www.facebook.com/groups/homeassistantpolska/permalink/1039385873424035 to the topic where in the comments the author of the solution shows what he managed to do. Additionally, I am posting a screenshot.
Maybe it will be possible to add further parameters to the integration?
Will the modbus map and pre-configured registers from this user help?

Image

@wuwentao
Copy link
Owner

@michalszym thanks for these info share.
I'm sorry, I'm not sure with the modbus solution, as current integration only using TCP socket protocl from midea WIFI hardware module, so it can't support modbus protocol. it's two different solution.
you can double check and confirm the result and solution later.

@AndreasTUHU
Copy link

AndreasTUHU commented Jan 29, 2025

As far as I know to access the modbus registers, you need to use the RS-485 port of the wired controller.
You need an additional device for this.
I got this tip in the hungarian HA fb group:
https://github.com/Mosibi/Midea-heat-pump-ESPHome

@wuwentao
Copy link
Owner

wuwentao commented Feb 5, 2025

@AndreasTUHU it's another solution and can't be use for current integration.
anyway, you can have a try and share your info with us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add_new_feature enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants