|
发表于 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 |
|