『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: involute

跟美的死磕-美的局域网集成-2023.9.2-v0.3.19

  [复制链接]

0

主题

11

帖子

143

积分

注册会员

Rank: 2

积分
143
金钱
132
HASS币
0
发表于 2022-6-21 15:58:00 | 显示全部楼层
involute 发表于 2022-6-21 15:19
更新了一下,看看是否可以了

试了一下没发现问题,可以直接通过set_temperature服务来开启空调了
回复

使用道具 举报

13

主题

461

帖子

2441

积分

金牌会员

Rank: 6Rank: 6

积分
2441
金钱
1980
HASS币
0
发表于 2022-6-21 16:03:26 | 显示全部楼层
involute 发表于 2022-6-20 18:47
那个是室外机温度,得室外机开机时才有数据,比如制冷模式下

哦哦,那就是要在工作的时候这个才有数据
回复

使用道具 举报

6

主题

99

帖子

440

积分

中级会员

Rank: 3Rank: 3

积分
440
金钱
341
HASS币
0
发表于 2022-6-21 16:48:40 | 显示全部楼层
所有型号都能接入么?
回复

使用道具 举报

0

主题

4

帖子

50

积分

注册会员

Rank: 2

积分
50
金钱
46
HASS币
0
发表于 2022-6-21 17:24:15 | 显示全部楼层
下载了LZ的插件,用的docker版的homeassitant版本,空调是美的V3的,不能自动识别,但是用手动模式搞定了!谢谢楼主
回复

使用道具 举报

0

主题

5

帖子

45

积分

新手上路

Rank: 1

积分
45
金钱
40
HASS币
0
发表于 2022-6-21 21:30:11 | 显示全部楼层
involute 发表于 2022-6-21 15:28
这样, 附件的文件,你拿去替换一下midea_ac_lan/midea/目录下同名文件,重启HA,看看是否可以搜索到你的 ...

虽然能找到设备了,但是接下去就会报这个错:
Can't connect to Midea cloud to take device‘s key-info(Token and Key)

在log中看到这个error:
2022-06-21 21:25:59 ERROR (MainThread) [custom_components.midea_ac_lan.state_manager] Connection authException error 

尝试把const.py中的默认账号信息换了自己的账号也还是不行
回复

使用道具 举报

20

主题

550

帖子

3603

积分

元老级技术达人

积分
3603
金钱
3013
HASS币
210

教程狂人突出贡献

 楼主| 发表于 2022-6-21 22:05:52 | 显示全部楼层
gyorai 发表于 2022-6-21 21:30
虽然能找到设备了,但是接下去就会报这个错:

在log中看到这个error:

如果是验证错误,下边这个错误会连出两遍,
你看到了几遍?

请打开调试模式,然后启动后添加设备,并且把相关日志都提供给我,这个错误可能不是你想象的那样,而是设备类型的问题。
回复

使用道具 举报

20

主题

550

帖子

3603

积分

元老级技术达人

积分
3603
金钱
3013
HASS币
210

教程狂人突出贡献

 楼主| 发表于 2022-6-21 22:07:28 | 显示全部楼层
gyorai 发表于 2022-6-21 14:58
INFO:msmart.cli:*** Found a device: {'name': 'midea_cc_0260', 'ssid': 'midea_cc_0260', 'ip': '192.1 ...

对了,你用msmart的token和key,可以正常接入吗?
回复

使用道具 举报

0

主题

5

帖子

45

积分

新手上路

Rank: 1

积分
45
金钱
40
HASS币
0
发表于 2022-6-21 22:21:21 | 显示全部楼层
involute 发表于 2022-6-21 22:07
对了,你用msmart的token和key,可以正常接入吗?

不行,之前用msmart就不成功
添加设备的日志在这里:
2022-06-21 22:03:35 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] Devices found: {160528703186992: {'id': 160528703186992, 'ip': '192.168.51.210', 'port': 6444, 'model': 'K86EB', 'protocol': 3}, 164926749962169: {'id': 164926749962169, 'ip': '192.168.51.238', 'port': 6444, 'model': 'K86EB', 'protocol': 3}, 196812581471476: {'id': 196812581471476, 'ip': '192.168.51.121', 'port': 6444, 'model': '02BWF', 'protocol': 3}}
2022-06-21 22:04:34 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] Now config device {'id': 160528703186992, 'ip': '192.168.51.210', 'port': 6444, 'model': 'K86EB', 'protocol': 3}
2022-06-21 22:04:35 DEBUG (MainThread) [custom_components.midea_ac_lan.midea.mideacloud] Response: b'{"code":"0","msg":"ok","data":{"loginId":"896d66a7-ff49-4ee1-8994-5fe6eca2"}}'
2022-06-21 22:04:36 DEBUG (MainThread) [custom_components.midea_ac_lan.midea.mideacloud] Response: b'{"code":0,"msg":"\xe6\x88\x90\xe5\x8a\x9f","data":{"randomData":"cdd0c20be6a9e8b0733b445548114c937bc5c231706f0e9841eff5fe799e51e1","uid":"22dab43d5953a003ccc5a9871dc70416","accountId":"5817794331","nickname":"***@gmail.com","mdata":{"tokenPwdInfo":{"tokenPwd":"31f02f46bd1447f4b78b0e9993a37297","expiredDate":1658412276102,"createDate":1655820276102},"userInfo":{"sourceId":"mj_12345","empId":"4817945442915328","address":"","gender":"0","mobile":"***@gmail.com","userDeptInfoList":null,"extras":null,"nameEn":null,"employeeNumber":null,"headPhoto":null,"uid":"22dab43d5953a003ccc5a9871dc70416","name":"***@gmail.com","email":null},"doDeviceBind":null,"accessToken":"T1bfu098uy2o3lbbf","signUnlockEnabled":null},"accessToken":"b770d484011d6fbcfaa695907c823b48afdcb89aab60e5d1d3eb9e143e5cf098","userId":"7286770415617","email":"***@gmail.com"}}'
2022-06-21 22:04:36 DEBUG (MainThread) [custom_components.midea_ac_lan.midea.mideacloud] Response: b'{"msg":"ok","code":"0","data":{"tokenlist":[{"udpId":"24de86420a894e22c782fa8c14eed1fd","key":"29CAD3BE476640C7BD139A2052F6E851457F185B1D4042E7AA9EDDB61A9933C8","token":"7B919C8D5D67F5E413C0168A283F0CD8AE31B4C158A0265DA33E1B3F4D43A3D5563B526CFB926E8DDB1715448EB250C2F44E38EBCF34F57493B29D1062AE5748"}]}}'
2022-06-21 22:04:36 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] Successful to take token and key, token = 7B919C8D5D67F5E413C0168A283F0CD8AE31B4C158A0265DA33E1B3F4D43A3D5563B526CFB926E8DDB1715448EB250C2F44E38EBCF34F57493B29D1062AE5748, key = 29CAD3BE476640C7BD139A2052F6E851457F185B1D4042E7AA9EDDB61A9933C8, byte_order_big = True
2022-06-21 22:04:36 DEBUG (MainThread) [custom_components.midea_ac_lan.state_manager] Try to connect to device 160528703186992
2022-06-21 22:04:36 DEBUG (MainThread) [custom_components.midea_ac_lan.state_manager] Device 160528703186992 connected at socket <socket.socket fd=21, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.51.125', 50514), raddr=('192.168.51.210', 6444)>
2022-06-21 22:04:37 DEBUG (MainThread) [custom_components.midea_ac_lan.state_manager] Authenticated
2022-06-21 22:04:37 DEBUG (MainThread) [custom_components.midea_ac_lan.midea.command] Send message: {'header': 'aa23ac00000000000003', 'body': '418100ff03ff0002000000000000000000000000000000db', 'type': 833}
2022-06-21 22:05:07 DEBUG (MainThread) [custom_components.midea_ac_lan.state_manager] Socket connect timed out
2022-06-21 22:05:08 DEBUG (MainThread) [custom_components.midea_ac_lan.midea.mideacloud] Response: b'{"msg":"ok","code":"0","data":{"tokenlist":[{"udpId":"dd062f489e1674695e18ea5cd1911da2","key":"105EE541B89E4879B846A92D66B529BF8D3A3B22FBA9424FB6E5F23DAEA5255B","token":"77D54E7D43CBA256763D615A174227F27E0E7EDECEDD99E46800A3F601000D0780F401840DEE884A1DE1B70A93F243FD0E2D43231C24F8E0AE0C66168EB87078"}]}}'
2022-06-21 22:05:08 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] Successful to take token and key, token = 77D54E7D43CBA256763D615A174227F27E0E7EDECEDD99E46800A3F601000D0780F401840DEE884A1DE1B70A93F243FD0E2D43231C24F8E0AE0C66168EB87078, key = 105EE541B89E4879B846A92D66B529BF8D3A3B22FBA9424FB6E5F23DAEA5255B, byte_order_big = False
2022-06-21 22:05:08 DEBUG (MainThread) [custom_components.midea_ac_lan.state_manager] Try to connect to device 160528703186992
2022-06-21 22:05:08 DEBUG (MainThread) [custom_components.midea_ac_lan.state_manager] Device 160528703186992 connected at socket <socket.socket fd=21, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.51.125', 50516), raddr=('192.168.51.210', 6444)>
2022-06-21 22:05:08 ERROR (MainThread) [custom_components.midea_ac_lan.state_manager] Connection authException error 
回复

使用道具 举报

20

主题

550

帖子

3603

积分

元老级技术达人

积分
3603
金钱
3013
HASS币
210

教程狂人突出贡献

 楼主| 发表于 2022-6-21 22:33:11 | 显示全部楼层
gyorai 发表于 2022-6-21 22:21
不行,之前用msmart就不成功
添加设备的日志在这里:

果如我估计,不是验证授权的事,第一次已经显示Authenticated了,不过是发的消息没回复。

我给你发个文件,你替换原midea_ac_lan/midea/目录下同名文件,然后重启,添加设备,看看有什么区别吗?
command.py (5.11 KB, 下载次数: 3)
回复

使用道具 举报

0

主题

5

帖子

45

积分

新手上路

Rank: 1

积分
45
金钱
40
HASS币
0
发表于 2022-6-21 23:23:19 | 显示全部楼层
involute 发表于 2022-6-21 22:33
果如我估计,不是验证授权的事,第一次已经显示Authenticated了,不过是发的消息没回复。

我给你发个文 ...

这次能添加设备进去了,但是控制不了,开机什么都不行,操作一次就显示以下的信息
2022-06-21 23:21:14 DEBUG (SyncWorker_3) [custom_components.midea_ac_lan.midea.command] Send message: {'header': 'aa23cc00000000000002', 'body': '40c0046602ff02300000000000000000000000000000008e', 'type': 576}
2022-06-21 23:21:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.message_parser] Message parsing header:aa22cc00000000000002, body:d0000000000000000000000000000000000000000000
2022-06-21 23:21:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Unknown message {'header': 'aa22cc00000000000002', 'body': 'None', 'type': 0}
2022-06-21 23:21:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Received message: {'header': 'aa22cc00000000000002', 'body': 'None', 'type': 0}
2022-06-21 23:21:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] {}
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Except socket.error <class 'OSError'> raised in socket.recv()
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Receive loop existed
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Ready to re-open device
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Try to connect to device 160528703186992
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Device 160528703186992 connected at socket <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.51.125', 50570), raddr=('192.168.51.210', 6444)>
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Authenticated
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.command] Send message: {'header': 'aa23cc00000000000003', 'body': '418100ff03ff0002000000000000000000000000000000bd', 'type': 833}
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.message_parser] Message parsing header:aa22cc00000000000003, body:d0000000000000000000000000000000000000000000
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Unknown message {'header': 'aa22cc00000000000003', 'body': 'None', 'type': 0}
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Received message: {'header': 'aa22cc00000000000003', 'body': 'None', 'type': 0}
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] {}
2022-06-21 23:21:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Ready to receive loop
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Except socket.error <class 'OSError'> raised in socket.recv()
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Receive loop existed
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Ready to re-open device
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Try to connect to device 160528703186992
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Device 160528703186992 connected at socket <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.51.125', 50572), raddr=('192.168.51.210', 6444)>
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Authenticated
2022-06-21 23:22:14 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.command] Send message: {'header': 'aa23cc00000000000003', 'body': '418100ff03ff00020000000000000000000000000000003f', 'type': 833}
2022-06-21 23:22:15 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.message_parser] Message parsing header:aa22cc00000000000003, body:d0000000000000000000000000000000000000000000
2022-06-21 23:22:15 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Unknown message {'header': 'aa22cc00000000000003', 'body': 'None', 'type': 0}
2022-06-21 23:22:15 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Received message: {'header': 'aa22cc00000000000003', 'body': 'None', 'type': 0}
2022-06-21 23:22:15 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] {}
2022-06-21 23:22:15 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Ready to receive loop
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Except socket.error <class 'OSError'> raised in socket.recv()
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Receive loop existed
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Ready to re-open device
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Try to connect to device 160528703186992
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Device 160528703186992 connected at socket <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.51.125', 50574), raddr=('192.168.51.210', 6444)>
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Authenticated
2022-06-21 23:22:44 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.command] Send message: {'header': 'aa23cc00000000000003', 'body': '418100ff03ff0002000000000000000000000000000000d9', 'type': 833}
2022-06-21 23:22:45 DEBUG (Thread-14) [custom_components.midea_ac_lan.midea.message_parser] Message parsing header:aa22cc00000000000003, body:d0000000000000000000000000000000000000000000
2022-06-21 23:22:45 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Unknown message {'header': 'aa22cc00000000000003', 'body': 'None', 'type': 0}
2022-06-21 23:22:45 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Received message: {'header': 'aa22cc00000000000003', 'body': 'None', 'type': 0}
2022-06-21 23:22:45 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] {}
2022-06-21 23:22:45 DEBUG (Thread-14) [custom_components.midea_ac_lan.state_manager] Ready to receive loop
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-22 11:33 , Processed in 0.057224 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表