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

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

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

  [复制链接]

0

主题

3

帖子

24

积分

新手上路

Rank: 1

积分
24
金钱
21
HASS币
0
发表于 2021-9-3 09:21:52 | 显示全部楼层
感谢楼主
回复

使用道具 举报

0

主题

6

帖子

48

积分

新手上路

Rank: 1

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

绝了,换了电脑也是一样不行,后面脑洞大开,也许不是电脑问题是空调,毕竟你说你的同型号能用,我把空调拔电了,再插上...midea-discover就好了,感谢老哥!
其他后来的老哥们 也可以试试这个,如果确定有老哥同型号能用,在同一网络下,还是找不到或者不通,可以试试拔电空调哈哈哈

华菱N8HE1 ,可用!
回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-9-3 16:24:13 | 显示全部楼层
a602646509 发表于 2021-9-3 08:20
midea-discover -d
INFO:msmart.cliebug mode active
INFO:msmart.cli:msmart version: 0.1.34 Currently ...

这数据有点意思,是192.168.1.4返回的数据
但数据前面4个byte是IP地址 2501a8c0 是 192.168.1.37
看来不能信任数据中返回的IP地址
回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-9-3 16:26:25 | 显示全部楼层
wzdldx0420 发表于 2021-8-29 22:48
感谢,家里一个爱青春2已经好用了,但是新买的风观还是不行,具体表现为hassio里面操作时候实体属性正常有 ...

给 midea-discover 的输出,另外新版本已经是 0.1.35了
回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-9-3 16:27:37 | 显示全部楼层
chenquanhao 发表于 2021-8-29 22:47
midea-discover -a YOUR_ACCOUNT -p YOUR_PASSWORD

Usage: midea-discover [OPTIONS]

直接使用 midea-discover 即可
回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-9-3 16:29:35 | 显示全部楼层
magicwolf 发表于 2021-8-29 22:56
楼主大神,可以这样设置吗?好像没反应

不知道 没用过空调自动化
回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2021-9-3 16:30:52 | 显示全部楼层
sctale 发表于 2021-8-17 07:18
大神,我是美的v2的空调,之前在旧平台上成功了一次就一直不行了。昨天我从Debian+N大一键安装切换到了HASS ...

升级最新版本
回复

使用道具 举报

2

主题

24

帖子

360

积分

中级会员

Rank: 3Rank: 3

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

我用安卓手机装他推荐那个美居APP,adb连接手机,操作时候进行抓包
回复

使用道具 举报

0

主题

4

帖子

65

积分

注册会员

Rank: 2

积分
65
金钱
61
HASS币
0
发表于 2021-9-13 02:54:20 | 显示全部楼层
找到了一个token 可以控制,但是奇怪的是还有两台一样规格型号的空调搜不到,现在用midea-discover搜索不到任何设备,midea-discover直接报错
root@smarthomefansbox: ~aroot@smarthomefansbox:~# midea-discover
INFO:msmart.cli:msmart version: 0.1.35 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast…
Traceback (most recent call last):
File “/usr/local/bin/midea-discover”, line 10, in
sys.exit(discover())
File “/usr/local/lib/python3.7/dist-packages/click/core.py”, line 1137, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/click/core.py”, line 1062, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.7/dist-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.7/dist-packages/click/core.py”, line 763, in invoke
return __callback(*args, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/msmart/cli.py”, line 43, in discover
found_devices = loop.run_until_complete(discovery.get_all())
File “/usr/lib/python3.7/asyncio/base_events.py”, line 584, in run_until_complete
return future.result()
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 179, in get_all
[self.result.add(task.result()) for task in tasks]
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 179, in
[self.result.add(task.result()) for task in tasks]
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 42, in support_test
_device = await self.support_testv3(account, password)
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 57, in support_testv3
token, key = await loop.run_in_executor(None, gettoken, udpid, account, password)
File “/usr/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 234, in gettoken
Client.login()
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 120, in login
‘password’: self.security.encryptPassword(self.login_id, self.password)
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 86, in api_request
self.handle_api_error(int(response[‘errorCode’]), response[‘msg’])
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 233, in handle_api_error
handler()
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 219, in throw
raise ValueError(error_code, message)
ValueError: (3101, ‘password error,please enter again.’)
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<scandevice.support_test() done, defined at /usr/local/lib/python3.7/dist-packages/msmart/scanner.py:40> exception=RecursionError(‘maximum recursion depth exceeded while calling a Python object’)>
Traceback (most recent call last):
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 42, in support_test
_device = await self.support_testv3(account, password)
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 57, in support_testv3
token, key = await loop.run_in_executor(None, gettoken, udpid, account, password)
File “/usr/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/dist-packages/msmart/scanner.py”, line 234, in gettoken
Client.login()
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 120, in login
‘password’: self.security.encryptPassword(self.login_id, self.password)
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 91, in api_request
return self.api_request(endpoint, args)
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 91, in api_request
return self.api_request(endpoint, args)
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 91, in api_request
return self.api_request(endpoint, args)
[Previous line repeated 959 more times]
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 86, in api_request
self.handle_api_error(int(response[‘errorCode’]), response[‘msg’])
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 233, in handle_api_error
handler()
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 210, in restart_full
self.get_login_id()
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 103, in get_login_id
‘loginAccount’: self.login_account
File “/usr/local/lib/python3.7/dist-packages/msmart/cloud.py”, line 78, in api_request
r = requests.post(url=url, data=data)
File “/usr/local/lib/python3.7/dist-packages/requests/api.py”, line 117, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/requests/api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/requests/sessions.py”, line 542, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/dist-packages/requests/sessions.py”, line 655, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py”, line 706, in urlopen
chunked=chunked,
File “/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py”, line 445, in _make_request
six.raise_from(e, None)
File “”, line 3, in raise_from
File “/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py”, line 440, in _make_request
httplib_response = conn.getresponse()
File “/usr/lib/python3.7/http/client.py”, line 1336, in getresponse
response.begin()
File “/usr/lib/python3.7/http/client.py”, line 330, in begin
self.headers = self.msg = parse_headers(self.fp)
File “/usr/lib/python3.7/http/client.py”, line 224, in parse_headers
return email.parser.Parser(_class=_class).parsestr(hstring)
File “/usr/lib/python3.7/email/parser.py”, line 68, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
File “/usr/lib/python3.7/email/parser.py”, line 57, in parse
feedparser.feed(data)
File “/usr/lib/python3.7/email/feedparser.py”, line 176, in feed
self._call_parse()
File “/usr/lib/python3.7/email/feedparser.py”, line 180, in _call_parse
self._parse()
File “/usr/lib/python3.7/email/feedparser.py”, line 295, in _parsegen
if self._cur.get_content_maintype() == ‘message’:
File “/usr/lib/python3.7/email/message.py”, line 594, in get_content_maintype
ctype = self.get_content_type()
File “/usr/lib/python3.7/email/message.py”, line 578, in get_content_type
value = self.get(‘content-type’, missing)
File “/usr/lib/python3.7/email/message.py”, line 471, in get
return self.policy.header_fetch_parse(k, v)
File “/usr/lib/python3.7/email/_policybase.py”, line 316, in header_fetch_parse
return self._sanitize_header(name, value)
File “/usr/lib/python3.7/email/_policybase.py”, line 287, in _sanitize_header
if _has_surrogates(value):
File “/usr/lib/python3.7/email/utils.py”, line 57, in _has_surrogates
s.encode()
RecursionError: maximum recursion depth exceeded while calling a Python object
回复

使用道具 举报

0

主题

27

帖子

329

积分

中级会员

Rank: 3Rank: 3

积分
329
金钱
302
HASS币
0
发表于 2021-9-17 18:49:29 | 显示全部楼层
可以用在洗衣机上吗。小天鹅的应该也是同样的协议
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-23 10:03 , Processed in 0.072031 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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