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(AC): 美的风管机无法启动 #418

Open
Qianqianwanxing opened this issue Dec 14, 2024 · 16 comments
Open

Feature(AC): 美的风管机无法启动 #418

Qianqianwanxing opened this issue Dec 14, 2024 · 16 comments

Comments

@Qianqianwanxing
Copy link

HA版本

2024.10.4

集成版本

0.6.5

之前可正常使用的集成版本

设备类型及型号

Air Conditioner 23096653

使用的App

美的美居

问题/Bug详细描述

机器型号为:KFR-72T2 美的星光旗舰版
机器打开制冷或者是其他模式后再接入HA可以控制,但仅限一段时间,过了几个小时后HA就无法控制此机器,HA提示为下图
微信图片_20241215003218
如果机器不启动可以搜索到ip且可以接入 但直接无法控制

The logs

[
Uploading home-assistant_midea_ac_lan_2024-12-14T16-27-26.035Z.log…
](url)

@Qianqianwanxing Qianqianwanxing added the bug Something isn't working label Dec 14, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Midea air duct machine cannot be started

@Qianqianwanxing
Copy link
Author

日志为机器不启动状态接入HA的情况

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The log shows the situation when the machine is not started and connected to HA.

@Qianqianwanxing
Copy link
Author

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


home-assistant_midea_ac_lan_2024-12-14T16-27-26.035Z.log

@Qianqianwanxing
Copy link
Author

出现bug的是log中的中央空调> home-assistant_midea_ac_lan_2024-12-14T16-27-26.035Z.log

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The bug appears in the central air conditioner in the log> home-assistant_midea_ac_lan_2024-12-14T16-27-26.035Z.log

@Qianqianwanxing
Copy link
Author

此log为机器启动状态接入HA的情况,过了一段时间后无法调整。
home-assistant_midea_ac_lan_2024-12-15T11-40-25.525Z.log

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This log refers to the machine's startup status and access to HA, and cannot be adjusted after a period of time.
home-assistant_midea_ac_lan_2024-12-15T11-40-25.525Z.log

@wuwentao
Copy link
Owner

多谢提供详细的debug log,从你log中发现不少问题。

但是你并未描述具体是哪个设备,有什么错误。我也不清楚哪个名字对应风管机,大概仔细根据debug log 逐个看了看,应该名字叫中央空调。

先把大概问题列一下,作为后续的参考记录,再看怎么解决吧,避免后续来回看log分析问题。

第一个问题是改变设备状态时,出现了socket连接异常断开:

2024-12-15 19:39:45.454 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547939253936] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 807, in async_handle_set_hvac_mode_service
    await self.async_set_hvac_mode(hvac_mode)
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 815, in async_set_hvac_mode
    await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/midea_ac_lan/climate.py", line 213, in set_hvac_mode
    self._device.set_attribute(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        attr="mode",
        ^^^^^^^^^^^^
        value=self.hvac_modes.index(hvac_mode),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/midealocal/devices/ac/__init__.py", line 381, in set_attribute
    self.build_send(message)
    ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/midealocal/device.py", line 301, in build_send
    self.send_message(msg, query=query)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/midealocal/device.py", line 235, in send_message
    self.send_message_v3(data, msg_type=MSGTYPE_ENCRYPTED_REQUEST, query=query)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/midealocal/device.py", line 294, in send_message_v3
    self.send_message_v2(data, query=query)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/midealocal/device.py", line 253, in send_message_v2
    self._socket.send(data)
    ~~~~~~~~~~~~~~~~~^^^^^^
BrokenPipeError: [Errno 32] Broken pipe

然后就进入 No Supported protocol错误状态了:

2024-12-15 19:40:08.612 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmds: [<midealocal.devices.ac.message.MessageQuery object at 0x7f7785c8a0>, <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f77753620>, <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f7a4c1630>], check_protocol False
2024-12-15 19:40:08.612 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X41: 65>, '_message_protocol_version': 8, '_message_id': 243, 'header': 'aa20ac00000000000803', 'body': '418100ff00000000000000000000000000000000f363', 'message_type': 'query', 'body_type': '41', 'self': <midealocal.devices.ac.message.MessageQuery object at 0x7f7785c8a0>}, unsupported protocol, SKIP
2024-12-15 19:40:08.613 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.B1: 177>, '_message_protocol_version': 8, '_message_id': 244, 'header': 'aa1aac00000000000803', 'body': 'b106420018001500170033024b00f4b5', 'message_type': 'query', 'body_type': 'b1', 'self': <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f77753620>}, unsupported protocol, SKIP
2024-12-15 19:40:08.613 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X41: 65>, '_message_protocol_version': 8, '_message_id': 245, 'header': 'aa11ac00000000000803', 'body': '41210144000109', 'message_type': 'query', 'body_type': '41', 'self': <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f7a4c1630>}, unsupported protocol, SKIP
2024-12-15 19:40:08.614 DEBUG (中央空调) [midealocal.device] [211106243299028] all the query cmds failed [<midealocal.devices.ac.message.MessageQuery object at 0x7f7785c8a0>, <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f77753620>, <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f7a4c1630>], please report bug
2024-12-15 19:40:08.614 DEBUG (中央空调) [midealocal.device] [211106243299028] No Supported protocol

而启动以后,执行电源开机,关机的操作,结果也是 No Supported protocol错误:

024-12-15 00:25:46.304 DEBUG (SyncWorker_1) [midealocal.device] [211106243299028] Sending: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.set: 2>, '_body_type': <ListTypes.X40: 64>, '_message_protocol_version': 8, '_message_id': 56, 'power': True, 'prompt_tone': True, 'mode': 2, 'target_temperature': 24.0, 'fan_speed': 102, 'swing_vertical': False, 'swing_horizontal': False, 'boost_mode': False, 'smart_eye': False, 'dry': False, 'aux_heating': False, 'eco_mode': False, 'temp_fahrenheit': False, 'sleep_mode': False, 'natural_wind': False, 'frost_protect': False, 'comfort_mode': False, 'header': 'aa23ac00000000000802', 'body': '40414866000000300000000000000000000000000000003856', 'message_type': 'set', 'body_type': '40', 'self': <midealocal.devices.ac.message.MessageGeneralSet object at 0x7f5da48d70>}, query is False
2024-12-15 00:25:51.721 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmds: [<midealocal.devices.ac.message.MessageQuery object at 0x7f5db4acc0>, <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f5da5e330>, <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f722d1820>], check_protocol False
2024-12-15 00:25:51.722 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X41: 65>, '_message_protocol_version': 8, '_message_id': 57, 'header': 'aa20ac00000000000803', 'body': '418100ff0000000000000000000000000000000039d7', 'message_type': 'query', 'body_type': '41', 'self': <midealocal.devices.ac.message.MessageQuery object at 0x7f5db4acc0>}, unsupported protocol, SKIP
2024-12-15 00:25:51.724 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.B1: 177>, '_message_protocol_version': 8, '_message_id': 58, 'header': 'aa1aac00000000000803', 'body': 'b106420018001500170033024b003a60', 'message_type': 'query', 'body_type': 'b1', 'self': <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f5da5e330>}, unsupported protocol, SKIP
2024-12-15 00:25:51.725 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X41: 65>, '_message_protocol_version': 8, '_message_id': 59, 'header': 'aa11ac00000000000803', 'body': '41210144000109', 'message_type': 'query', 'body_type': '41', 'self': <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f722d1820>}, unsupported protocol, SKIP
2024-12-15 00:25:51.726 DEBUG (中央空调) [midealocal.device] [211106243299028] all the query cmds failed [<midealocal.devices.ac.message.MessageQuery object at 0x7f5db4acc0>, <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f5da5e330>, <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f722d1820>], please report bug
2024-12-15 00:25:51.727 DEBUG (中央空调) [midealocal.device] [211106243299028] No Supported protocol
2024-12-15 00:25:51.734 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmds: [<midealocal.devices.ac.message.MessageQuery object at 0x7f722d1820>, <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f72e0e0f0>, <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f72267aa0>], check_protocol False
2024-12-15 00:25:51.735 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X41: 65>, '_message_protocol_version': 8, '_message_id': 60, 'header': 'aa20ac00000000000803', 'body': '418100ff000000000000000000000000000000003ce8', 'message_type': 'query', 'body_type': '41', 'self': <midealocal.devices.ac.message.MessageQuery object at 0x7f722d1820>}, unsupported protocol, SKIP
2024-12-15 00:25:51.736 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.B1: 177>, '_message_protocol_version': 8, '_message_id': 61, 'header': 'aa1aac00000000000803', 'body': 'b106420018001500170033024b003de3', 'message_type': 'query', 'body_type': 'b1', 'self': <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f72e0e0f0>}, unsupported protocol, SKIP
2024-12-15 00:25:51.736 DEBUG (中央空调) [midealocal.device] [211106243299028] refresh_status with cmd: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.query: 3>, '_body_type': <ListTypes.X41: 65>, '_message_protocol_version': 8, '_message_id': 62, 'header': 'aa11ac00000000000803', 'body': '41210144000109', 'message_type': 'query', 'body_type': '41', 'self': <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f72267aa0>}, unsupported protocol, SKIP
2024-12-15 00:25:51.737 DEBUG (中央空调) [midealocal.device] [211106243299028] all the query cmds failed [<midealocal.devices.ac.message.MessageQuery object at 0x7f722d1820>, <midealocal.devices.ac.message.MessageNewProtocolQuery object at 0x7f72e0e0f0>, <midealocal.devices.ac.message.MessagePowerQuery object at 0x7f72267aa0>], please report bug
2024-12-15 00:25:51.737 DEBUG (中央空调) [midealocal.device] [211106243299028] No Supported protocol

另外,你的主卧空调实际也有Unidentified protocol错误:

2024-12-15 00:25:24.571 DEBUG (主卧空调) [midealocal.device] [210006731185405] Status update: {'indoor_temperature': 17.5, 'outdoor_temperature': None, 'indoor_humidity': 42}
2024-12-15 00:25:25.591 DEBUG (主卧空调) [midealocal.devices.ac] [210006731185405] Received: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.notify1: 4>, '_body_type': <ListTypes.A3: 163>, '_message_protocol_version': 8, '_header': 'aa2bac00000000000804', '_body': <midealocal.message.MessageBody object at 0x7f5da5f1d0>, '_data': 'a30000000000000000000000000000000000000000000000000000000000002ede', 'parser_list': [], 'header': 'aa2bac00000000000804', 'body': 'a30000000000000000000000000000000000000000000000000000000000002ede', 'message_type': 'notify1', 'body_type': 'a3', 'self': <midealocal.devices.ac.message.MessageACResponse object at 0x7f72264cb0>}
2024-12-15 00:25:25.592 DEBUG (主卧空调) [midealocal.device] [210006731185405] Unidentified protocol
2024-12-15 00:25:26.574 DEBUG (主卧空调) [midealocal.devices.ac] [210006731185405] Received: {'_device_type': <DeviceType.AC: 172>, '_message_type': <MessageType.notify1: 4>, '_body_type': <ListTypes.A5: 165>, '_message_protocol_version': 8, '_header': 'aa2bac00000000000804', '_body': <midealocal.message.MessageBody object at 0x7f5d9ace30>, '_data': 'a5780000000000ae000000000000000005001b00000000564e000000ff00002e8a', 'parser_list': [], 'header': 'aa2bac00000000000804', 'body': 'a5780000000000ae000000000000000005001b00000000564e000000ff00002e8a', 'message_type': 'notify1', 'body_type': 'a5', 'self': <midealocal.devices.ac.message.MessageACResponse object at 0x7f719eb020>}
2024-12-15 00:25:26.575 DEBUG (主卧空调) [midealocal.device] [210006731185405] Unidentified protocol

@wuwentao wuwentao changed the title 美的风管机无法启动 Feature(AC): 美的风管机无法启动 Dec 16, 2024
@wuwentao wuwentao added add_new_feature add_new_protocol and removed bug Something isn't working labels Dec 16, 2024
@Qianqianwanxing
Copy link
Author

看日志的话会是协议的问题吗?我可以提供什么帮助吗?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If you look at the logs, could it be a protocol issue? How can I help?

@wuwentao
Copy link
Owner

看日志的话会是协议的问题吗?我可以提供什么帮助吗?

是的,需要新增协议支持,但是最近手头事情有点多,而且还有几个其他的github issue处理了一半,打算先把手头的解决掉,因此还请稍等一段时间,我再提供相关修改后的文件,你可以手工替换后测试,具体时间我现在暂时不确定,随后有消息了,我在当前issue中at你吧。
或者没有敏感数据的话,可以提供远程访问你的HA设备,我可以直接快速调试,不过也需要晚一些。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Looking at the logs, is it a protocol issue? How can I help?

Yes, new protocol support is needed, but there are a lot of things at hand recently, and there are several other github issues that have been half processed. I plan to solve the ones at hand first, so please wait for a while and I will provide relevant modifications. You can manually replace the last file and test it. I am not sure about the specific time now. When there is news later, I will att you in the current issue.
Or if there is no sensitive data, you can provide remote access to your HA device. I can debug it directly and quickly, but it will also need to be later.

@Qianqianwanxing
Copy link
Author

很抱歉,因为涉及家里存在摄像头还是不太合适提供,但是没关系,我非常愿意等待您提供修改后的版本配合测试,感谢您对这个项目的维护。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Sorry, it is not appropriate to provide it because there are cameras at home, but it doesn't matter. I am very willing to wait for you to provide a modified version for testing. Thank you for maintaining this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants