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
269 stars 12 forks source link

小天鹅洗衣机不能添加 #199

Closed 954485679 closed 1 month ago

954485679 commented 3 months ago

HA版本

2024.5.3

集成版本

0.4.3

设备类型及型号

210006728302218

使用的App

美的美居

问题详细描述

W{AF3A$ZT490 %5`}4C}YQ The issue seems to be that with the v3 protocol version, automatic token and key retrieval isn't working. When using v1 and v2, you can add them but the entities aren't accessible. What could be the problem here?

The logs

home-assistant_midea_ac_lan_2024-07-04T00-20-12.292Z.log

Issues-translate-bot commented 3 months ago

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


Title: Little Swan washing machine cannot be added

chemelli74 commented 3 months ago

Hi @954485679, we need debug log to investigate.

Please add the following to configuration.yaml , restart HA, and post the log:

logger:
  default: warning
  logs:
    custom_components.midea_ac_lan: debug
    midealocal: debug

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

954485679 commented 3 months ago

嗨,我们需要调试日志进行调查。

请将以下内容添加到 ,重新启动 HA,并发布日志:configuration.yaml

logger:
  default: warning
  logs:
    custom_components.midea_ac_lan: debug
    midealocal: debug

注意:最好将日志拖到注释中(这会将其添加为附件),而不是复制粘贴,因为很难在 GitHub 中读取日志。 [Uploading home-assistant_midea_ac_lan_2024-07-03T10-01-41.971Z.log…]() Thank you very much for responding to my question. I have supplemented by uploading the log. I'm not sure what you need, so I uploaded a very comprehensive log, which may be confusing for you to review my actual issue. I apologize for any inconvenience.

chemelli74 commented 3 months ago

Uploading home-assistant_midea_ac_lan_2024-07-03T10-01-41.971Z.log…

Link is not working

954485679 commented 3 months ago

上传home-assistant_midea_ac_lan_2024-07-03T10-01-41.971Z.log...

链接不起作用 home-assistant_midea_ac_lan_2024-07-04T00-20-12.292Z.log I apologize for the upload failure due to network issues; I have re-uploaded it.

chemelli74 commented 3 months ago

I see a few timeout issues:

2024-07-04 08:19:48.505 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Connection timed out
2024-07-04 08:19:48.505 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
2024-07-04 08:19:49.722 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Connection timed out
2024-07-04 08:19:49.723 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
[...]
2024-07-04 08:19:52.709 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Refresh status is timed out
2024-07-04 08:19:52.709 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
[...]
2024-07-04 08:20:09.460 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Connection timed out
2024-07-04 08:20:09.460 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
[...]
2024-07-04 08:20:13.554 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Refresh status is timed out
2024-07-04 08:20:13.554 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}

I would investigate first your network; for example:

wuwentao commented 3 months ago

@chemelli74 I think he just add this device with v2 protocol and got pass with add device. I will disable this error add action in next version. but after add device pass, it still can't works anymore, I found more user use this method to add device with V2 protocol when they got device add failed msg.

@954485679 could you help to confirm that is this device add pass by set protocol to V2 or V1 ?

954485679 commented 3 months ago

我看到一些超时问题:

2024-07-04 08:19:48.505 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Connection timed out
2024-07-04 08:19:48.505 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
2024-07-04 08:19:49.722 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Connection timed out
2024-07-04 08:19:49.723 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
[...]
2024-07-04 08:19:52.709 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Refresh status is timed out
2024-07-04 08:19:52.709 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
[...]
2024-07-04 08:20:09.460 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Connection timed out
2024-07-04 08:20:09.460 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}
[...]
2024-07-04 08:20:13.554 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Refresh status is timed out
2024-07-04 08:20:13.554 DEBUG (Front Load Washer) [midealocal.device] [210006728302218] Status update: {'available': False}

我将首先调查您的网络;例如:

  • 设备是否仍连接到WiFi?
  • 当高可用性端出现超时时,设备是否仍对ping作出响应?

The device is normally linked to the network, ensuring that status updates and control are achievable in the Midea Home app. The ping is unimpeded.

954485679 commented 3 months ago

@chemelli74我认为他只是添加了这个设备与v2协议和通过了添加设备。我将在下一个版本中禁用此错误添加操作。但是添加设备通过后,仍然不能正常工作,我发现更多的用户在收到设备添加失败的消息时使用这种方法来添加V2协议的设备。

@954485679您能否帮助确认此设备是通过将协议设置为V2还是V1来添加pass?

As you mentioned, I am using v2 authentication to add the device, primarily because v3 authentication cannot obtain the token and key, which would prevent device addition as shown in the screenshot in the forum post. I would like to ask how I can obtain the token and key to add my device.

chemelli74 commented 3 months ago

As you mentioned, I am using v2 authentication to add the device, primarily because v3 authentication cannot obtain the token and key, which would prevent device addition as shown in the screenshot in the forum post. I would like to ask how I can obtain the token and key to add my device.

Just a couple of points:

954485679 commented 3 months ago

正如您提到的,我正在使用 v2 身份验证来添加设备,主要是因为 v3 身份验证无法获取令牌和密钥,这将阻止设备添加,如论坛帖子中的屏幕截图所示。我想问一下如何获取令牌和密钥来添加我的设备。

只有几点:

  • 如果设备使用协议 V3,则不能强制它使用 V2。
  • token并且是从云中获得的。通常使用SmartHome帐户登录(即使没有在那里注册设备)就足够了。key

I have a total of four Midea devices: three air conditioners and one washing machine. They are all added to my Midea Smart Life account and are discoverable in Home Assistant. While the three air conditioners integrate perfectly and can be controlled through Home Assistant, the washing machine cannot connect. I'm unsure where the issue lies. I can provide you with my Midea account details to help you investigate and test the problem.

954485679 commented 3 months ago

正如您提到的,我正在使用 v2 身份验证来添加设备,主要是因为 v3 身份验证无法获取令牌和密钥,这将阻止设备添加,如论坛帖子中的屏幕截图所示。我想问一下如何获取令牌和密钥来添加我的设备。

只有几点:

  • 如果设备使用协议 V3,则不能强制它使用 V2。
  • token并且是从云中获得的。通常使用SmartHome帐户登录(即使没有在那里注册设备)就足够了。key

I re-ran the process of adding the device, printed out the log, and took a screenshot of the results to help you figure out the problem.

IL}6RP5 B0A2{20~CSS$OJV

954485679 commented 3 months ago

正如您提到的,我正在使用 v2 身份验证来添加设备,主要是因为 v3 身份验证无法获取令牌和密钥,这将阻止设备添加,如论坛帖子中的屏幕截图所示。我想问一下如何获取令牌和密钥来添加我的设备。

只有几点:

  • 如果设备使用协议 V3,则不能强制它使用 V2。
  • token并且是从云中获得的。通常使用SmartHome帐户登录(即使没有在那里注册设备)就足够了。key

home-assistant_midea_ac_lan_2024-07-04T15-34-19.137Z.log

Issues-translate-bot commented 3 months ago

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


As you mentioned, I'm using v2 auth to add the device, mainly because v3 auth cannot get the token and key, which will prevent the device from being added, as shown in the screenshot in the forum post. I want to ask how to get the token and key to add my device.

Just a few points:

  • If a device uses protocol V3, you cannot force it to use V2.
  • token and is obtained from the cloud. It is usually sufficient to log in with your SmartHome account (even if the device is not registered there). key

home-assistant_midea_ac_lan_2024-07-04T15-34-19.137Z.log

wuwentao commented 3 months ago

the device using V3 protocol, so you can't manual add it with V2 protocol, add device can pass, but all the status and control will using error V2 protocol and configs.

in additional, as you did a force add devie action with error configs, all the device info cached and saved with a config file in your HA. you should manual remove it.

the location should be /config/.storage/midea_ac_lan/210006728302218.json please login to HA and manual remove it with rm command

rm /config/.storage/midea_ac_lan/210006728302218.json

if there is any other device, please remove all file under /config/.storage/midea_ac_lan/`

then you can try to add it later. and we will have some changes in next version, maybe you can have a try with next version release.

954485679 commented 3 months ago

the device using V3 protocol, so you can't manual add it with V2 protocol, add device can pass, but all the status and control will using error V2 protocol and configs.

in additional, as you did a force add devie action with error configs, all the device info cached and saved with a config file in your HA. you should manual remove it.

the location should be /config/.storage/midea_ac_lan/210006728302218.json please login to HA and manual remove it with rm command

rm /config/.storage/midea_ac_lan/210006728302218.json

if there is any other device, please remove all file under /config/.storage/midea_ac_lan/`

then you can try to add it later. and we will have some changes in next version, maybe you can have a try with next version release. DL}A7%0$IP$})28{VXD)DCO

J{(30RQ_JQJ13EXEGZ EZSI Hello, according to you said that after the deletion, again to add operations will be prompted not to add the specified device, in the query list is supported, where is the problem, is this device is not supported?

wuwentao commented 3 months ago

device can be discover via a probe protocol. and still need a device token to control device, the key point is a valid key, it's a protocol hack, so weonly can try, once got pass result, your device can be add pass. please wait some days and we will do some changes in next version release.

954485679 commented 3 months ago

device can be discover via a probe protocol. and still need a device token to control device, the key point is a valid key, it's a protocol hack, so weonly can try, once got pass result, your device can be add pass. please wait some days and we will do some changes in next version release.

Thank you very much for explaining my question. I checked my log today and found that I can find the token and key of my washing machine through the v3 protocol. I manually configured it at that time, but it still doesn't work and will prompt that the configuration information is incorrect. I'm helpless now. Thank you once again for your contribution to the integration update. I look forward to the release of your new version.I am uploading my latest log again, hoping it will be helpful to you. home-assistant_midea_ac_lan_2024-07-04T15-34-19.137Z.log

rokam commented 2 months ago

Can you plese try v.0.5.0 and provide new logs?

954485679 commented 2 months ago

Can you plese try v.0.5.0 and provide new logs?

I integrated the update to version 0.5.0 and attempted to add the washing machine again, but it still gave an error. I exported the logs and will now show them to everyone. home-assistant_midea_ac_lan_2024-07-09T11-37-49.465Z.log

wuwentao commented 2 months ago

你的log中应该删除了使用美的美居登录的信息,以及设备的具体信息,都不在log里面。 是否有其他小天鹅品牌的洗衣机,能够添加成功的?

可能成功和失败的设备具体型号,例如设备的硬件版本,软件版本,仍然存在差异,导致无法添加成功。 目前只有使用多个成功的设备和多个失败的设备,具体版本数据信息仅限统计,对比,找出其中的差异点和共同点,供后续解决问题

Issues-translate-bot commented 2 months ago

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


Your log should have deleted the information about logging in using Midea, as well as the specific information about the device, which is not in the log. Are there any other Little Swan brand washing machines that can be added successfully?

There may still be differences between the specific models of successful and failed devices, such as the hardware version and software version of the device, resulting in failure to add successfully. Currently, only multiple successful devices and multiple failed devices are used. Specific version data information is only available for statistics and comparison to find out the differences and commonalities for subsequent problem solving.

954485679 commented 2 months ago

你的log中应该删除了使用美的美居登录的信息,以及设备的具体信息,都不在log里面。 是否有其他小天鹅品牌的洗衣机,能够添加成功的?

可能成功和失败的设备具体型号,例如设备的硬件版本,软件版本,仍然存在差异,导致无法添加成功。 目前只有使用多个成功的设备和多个失败的设备,具体版本数据信息仅限统计,对比,找出其中的差异点和共同点,供后续解决问题

I re-executed the adding process and printed out the logs. There were fewer deletions this time, hopefully it will be helpful to you. home-assistant_midea_ac_lan_2024-07-10T09-27-36.552Z.log

rokam commented 2 months ago

This should fix: https://github.com/rokam/midea-local/pull/217

wuwentao commented 2 months ago

@rokam hi rokam, this still not failed the error. the current issue is token auth failed with device in add device step. and he have more device with add passed, reporting the Does not supports the protocol MessageCapabilitiesQuery, ignored. this is two issue, you should fix this MessageCapabilitiesQuery issue.

rokam commented 2 months ago

The autentication was forcing capabilities and when capabilities were unsuported, it's raising the capabilities exception. And this exception was failing authentication.

rokam commented 2 months ago

0.5.4 should fix your issue

954485679 commented 2 months ago

0.5.4 应该可以解决您的问题

Thank you very much for your efforts on my issue. I will try to update the integration at the earliest convenience to test if my problem has been resolved.

954485679 commented 2 months ago

0.5.4 should fix your issue

I have updated the 0.5.4 version of the integration. When I tried to add my Little Swan washing machine again, it prompted me"Can't get available token for this device。".

wuwentao commented 1 month ago

抱歉,由于github当前存在大量同样duplicate的issue,因此先关闭当前issue,统一使用 #275 来跟踪和处理,避免大量重复问题的跟踪和处理。

Issues-translate-bot commented 1 month ago

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


Sorry, because there are currently a large number of identical duplicate issues on GitHub, we will close the current issue first and use #275 to track and handle them uniformly to avoid tracking and handling a large number of duplicate issues.

wuwentao commented 1 month ago

补充说明:close当前issue仅仅是不在默认open的issue list中显示,并不代表当前issue不再处理或者无视问题了。 主要是方便管理和跟踪其他issue,而当前issue的后续状态和进展,仍然可以继续update其他信息,都是能够收到提醒和状态更新的。 并且,在主issue中也都有当前issue的关联信息,后续都能逐个追踪,回溯回来。

Issues-translate-bot commented 1 month ago

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


Additional explanation: Close the current issue is just not displayed in the default open issue list, it does not mean that the current issue is no longer processed or ignored. It is mainly to facilitate the management and tracking of other issues. As for the subsequent status and progress of the current issue, you can still continue to update other information, and you can receive reminders and status updates. Moreover, the main issue also has related information about the current issue, which can be tracked one by one and traced back later.