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

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

[插件集成] 美的空调-局域网协议控制[新协议已支持]

  [复制链接]

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-8-26 08:55:10 | 显示全部楼层
yingzaiha 发表于 2021-8-21 17:32
老铁怎么找到token K1的?我华为手机升级鸿蒙了,所以我用安卓模拟器半天也没找到token K1,有没有人用安 ...

新版本可以使用midea-discover获取token和k1
回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-8-26 08:56:32 | 显示全部楼层
活着就要折腾 发表于 2021-8-23 21:03
我按教程安装好插件,实体显示正常,但是各个功能调节都没有反应。我想可能是需要token K1,请教一下是你 ...

https://github.com/mac-zhou/midea-ac-py
回复

使用道具 举报

0

主题

5

帖子

62

积分

注册会员

Rank: 2

积分
62
金钱
56
HASS币
0
发表于 2021-8-29 14:09:15 | 显示全部楼层
本帖最后由 zjierr 于 2021-8-29 19:17 编辑

测试成功,感谢大神
回复

使用道具 举报

24

主题

885

帖子

5069

积分

论坛元老

Rank: 8Rank: 8

积分
5069
金钱
4179
HASS币
20
发表于 2021-8-29 22:47:40 | 显示全部楼层
midea-discover -a YOUR_ACCOUNT -p YOUR_PASSWORD

Usage: midea-discover [OPTIONS]
Try 'midea-discover --help' for help.

Error: no such option: -a
____________________________________________________________________
midea-discover YOUR_ACCOUNT YOUR_PASSWORD

Usage: midea-discover [OPTIONS]
Try 'midea-discover --help' for help.

Error: Got unexpected extra arguments (YOUR_ACCOUNT YOUR_PASSWORD)

___________________________________________________________________________________________
windows使用midea-discover命令出现以上报错,求正确的吃用方法。。另外,可以再发一下原本获取Token和 K1的步骤吗,当时没保存
回复

使用道具 举报

2

主题

77

帖子

927

积分

高级会员

Rank: 4

积分
927
金钱
850
HASS币
0
发表于 2021-8-29 22:48:58 | 显示全部楼层
本帖最后由 wzdldx0420 于 2021-8-29 22:54 编辑

感谢,家里一个爱青春2已经好用了,但是新买的风观还是不行,具体表现为hassio里面操作时候实体属性正常有变化,但是实际设备没有任何反应,报错具体如下:
2021-08-29 22:38:38 WARNING (SyncWorker_5) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:38:53 WARNING (SyncWorker_11) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:39:08 WARNING (SyncWorker_0) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:39:23 WARNING (SyncWorker_13) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:39:38 WARNING (SyncWorker_12) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:39:53 WARNING (SyncWorker_12) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:40:08 WARNING (SyncWorker_7) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01
2021-08-29 22:40:23 WARNING (SyncWorker_11) [msmart.device] Got Null from 10.0.1.151:6444 Version: 2 Count: 0 Time(s): 5.01

附带adb logcat日志如下:

I/jsLog   ( 9002):     "applianceID": "160528702984619",

I/jsLog   ( 9002):     "deviceSn": "00000031122012515171807D04220000",

I/jsLog   ( 9002):     "deviceType": "0xAC",

I/jsLog   ( 9002):     "deviceSubType": "44204",

I/jsLog   ( 9002):     "applianceSubtype": "44204",

I/jsLog   ( 9002):     "mac": "null",

I/jsLog   ( 9002):     "deviceBtToken": "null",

I/jsLog   ( 9002):     "canBleTransport": "0",

I/jsLog   ( 9002):     "moduleType": "",

I/jsLog   ( 9002):     "ssid": "midea_AC_0000",

I/jsLog   ( 9002):     "deviceName": "风观",

I/jsLog   ( 9002):     "productName": "",

I/jsLog   ( 9002):     "deviceSn8": "22012515",

I/jsLog   ( 9002):     "isOnline": "1",

I/jsLog   ( 9002):     "roomId": "11344480",

I/jsLog   ( 9002):     "roomName": "次卧",

I/jsLog   ( 9002):     "masterId": "",

I/jsLog   ( 9002):     "homeName": "2725的家"

I/jsLog   ( 9002):   }

回复

使用道具 举报

14

主题

120

帖子

927

积分

高级会员

Rank: 4

积分
927
金钱
807
HASS币
0
发表于 2021-8-29 22:56:15 来自手机 | 显示全部楼层
楼主大神,可以这样设置吗?好像没反应
Screenshot_2021-08-29-18-47-39-120_io.homeassistant.companion.android.minimal.jpg
回复

使用道具 举报

1

主题

42

帖子

411

积分

中级会员

Rank: 3Rank: 3

积分
411
金钱
369
HASS币
0
发表于 2021-9-1 09:41:02 | 显示全部楼层
支持 MSGW-GA014S 网关么?
回复

使用道具 举报

0

主题

6

帖子

48

积分

新手上路

Rank: 1

积分
48
金钱
42
HASS币
0
发表于 2021-9-3 08:20:34 | 显示全部楼层
midea-discover -d
INFO:msmart.cliebug mode active
INFO:msmart.cli:msmart version: 0.1.34 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast...
DEBUG:msmart.cli:Midea Local Data 192.168.1.4 837000c8200f00005a5a0111b8007a8000000000c34a1408030915149328500000930000000000000000018000000000d9830e7fae9e918aabe270ab656ba2d0fdba7a9a37a444029b16d942de8e0afe1a333ebba87653f92d9ef439c6f398e22fbcb59276386cc56cb91f03d198dff24f1abb84521dfd8c6c5b2cf23f2b69a1ec9e3302bd25847b43a3dc38e515b6e84bdfb3e16e33d88768cc4c3d0658937d96fbcce99f70c976413c2f05f60f82e7fc14ae95eb37b1fd423b2445d96daf46e0e420d90a39799403cb10de8026fd17
DEBUG:msmart.cliecrypt Reply: 192.168.1.4 2501a8c02c19000030303030303033313232323034303032333138313230353430313730303030300d6d696465615f61635f303137300000870002000000000000000000ac00acac0000000004d6f444d4c8150016262113000300000000000000000000000000000000000000000000000000000000000000000000
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443
DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "OST /v1/user/login/id/get HTTP/1.1" 200 None
DEBUG:msmart.cloud:Response: {"msg":"ok","result":{"loginId":"edd8f0ec-b50f-4633-a2e5-fde588cdf98a"},"errorCode":"0"}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443
DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "OST /v1/user/login HTTP/1.1" 200 None
DEBUG:msmart.cloud:Response: {"msg":"ok","result":{"originPrivateVersion":"","nickname":"[email protected]","sessionId":"6cbbfc5289d64f00bf245ee392664b5920210903002014254","accessToken":"c31833e31af979be0d2220eea650d848b920ebb829d567559397ded751813801","userId":"4826094","versionCode":"","leftCount":""},"errorCode":"0"}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443
DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "OST /v1/iot/secure/getToken HTTP/1.1" 200 None
DEBUG:msmart.cloud:Response: {"result":{"tokenlist":[{"udpId":"de6dcd0c11941e51a60c0172e9503637","key":"B68827A1D26347A4B56B80A2C2B80324DB18872F12184558A3159B1C8B56E626","token":"167C5EF5287FB39A49AD6316244136E33C515CE4173C73F10C867B3FD050DCEB7A1294F4F2C3798EC95DD92F4F52102192EB875F5D0F1756D0D08D47EE5B8F76"}]},"msg":"ok","errorCode":"0"}
DEBUG:msmart.lan:Attempting new connection to 192.168.1.37:6444
ERROR:msmart.lan:Connect Error: 192.168.1.37:6444 timed out
ERROR:msmart.lan:Sokcet is None: 192.168.1.37:6444
ERROR:msmart.security:unexpected data length
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443
DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "OST /v1/iot/secure/getToken HTTP/1.1" 200 None
DEBUG:msmart.cloud:Response: {"result":{"tokenlist":[{"udpId":"e0e420d90a39799403cb10de8026fd17","key":"9704CFA321E543778F29D34A8F8C1AE9574068202C9247428D79071DE3908732","token":"4E3695D7F0C1B82812818304E8F5B476550059B3A02B070E78BFAFC8DC2A146C7922CBB267F73FAAC1F8861C0BD0DAD6DB0A9C94F36FC2852484A407274A8FEE"}]},"msg":"ok","errorCode":"0"}
DEBUG:msmart.lan:Attempting new connection to 192.168.1.37:6444
ERROR:msmart.lan:Connect Error: 192.168.1.37:6444 [Errno 113] No route to host
ERROR:msmart.lan:Sokcet is None: 192.168.1.37:6444
ERROR:msmart.security:unexpected data length
DEBUG:msmart.command:Finalize request data: aa20ac00000000000003418100ff03ff0002000000000000000000000000120e4c
DEBUG:msmart.device:pkt_builder: 192.168.1.37:6444 len: 104 data: 5a5a01116800200000000000311214080309151493285000009300000000000000000000000000006b000a76e27eed2c3647e57d8602df8b5e41b98d2c559357bf4d969e4e51128683effae6ab2599d19aeb1af38245fca7ec5674f82c857d95bcd4c4444030b779
DEBUG:msmart.lan:Socket None -> 192.168.1.37:6444 retries: 0 time: 8.01940107345581 Closed, Create New Socket
DEBUG:msmart.lan:Attempting new connection to 192.168.1.37:6444
ERROR:msmart.lan:Connect Error: 192.168.1.37:6444 timed out
ERROR:msmart.lan:Sokcet is None: 192.168.1.37:6444
ERROR:msmart.security:unexpected data length


华菱N8HE1,搜索空调的ip 但是好像并不能连接6444端口呢

我尝试下
回复

使用道具 举报

14

主题

120

帖子

927

积分

高级会员

Rank: 4

积分
927
金钱
807
HASS币
0
发表于 2021-9-3 08:39:21 来自手机 | 显示全部楼层
a602646509 发表于 2021-9-3 08:20
midea-discover -d
INFO:msmart.cliebug mode active
INFO:msmart.cli:msmart version: 0.1.34 Currently ...

我的空调同型号,没有问题
回复

使用道具 举报

0

主题

6

帖子

48

积分

新手上路

Rank: 1

积分
48
金钱
42
HASS币
0
发表于 2021-9-3 08:41:30 | 显示全部楼层
magicwolf 发表于 2021-9-3 08:39
我的空调同型号,没有问题

我试试换个电脑 获取下id
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-23 09:24 , Processed in 0.090582 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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