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

希望大佬能够添加KFR-72L/CE2空调设备的支持 #295

Open
yang605256182 opened this issue Aug 24, 2024 · 21 comments
Open

希望大佬能够添加KFR-72L/CE2空调设备的支持 #295

yang605256182 opened this issue Aug 24, 2024 · 21 comments
Labels
enhancement New feature or request

Comments

@yang605256182
Copy link

Device type and model (or SN)

SN:00000031822259015232403800490000

The description of new feature

使用集成无法发现该空调设备,使用的美的美居APP进行控制。十分感谢各位大佬~

@yang605256182 yang605256182 added the enhancement New feature or request label Aug 24, 2024
@Issues-translate-bot
Copy link

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


Title: I hope you can add support for KFR-72L/CE2 air conditioning equipment

@wuwentao
Copy link
Owner

那就是这个不属于空调默认的AC类型?
那可能设备类型得进一步确定一下才行,Device Type和SN才能过滤出来准确的产品信息。

你这个是带加湿功能的空调?不属于传统的空调设备?
美居app里的产品品类名字显示的叫啥?
从你的描述看,产品型号应该是KFR-72L/CE2,SN也有了,还得明确一下产品的分类属于哪种。

@Issues-translate-bot
Copy link

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


So this is not the default AC type for air conditioners?
It may be that the device type needs to be further determined, so that Device Type and SN can filter out accurate product information.

Is this an air conditioner with humidification function? Not a traditional air conditioning device?
What are the product category names displayed in the Mercure app?
From your description, the product model should be KFR-72L/CE2, and SN is also available. You need to clarify which category the product belongs to.

@yang605256182
Copy link
Author

那就是这个不属于空调默认的AC类型? 那可能设备类型得进一步确定一下才行,Device Type和SN才能过滤出来准确的产品信息。

你这个是带加湿功能的空调?不属于传统的空调设备? 美居app里的产品品类名字显示的叫啥? 从你的描述看,产品型号应该是KFR-72L/CE2,SN也有了,还得明确一下产品的分类属于哪种。

是的,是带有加湿功能的空调。美的APP产品品类叫做立柜式空调。

@Issues-translate-bot
Copy link

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


So this is not the default AC type of air conditioner? It may be that the device type needs to be further determined, so that Device Type and SN can filter out accurate product information.

Is this an air conditioner with humidification function? Not a traditional air conditioning device? What are the product category names displayed in the Mercure app? From your description, the product model should be KFR-72L/CE2, and SN is also available. You need to clarify which category the product belongs to.

Yes, it is an air conditioner with humidification function. The product category of Midea APP is called vertical cabinet air conditioner.

@wuwentao
Copy link
Owner

step 1. 局域网任意PC安装midea-local库: pip3 install -U midea-local (看看是否linux主机,是否需要加sudo执行,或者使用pip命令代替pip3,根据实际情况选择吧)

step 2: 在局域网尝试discover设备: python3 -m midealocal.cli discover -d --host 192.168.x.x 修改这个ip地址为你设备对应的IP地址,还请将执行中打印的debug信息,复制并保存为log文件,以附件上传一下吧,感谢。

如果step2执行有报错,可以尝试指定美居的用户名和密码试试,例如 python3 -m midealocal.cli discover -d --cloud-name 美的美居 --username your_username --password your_password --host 192.168.x.x 修改为你的账号和密码即可。

@Issues-translate-bot
Copy link

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


step 1. Install the midea-local library on any PC in the LAN: pip3 install -U midea-local (Check if it is a Linux host, whether you need to add sudo to execute, or use the pip command instead of pip3, choose according to the actual situation)

step 2: Try to discover the device on the LAN: python3 -m midealocal.cli discover -d --host 192.168.x.x Modify this IP address to the IP address corresponding to your device. Please also copy the debug information printed during execution and Save it as a log file and upload it as an attachment. Thank you.

If there is an error when executing step 2, you can try specifying the user name and password of Meiju, for example, python3 -m midealocal.cli discover -d --cloud-name Midea Meiju --username your_username --password your_password --host 192.168. Just change x.x to your account number and password.

@yang605256182
Copy link
Author

step 1. 局域网任意PC安装midea-local库: pip3 install -U midea-local (看看是否linux主机,是否需要加sudo执行,或者使用pip命令代替pip3,根据实际情况选择吧)

step 2: 在局域网尝试discover设备: python3 -m midealocal.cli discover -d --host 192.168.x.x 修改这个ip地址为你设备对应的IP地址,还请将执行中打印的debug信息,复制并保存为log文件,以附件上传一下吧,感谢。

如果step2执行有报错,可以尝试指定美居的用户名和密码试试,例如 python3 -m midealocal.cli discover -d --cloud-name 美的美居 --username your_username --password your_password --host 192.168.x.x 修改为你的账号和密码即可。

谢谢,大佬的指导。按照您的提示,进行了操作。指定了美的美居的账号密码也是一样的报错。在HA下ping了该地址是没有问题的。
~ $ python3 -m midealocal.cli discover -d --host 192.168.1.84
2024-08-28 19:16:20.205 DEBUG (MainThread) [midealocal.discover] All addresses for broadcast: ['192.168.1.84']
2024-08-28 19:16:25.212 ERROR (MainThread) [cli] No devices found.

@wuwentao
Copy link
Owner

任何数据包都无法收到,那这个设备看起来使用的并非现有的控制协议和标准,可能有点麻烦了,用不了现有的方案。

可以尝试使用其他端口扫描工具,例如nmap之类的,扫描一下这个ip上开放的端口和服务等。

@Issues-translate-bot
Copy link

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


If no data packets are received, it seems that this device does not use the existing control protocols and standards. It may be a bit troublesome and the existing solution cannot be used.

You can try using other port scanning tools, such as nmap, to scan the open ports and services on this IP.

@yang605256182
Copy link
Author

任何数据包都无法收到,那这个设备看起来使用的并非现有的控制协议和标准,可能有点麻烦了,用不了现有的方案。

可以尝试使用其他端口扫描工具,例如nmap之类的,扫描一下这个ip上开放的端口和服务等。

使用 nmap -A -Pn 192.168.1.84命令尝试了扫面得到如下信息
Starting Nmap 7.95 ( https://nmap.org ) at 2024-08-29 22:21 中国标准时间
Nmap scan report for 192.168.1.84 (192.168.1.84)
Host is up (0.030s latency).
All 1000 scanned ports on 192.168.1.84 (192.168.1.84) are in ignored states.
Not shown: 1000 closed tcp ports (reset)
MAC Address: 00:25:92:2A:14:3D (Guangzhou Shirui Electronic)
Too many fingerprints match this host to give specific OS details
Network Distance: 1 hop

TRACEROUTE
HOP RTT ADDRESS
1 29.96 ms 192.168.1.84 (192.168.1.84)

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.08 seconds

@wuwentao
Copy link
Owner

没有扫描到开放的端口,不过mac地址已经显示不是美的了。
确定设备ip地址没有错的话,试试nmap指定端口1-65535,直接进行扫描,会耗时长点。
搜一下网上的命令吧,我也记不住了我,也是搜索复制粘贴

@Issues-translate-bot
Copy link

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


No open ports were scanned, but the mac address already showed that it was not beautiful.
If you are sure that the device IP address is correct, try nmap to specify port 1-65535 and scan directly, which will take longer.
Search the Internet for commands. I can’t remember them either. I also searched for copy and paste.

@yang605256182
Copy link
Author

和美的确认了一下,该空调在设计上和其他空调不同。IP地址是没有问题的。经过不断的尝试,扫描到了一个服务端口。使用的扫描命令为:nmap -p - -T3 192.168.1.84。具体信息如下:
Starting Nmap 7.95 ( https://nmap.org ) at 2024-08-31 17:26 中国标准时间
Nmap scan report for 192.168.1.84 (192.168.1.84)
Host is up (0.019s latency).
Not shown: 65534 closed tcp ports (reset)
PORT STATE SERVICE
6888/tcp open muse
MAC Address: 00:25:92:2A:14:3D (Guangzhou Shirui Electronic)

Nmap done: 1 IP address (1 host up) scanned in 285.27 seconds

@wuwentao
Copy link
Owner

wuwentao commented Sep 2, 2024

@yang605256182 是的,目前看,端口号可能都完全不一样了。那大概率协议可能也不一样。

你可以先试试看做如下源码的修改:
参考这个在线文件源码:
https://github.com/rokam/midea-local/blob/8610f1e1b728e1c87be81ed2bfa109256c173bc1/midealocal/discover.py#L246
第246和247行里面的2个数字,代表端口,分别是6445和20086,而你的设备目前使用的是6888,你直接把246行的6445修改成6888(修改方法看最后),然后尝试执行python3 -m midealocal.cli discover -d --host 192.168.1.84
看看是否可以发现设备信息。

**修改源码的方法:**任意PC机,windows,linux或者mac都可以,安装python3即可,然后pip3 install -U midea-local确保已经安装了midea-local
装完以后,使用pip3 show midea-localpip show midea-local查看安装的版本,里面包含安装的路径,即可使用root(sudo)或者管理员权限修改,上面的路径之后,应该好需要 进入midealocal子文件夹, 然后修改里面的discover.py的第246行即可。

@yang605256182
Copy link
Author

python3 -m midealocal.cli discover -d --host 192.168.1.84
十分感谢大佬的指导。通过修改端口并不能发现设备。所以尝试了对美的美居进行抓包获取到了一些信息。我整理了一些信息出来:
proType:0xAC,
deviceId:211106233663789
uid:69c40fdedde44260897b1503fe8b2b6f

@Issues-translate-bot
Copy link

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


python3 -m midealocal.cli discover -d --host 192.168.1.84
Thank you very much for your guidance. The device cannot be discovered by modifying the port. So I tried to capture the packets of Midea and got some information. I compiled some information:
proType:0xAC,
deviceId:211106233663789
uid:69c40fdedde44260897b1503fe8b2b6f

@wuwentao
Copy link
Owner

wuwentao commented Sep 7, 2024

@yang605256182
那这就比较麻烦了,因为不属于已知设备或已知协议,那适配起来可能费劲一些了。
核心问题在于如何连接设备,以及如何控制设备的通讯协议。原有的标准具体不清楚如何来的了,但是基本适用绝大部分设备吧,国内新款美居开始改认证方式了,但是控制方式应该未做调整。

你这个看起来是新的模式和新的协议,有可能是美的新做的物模型2.0版本协议,都需要美的官方授权和认证才能实现双向通讯,可能比较尴尬。
另外,美居正常应该是加密的ssl报文吧,你是Android客户端?能获取到未加密的报文?还是MITM以后获取到的一些信息?
这个类型,deviceid,uid可能意义不大,需要完整的交互过程、字段、流程等。

@Issues-translate-bot
Copy link

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


@yang605256182
Then this is more troublesome, because it does not belong to a known device or a known protocol, so it may be more difficult to adapt.
The core issue is how to connect the device and how to control the device's communication protocol. I don’t know exactly how the original standards came about, but they are basically applicable to most devices. The new domestic Mercure has begun to change the certification method, but the control method should not be adjusted.

Yours seems to be a new model and new protocol. It may be Midea's new object model version 2.0 protocol. Both require official authorization and certification from Midea to achieve two-way communication, which may be embarrassing.
In addition, Mercure should normally use encrypted SSL messages. Are you an Android client? Can unencrypted messages be obtained? Or is it some information obtained by MITM in the future?
For this type, deviceid and uid may not mean much, and a complete interaction process, fields, processes, etc. are required.

@yang605256182
Copy link
Author

@yang605256182 那这就比较麻烦了,因为不属于已知设备或已知协议,那适配起来可能费劲一些了。 核心问题在于如何连接设备,以及如何控制设备的通讯协议。原有的标准具体不清楚如何来的了,但是基本适用绝大部分设备吧,国内新款美居开始改认证方式了,但是控制方式应该未做调整。

你这个看起来是新的模式和新的协议,有可能是美的新做的物模型2.0版本协议,都需要美的官方授权和认证才能实现双向通讯,可能比较尴尬。 另外,美居正常应该是加密的ssl报文吧,你是Android客户端?能获取到未加密的报文?还是MITM以后获取到的一些信息? 这个类型,deviceid,uid可能意义不大,需要完整的交互过程、字段、流程等。

不太清楚加密后是什么样子。目前所有信息和状态都可以抓到。是安卓客户端。对于通讯和协议这块我不太懂~

@Issues-translate-bot
Copy link

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


@yang605256182 Then this is more troublesome, because it does not belong to a known device or a known protocol, so it may be more difficult to adapt. The core issue is how to connect the device and how to control the device's communication protocol. I don’t know exactly how the original standards came about, but they are basically applicable to most devices. The new domestic Mercure has begun to change the certification method, but the control method should not be adjusted.

Yours seems to be a new model and new protocol. It may be Midea’s new object model version 2.0 protocol. Both require official authorization and certification from Midea to achieve two-way communication, which may be embarrassing. In addition, Mercure should normally use encrypted SSL messages. Are you an Android client? Can unencrypted messages be obtained? Or is it some information obtained by MITM in the future? For this type, deviceid and uid may not mean much, and a complete interaction process, fields, processes, etc. are required.

Not sure what it looks like after encryption. Currently all information and status can be captured. It is an Android client. I don’t know much about communication and protocols~

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

No branches or pull requests

3 participants