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

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

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

  [复制链接]

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2020-6-16 16:25:47 | 显示全部楼层
liuybhb 发表于 2020-6-15 17:14
Traceback (most recent call last):
  File "/home/liuyb/.local/bin/midea-discover", line 5, in
    f ...

pip3 install pycryptodome
回复

使用道具 举报

6

主题

386

帖子

2045

积分

金牌会员

Rank: 6Rank: 6

积分
2045
金钱
1657
HASS币
0
发表于 2020-6-17 01:04:08 | 显示全部楼层
midea-discover
INFO:msmart.cli:Discovering devices with UDP Broadcast, press CTRL-C to quit...
ERROR:msmart.security:aes_decrypt error: ValueError('Padding is incorrect.') - data: 412653079b37a7820682f1ee8dd7a0e3436ba3330f3c3a84298cb9c043613216f642894fde83da99358c04066639a65eeac6a0bc1ac5427cc5e4402c4e880626
Traceback (most recent call last):
  File "/usr/local/bin/midea-discover", line 10, in <module>
    sys.exit(discover())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/msmart/cli.py", line 67, in discover
    m_type = m_ssid.split('_')[1]
IndexError: list index out of range

不知道啥原因
回复

使用道具 举报

0

主题

53

帖子

638

积分

高级会员

Rank: 4

积分
638
金钱
585
HASS币
0
发表于 2020-6-19 00:55:45 | 显示全部楼层
xx楼主分享,请问美的多联空调的网关ccm15能用么?
回复

使用道具 举报

35

主题

153

帖子

1078

积分

金牌会员

Rank: 6Rank: 6

积分
1078
金钱
925
HASS币
10
发表于 2020-6-20 00:51:44 | 显示全部楼层
mac_zhou 发表于 2020-6-10 15:09
2020年6月10日更新:
       msmart库更新到0.1.16版本,这个版本主要是新增了1个命令行midea-discover来发 ...

大神,我尝试用这个命令看看有什么发现。但是有错误。
bash-5.0# midea-discover
INFO:msmart.cli:Discovering devices with UDP Broadcast, press CTRL-C to quit...
ERROR:msmart.security:aes_decrypt error: ValueError('Padding is incorrect.') - data: 000000000000000087acefd2faa5bf012541d758dfbb8885469339f1df94ff6cef77e560f6e108cb56b8182ad3ccfefe6d10daf2601e4924b8d5b79d4d38abfe
Traceback (most recent call last):
  File "/usr/local/bin/midea-discover", line 8, in <module>
    sys.exit(discover())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/msmart/cli.py", line 67, in discover
    m_type = m_ssid.split('_')[1]
IndexError: list index out of range
bash-5.0# 


回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2020-6-21 16:12:41 | 显示全部楼层
执行 midea-discover -d 看看
回复

使用道具 举报

24

主题

356

帖子

4721

积分

元老级技术达人

积分
4721
金钱
4340
HASS币
120
发表于 2020-6-24 15:38:57 | 显示全部楼层
mac_zhou 发表于 2020-6-21 16:12
执行 midea-discover -d 看看

出现同样错误,一个3个美的设备,扫到了一个洗碗机,然后报错
bash-5.0# midea-discover
INFO:msmart.cli:Discovering devices with UDP Broadcast, press CTRL-C to quit...
INFO:msmart.cli:Midea Local Data 192.168.31.162 837000b8200f00005a5a0111a8007a800000000000000000000000008df6050000940000000000000000010000000000d867c91a1c2f328cb19ac374376f832f848c88b915b20793fd998edc6ba32028d5a000c6f8d5002dbb6ef17dca7bfac65f28ad965c9dd8a48126be3d33f1ab64382e5f4987940eb70e060fb4daabe0a7b145f7c35a79f600318b509addfaeade06c416020931f48926620dfe95e2311110789699b332e71f9533366a40b751e6c76a16eea8dcdfe7a373bfd275548952
ERROR:msmart.security:aes_decrypt error: ValueError('Padding is incorrect.') - data: d867c91a1c2f328cb19ac374376f832f848c88b915b20793fd998edc6ba32028d5a000c6f8d5002dbb6ef17dca7bfac65f28ad965c9dd8a48126be3d33f1ab64
Traceback (most recent call last):
  File "/usr/local/bin/midea-discover", line 8, in <module>
    sys.exit(discover())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/msmart/cli.py", line 76, in discover
    m_type = m_ssid.split('_')[1]
IndexError: list index out of range
回复

使用道具 举报

35

主题

153

帖子

1078

积分

金牌会员

Rank: 6Rank: 6

积分
1078
金钱
925
HASS币
10
发表于 2020-6-25 02:14:23 | 显示全部楼层
121665460 发表于 2020-6-24 15:38
出现同样错误,一个3个美的设备,扫到了一个洗碗机,然后报错

xd 应该是和我一样。扫到了美的的设备。但是数据加密不被支持就出错了。。
期待 楼主大显神威。。将美的一网打尽。。
我的报错如下:
bash-5.0# pip show msmart
Name: msmart
Version: 0.1.19
Summary: A library to control Midea appliances via the Local area network
Home-page: https://github.com/mac-zhou/midea-msmart
Author: mac_zhou
Author-email: [email protected]
License: UNKNOWN
Location: /usr/local/lib/python3.7/site-packages
Requires: pycryptodome
Required-by: 
bash-5.0# midea-discover -d
INFO:msmart.cli:Debug mode active
INFO:msmart.cli:Discovering devices with UDP Broadcast, press CTRL-C to quit...
INFO:msmart.cli:Midea Local Data 192.168.3.29 837000b8200f04055a5a0111a8007a80000000000000000000000000c204020000850000000000000000000000000000195610e33f8ad661d6bcf360d699751ce43a10d55b2c14f8dd337a30238b38c61d0fa9bf7435ce8fdc29858455ac912f32fc917cb459c4a3135aac7ca28ce027a74a0a46d69f23e8ae365d721dfba3998a0fa254619b8d2f622538cb2ff085ec06c416020931f48926620dfe95e231116d3c5561ee26ead19c5988051404fdb68f2c51de7e8ba309244b935150e8845d
ERROR:msmart.security:aes_decrypt error: ValueError('Padding is incorrect.') - data: 195610e33f8ad661d6bcf360d699751ce43a10d55b2c14f8dd337a30238b38c61d0fa9bf7435ce8fdc29858455ac912f32fc917cb459c4a3135aac7ca28ce027
Traceback (most recent call last):
  File "/usr/local/bin/midea-discover", line 8, in <module>
    sys.exit(discover())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/msmart/cli.py", line 76, in discover
    m_type = m_ssid.split('_')[1]
IndexError: list index out of range
回复

使用道具 举报

21

主题

463

帖子

2867

积分

金牌会员

Rank: 6Rank: 6

积分
2867
金钱
2404
HASS币
0
发表于 2020-6-28 18:19:02 | 显示全部楼层
本帖最后由 showphi 于 2020-6-28 19:07 编辑

运行midea-discover出错

pi@hassbian:~ $ midea-discover
Traceback (most recent call last):
  File "/usr/local/bin/midea-discover", line 6, in <module>
    from msmart.cli import discover
  File "/home/pi/.local/lib/python3.7/site-packages/msmart/cli.py", line 3, in <module>
    import click
ModuleNotFoundError: No module named 'click'
回复

使用道具 举报

5

主题

50

帖子

783

积分

高级会员

Rank: 4

积分
783
金钱
733
HASS币
0
发表于 2020-6-28 23:36:47 | 显示全部楼层
新买的空调,报错

2020-06-28 23:35:50 INFO (SyncWorker_21) [msmart.lan] Couldn't connect with Device 192.168.2.98:6444
回复

使用道具 举报

4

主题

37

帖子

420

积分

论坛积极会员

积分
420
金钱
383
HASS币
0
发表于 2020-6-28 23:51:42 | 显示全部楼层
5台美的空调,也是找了很久控制办法。
多谢mac_zhou的努力研究,虽然我这边还没接入成功

1. HA和空调必须在同一LAN下吗?(经测试确认,HA可以访问到6444端口)
2. midea_ac插件能否运行在HA0.103版本下?(配置无误,任何操作均报错timeout)
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 06:13 , Processed in 0.057835 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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