mac-zhou / midea-ac-py

Home Assistant Custom Integration for Midea Group(Hualing, Senville, Klimaire, AirCon, Century, Pridiom, Thermocore, Comfee, Toshiba, Carrier, Goodman, Friedrich, Samsung, Kenmore, Trane, Lennox, LG and much more) Air Conditioners via LAN.
MIT License
519 stars 101 forks source link

希望支持colmo中央空调 #203

Open jay1943000 opened 1 year ago

jay1943000 commented 1 year ago

Describe the solution you'd like (描述需求) A clear and concise description of what you want to happen. 家中使用的colmo中央空调, 目前只能使用美的美居控制,希望能介入ha

Screenshots / Logs / Pcap File(屏幕截图/日志/抓包文件) If applicable, add screenshots or your home-assistant log file or pcap file to help explain your problem. 请提交相关截图,日志,抓包让开发者能够更快的解决问题 使用midea-discover扫描结果如下, 貌似报错了

C:\Users\admin>midea-discover INFO:msmart.cli:msmart version: 0.2.5 Currently only supports ac devices, only support MSmartHome and 美的美居 APP. INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com/mas/v5/app/proxy?alias= False ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62677 -> 192.168.0.22:6444 retries: 0 time: 0.01 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62679 -> 192.168.0.34:6444 retries: 0 time: 0.04 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62682 -> 192.168.0.64:6444 retries: 0 time: 0.02 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62684 -> 192.168.0.46:6444 retries: 0 time: 0.06 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62688 -> 192.168.0.47:6444 retries: 0 time: 0.01 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62690 -> 192.168.0.41:6444 retries: 0 time: 0.04 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62695 -> 192.168.0.9:6444 retries: 0 time: 0.09 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62693 -> 192.168.0.43:6444 retries: 0 time: 0.02 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62698 -> 192.168.0.49:6444 retries: 0 time: 0.07 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:62700 -> 192.168.0.42:6444 retries: 0 time: 0.07 INFO:msmart.lan:Got TCP key for 192.168.0.70:62677 -> 192.168.0.22:6444 retries: 0 time: 10.47 tcp_key: 454ee048d9f3eff7077490a1a4d625ad1777547f1b89626bb497ba3352d7b25a INFO:msmart.lan:Got TCP key for 192.168.0.70:62679 -> 192.168.0.34:6444 retries: 0 time: 12.88 tcp_key: 8248d33a24523dd5fa322dcac444a3053887775e903eb9703dab1b200f35def5 INFO:msmart.lan:Got TCP key for 192.168.0.70:62682 -> 192.168.0.64:6444 retries: 0 time: 12.9 tcp_key: b8c0bbde4f9a0faebb79582804bad7d091148d2c45c80fcc54dc184206d7cbfa INFO:msmart.lan:Got TCP key for 192.168.0.70:62684 -> 192.168.0.46:6444 retries: 0 time: 13.12 tcp_key: 9ea00fa440549d0ae1ebdeaf23a6c81390f6b0b468041e7fb86836a0deb8cfae INFO:msmart.lan:Got TCP key for 192.168.0.70:62688 -> 192.168.0.47:6444 retries: 0 time: 12.62 tcp_key: 36f53c151dafe8b166457f9d43e415e4933a6c870f096edae3674308b6660bc4 INFO:msmart.lan:Got TCP key for 192.168.0.70:62690 -> 192.168.0.41:6444 retries: 0 time: 13.83 tcp_key: e89f995ed6728addd36c2d59002c19aa792df66ab9ae8f811843be656ce37d3b INFO:msmart.lan:Got TCP key for 192.168.0.70:62695 -> 192.168.0.9:6444 retries: 0 time: 12.91 tcp_key: 42af1c314417448f98fad6682724b325ef43f1c8318646891000f0fadd0f2f40 INFO:msmart.lan:Got TCP key for 192.168.0.70:62693 -> 192.168.0.43:6444 retries: 0 time: 13.52 tcp_key: a4e0c4dd5767eb29f39dbff11601561d272bcb3592a3e7a5dfebc8978c640fa4 INFO:msmart.lan:Got TCP key for 192.168.0.70:62698 -> 192.168.0.49:6444 retries: 0 time: 14.25 tcp_key: 4c49cf13eb64c4e4ba89439a14aa8b4063d53a45435eca5c16f957737b5f18b6 WARNING:msmart.device.base:Got Null from 192.168.0.46:6444 Version: 3 Count: 0 Spend time: 5.03 INFO:msmart.lan:Got TCP key for 192.168.0.70:62700 -> 192.168.0.42:6444 retries: 0 time: 15.06 tcp_key: a9b140e2302293ea358cf99655b33b322780692c4b28938aebf0895e24ed6d9a ERROR:msmart.device.AC.command:Payload 'bb600006061080808080050000dc050000aa050000000000808000840058190053016f05443e39200600aa05d6100000350000011f0100007805000000007805039f005802002feb080c00000000000000000000000031303030303048093030' failed CRC. Received: 0x30, Expected: 0xB9. ERROR:msmart.device.AC.command:Payload 'bb2800ffff1100000000880052663200000000320003640001785f52326600040000000000007dc0' failed CRC. Received: 0xC0, Expected: 0x0. ERROR:msmart.device.AC.command:Payload 'bb60000303108080808005000078050000780500000000008080008400581a00830115053c52640019007805f715000038000001f10600004605000000007805039f005802002fdd080d000000000000000000000000313030303030480a3030' failed CRC. Received: 0x30, Expected: 0x92. Traceback (most recent call last): File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "c:\Users\admin\AppData\Roaming\Python\Python39\Scripts\midea-discover.exe__main.py", line 7, in File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in call return self.main(*args, kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke return callback(*args, kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cli.py", line 51, in discover found_devices = loop.run_until_complete(discovery.get_all() if ip == '' else discovery.get(ip)) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\asyncio\base_events.py", line 647, in run_until_complete return future.result() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 193, in get_all await self._process_tasks(tasks) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 199, in _process_tasks [self.result.add(task.result()) for task in tasks] File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 199, in [self.result.add(task.result()) for task in tasks] File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 55, in support_test await loop.run_in_executor(None, _device.refresh) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 109, in refresh self._send_cmd(cmd) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 114, in _send_cmd self._process_response(response) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 124, in _process_response if response.id == ResponseId.State: File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\command.py", line 206, in id return self._id AttributeError: 'response' object has no attribute '_id' ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-9' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=AttributeError("'response' object has no attribute '_id'")> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 55, in support_test await loop.run_in_executor(None, _device.refresh) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 109, in refresh self._send_cmd(cmd) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 114, in _send_cmd self._process_response(response) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 124, in _process_response if response.id == ResponseId.State: File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\command.py", line 206, in id return self._id AttributeError: 'response' object has no attribute '_id' ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-11' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=AttributeError("'response' object has no attribute '_id'")> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 55, in support_test await loop.run_in_executor(None, _device.refresh) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 109, in refresh self._send_cmd(cmd) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 114, in _send_cmd self._process_response(response) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\appliance.py", line 124, in _process_response if response.id == ResponseId.State: File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\device\AC\command.py", line 206, in id return self._id AttributeError: 'response' object has no attribute '_id'

C:\Users\admin>midea-discover -a -p INFO:msmart.cli:msmart version: 0.2.5 Currently only supports ac devices, only support MSmartHome and 美的美居 APP. INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com/mas/v5/app/proxy?alias= False Traceback (most recent call last): File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "c:\Users\admin\AppData\Roaming\Python\Python39\Scripts\midea-discover.exe__main.py", line 7, in File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in call return self.main(*args, kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke return callback(*args, kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cli.py", line 51, in discover found_devices = loop.run_until_complete(discovery.get_all() if ip == '' else discovery.get(ip)) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\asyncio\base_events.py", line 647, in run_until_complete return future.result() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 193, in get_all await self._process_tasks(tasks) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 199, in _process_tasks [self.result.add(task.result()) for task in tasks] File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 199, in [self.result.add(task.result()) for task in tasks] File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-8' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-6' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-11' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-2' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 121, in api_request return self.api_request(endpoint, args) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 121, in api_request return self.api_request(endpoint, args) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-4' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-9' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-7' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-12' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-5' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError() RecursionError ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-10' coro=<scandevice.support_test() done, defined at C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py:47> exception=RecursionError()> Traceback (most recent call last): File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 50, in support_test _device = await self.support_testv3(account, password) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 65, in support_testv3 token, key = await loop.run_in_executor(None, gettoken, udpid, account, password) File "c:\users\admin\appdata\local\activestate\cache\0fb06db1\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\scanner.py", line 255, in gettoken Client.login() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 143, in login self.get_login_id() File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 132, in get_login_id response = self.api_request( File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\msmart\cloud.py", line 123, in api_request raise RecursionError()

mill1000 commented 1 year ago

The CRC errors have also been reported here #187.

You could try removing the check here https://github.com/mac-zhou/midea-msmart/blob/97723d055d8e5a3775eaaca96807f2dbbd6db2aa/msmart/device/AC/command.py#L178-L182

Don't know what that recursion error is about though.

jay1943000 commented 1 year ago

Thank you. I tried to delete these lines of code. This is the new report

INFO:msmart.cli:msmart version: 0.2.5 Currently only supports ac devices, only support MSmartHome and 美的美居 APP. INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com/mas/v5/app/proxy?alias= False ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52973 -> 192.168.0.56:6444 retries: 0 time: 0.02 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52976 -> 192.168.0.64:6444 retries: 0 time: 0.02 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52981 -> 192.168.0.34:6444 retries: 0 time: 0.03 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52984 -> 192.168.0.49:6444 retries: 0 time: 0.08 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52986 -> 192.168.0.46:6444 retries: 0 time: 0.08 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52989 -> 192.168.0.42:6444 retries: 0 time: 0.09 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52991 -> 192.168.0.9:6444 retries: 0 time: 0.08 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:52994 -> 192.168.0.15:6444 retries: 0 time: 0.04 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:53000 -> 192.168.0.47:6444 retries: 0 time: 0.05 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:53002 -> 192.168.0.43:6444 retries: 0 time: 0.02 ERROR:msmart.security:authentication failed ERROR:msmart.lan:Authentication failed for 192.168.0.70:53005 -> 192.168.0.41:6444 retries: 0 time: 0.01 INFO:msmart.lan:Got TCP key for 192.168.0.70:52973 -> 192.168.0.56:6444 retries: 0 time: 9.15 tcp_key: 14c857fe2285595bece4a75e6185597af052349d0930d130f27d2ff5d396d414 INFO:msmart.lan:Got TCP key for 192.168.0.70:52976 -> 192.168.0.64:6444 retries: 0 time: 9.61 tcp_key: 8dae6cfb7dedf593106ef8917f7e93908ba84d8bc07af8d989030a3cf752f04e INFO:msmart.lan:Got TCP key for 192.168.0.70:52981 -> 192.168.0.34:6444 retries: 0 time: 9.48 tcp_key: 78f14a46061f8b516366c8873de911dea32e268866ee8e10f7b109837a35a039 INFO:msmart.lan:Got TCP key for 192.168.0.70:52984 -> 192.168.0.49:6444 retries: 0 time: 9.38 tcp_key: 9bea666abeb728cb002273242525657bc38465e7689b246ba881033ab3c42e31 INFO:msmart.lan:Got TCP key for 192.168.0.70:52986 -> 192.168.0.46:6444 retries: 0 time: 9.55 tcp_key: a9918c2c48c158afe6b895a9aea44677f4287f55c76b50588bf164eb2650157a INFO:msmart.lan:Got TCP key for 192.168.0.70:52989 -> 192.168.0.42:6444 retries: 0 time: 9.37 tcp_key: 9bc4e497122efb77a815eaf58cf9d084d8cadd524164f7c16669303306b1a0aa INFO:msmart.lan:Got TCP key for 192.168.0.70:52991 -> 192.168.0.9:6444 retries: 0 time: 9.38 tcp_key: 30553079bed97a74140a2f7c414a3cdbfb9172b18079fb3f63aa928db9381a80 INFO:msmart.lan:Got TCP key for 192.168.0.70:52994 -> 192.168.0.15:6444 retries: 0 time: 9.35 tcp_key: 9b34613a5d9451d3eefdab91b6c1c2394ac39e383c98d9cb49130bb773923221 INFO:msmart.lan:Got TCP key for 192.168.0.70:53000 -> 192.168.0.47:6444 retries: 0 time: 9.34 tcp_key: cab4d418c10f32d472cceb7e9fa6c8e9d63bd4f27684bb759ed3875334adc9ed INFO:msmart.lan:Got TCP key for 192.168.0.70:53002 -> 192.168.0.43:6444 retries: 0 time: 9.33 tcp_key: f3c0c92c1868f2e9db7ad524b89cb401c1bbb76a6ed1f19fc2b2c7a1338a3de0 INFO:msmart.lan:Got TCP key for 192.168.0.70:53005 -> 192.168.0.41:6444 retries: 0 time: 9.11 tcp_key: 48f41dd2a19d5ad614996dcbd6521285668085fd7b8fd37f49ed14ebc2122761 WARNING:msmart.device.base:Got Null from 192.168.0.49:6444 Version: 3 Count: 0 Spend time: 5.02 WARNING:msmart.device.base:Got Null from 192.168.0.42:6444 Version: 3 Count: 0 Spend time: 5.03 WARNING:msmart.device.base:Got Null from 192.168.0.9:6444 Version: 3 Count: 0 Spend time: 5.02 INFO:msmart.cli: Found a device: {'name': 'midea_ac_0030', 'ssid': 'midea_ac_0030', 'ip': '192.168.0.46', 'port': 6444, 'id': 184717954089647, 'version': 3, 'token': 'EF378DB6004CAEA9258C5177A1265B0A0E7CCE48183F4CB88E1548E0AD02D39A05132309306FBB9A7B95FA99615D2C685E42107EBB0D2313C9F27D1D66C81293', 'key': 'daa919867a3644079bef0b05f354dcda0ec8e4faadd849f7b28a7d4557020dd4', 'type': 'ac', 'sn': '00031822396919172101600300000', 'model': '96919', 'support': True, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_db_0381', 'ssid': 'midea_db_0381', 'ip': '192.168.0.15', 'port': 6444, 'id': 190215512443206, 'version': 3, 'token': '23B9EF166D5BEBB2BEE9410021CD97FF03C02CD947AC0563CD5F33389577F36FE60E115CC731E2A6A3C606E57FA4D78070CB2DC87042BA53F024AE57968122B9', 'key': 'fff1f90984524bd8b4e5b99bb298d1370fb50936d64e4ec783929ebbee03a72c', 'type': 'db', 'sn': '0DB318381225471B115A003815VZH', 'model': '22547', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_e3_6102', 'ssid': 'midea_e3_6102', 'ip': '192.168.0.34', 'port': 6444, 'id': 177021372835901, 'version': 3, 'token': '85E82065DE6DC6A65D47F2E8F3070C2A0A3AD04BC81C6498AAF037587291FEE4D04335C58E1189B1C9D0B00B51FCAA8A352C44B3F8653ECE399269AC45221E33', 'key': '755b02c3a3d745d6a47a04032ec4de5b8169680cae314194a79b4607dfd3efbd', 'type': 'e3', 'sn': '0E3211511000181C171906102BFW8', 'model': '00018', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_dc_0161', 'ssid': 'midea_dc_0161', 'ip': '192.168.0.47', 'port': 6444, 'id': 190215512443203, 'version': 3, 'token': 'DC9D7B1C5977EDF525243011694289A50B30D6DE51E9C04E545AE4E965DC343C06FCF36524D6E2D2CFEE27B50152C19B6CE83F0164DD0438534669062F5A69B5', 'key': '5666a6c8ce92431ab21814b196953621b86cad3afc6042bea7c57d987fe2b327', 'type': 'dc', 'sn': '0DC3183820486117125A00161WTZM', 'model': '04861', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_ac_0054', 'ssid': 'midea_ac_0054', 'ip': '192.168.0.49', 'port': 6444, 'id': 189116000570024, 'version': 3, 'token': '5DF055BEA2E66C16AB3C4BD1EBDC21F39C339C53868644C1E85F65FB5449645C08D558D81AA4EC189D77CC0327E7BA72475D0E73E2E6512E38A75EEF8D943AE0', 'key': '61fc0ef32124435d9a8397b30d0600eb697e87771ba046f89a5662a9ed33cfa3', 'type': 'ac', 'sn': '00031822396925141201600540000', 'model': '96925', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_ed_0569', 'ssid': 'midea_ed_0569', 'ip': '192.168.0.41', 'port': 6444, 'id': 183618442614035, 'version': 3, 'token': '204E07EDA01B8B656C225BDB673822EEB641F62ABA330080ECE7428626B9D0925806D884AB4BA63CEC33C87863938BEEEC6CC23CB9A8E3B034EF1EC8E2C54CCF', 'key': '09730f7f3a334a78a65a7e648985802bada19653466440d1befd8745ce67b4cf', 'type': 'ed', 'sn': '0ED2186320084K21242U00569F4NY', 'model': '0084K', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_e1_0236', 'ssid': 'midea_e1_0236', 'ip': '192.168.0.64', 'port': 6444, 'id': 179220396184326, 'version': 3, 'token': 'DF54004DC9CB1B22A5D641D6291F48E615BE92619642CCB25D2C60965AA7050B38F86F72E39AE334DC8B9DA0A972F52ECC225DE5562607EBF611E02299DE1241', 'key': 'f93b545f6659452caa6d432af22dac2ed660773706da4067a76eb083144b4bf0', 'type': 'e1', 'sn': '0E1318760CDB311B191D00236GBNT', 'model': 'CDB31', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_b6_0258', 'ssid': 'midea_b6_0258', 'ip': '192.168.0.56', 'port': 6444, 'id': 189116000800575, 'version': 3, 'token': '7AC6B34025C07CB2E659EE805B0D3F8796091570125B7B0529E7921EA3796DD73271C348DD5608E92457DE25044CAD766E2540E691B22592F0F0F36E3AABCEEE', 'key': '822acd0984994587b460b081a17ecda04f652546fab841e9be533d2cb967c6cc', 'type': 'b6', 'sn': '0B6218XJP924W811033400258JH0W', 'model': '924W8', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_ac_0058', 'ssid': 'midea_ac_0058', 'ip': '192.168.0.9', 'port': 6444, 'id': 182518930828157, 'version': 3, 'token': '881AB0D570EA119DFF59D4FE7A1C12C411957D6B6C5D928E6BB451FABA04C8B28C41B6E82D9766E7BC2E47D4BF27CCBA0605DE381276343FB0AD8F042244773D', 'key': 'b48d80e8c2f544c59cda11ca35e0056df545cb04f010418aaefca839cbb02134', 'type': 'ac', 'sn': '00031822396921140201600580000', 'model': '96921', 'support': False, 'run_test': True}  INFO:msmart.cli: Found a device: {'name': 'midea_ac_0010', 'ssid': 'midea_ac_0010', 'ip': '192.168.0.42', 'port': 6444, 'id': 193514046791566, 'version': 3, 'token': '87E268F683FD988E0A61F060910A3CE98C7BDBB0C6946103EC40CF60F6F5191205A4A3145B6119A6BBA3639631CC28CC7C40045DFBDFC1934D3D260DFF10356E', 'key': 'a4eed509149f4bc4b538d7468d596d3154e466e7c30c4c77a2068885c5fd981d', 'type': 'ac', 'sn': '000318223969270A1401600100000', 'model': '96927', 'support': False, 'run_test': True}  INFO:msmart.cli:*** Found a device: {'name': 'midea_ca_0124', 'ssid': 'midea_ca_0124', 'ip': '192.168.0.43', 'port': 6444, 'id': 179220396187120, 'version': 3, 'token': '0C2B4DD55AE40D4299FECD42BCBB3947A5211B46E2F28A6CEB2E218248B1BA430405C50471AF8FCF787C8831855482FC5FF53C07C8669F5FA119888A0AE06EC8', 'key': 'd404f4c5a8c84d0a8f1160c6278500e6acc7868d6654407ab385744470818e04', 'type': 'ca', 'sn': '0CA318310A08961B271220124T4HZ', 'model': 'A0896', 'support': False, 'run_test': True} 

jay1943000 commented 1 year ago

I tried to connect colmo's central air conditioner through another plug-in named midea_ac_lan. After connecting, I could identify the device, but I could not operate the switch

https://github.com/georgezhao2010/midea_ac_lan/issues/148

mill1000 commented 1 year ago

You have a lot of device's discovered. Which device is the Colmo? Does it have the support: True property?

jay1943000 commented 1 year ago

You have a lot of device's discovered. Which device is the Colmo? Does it have the support: True property?

{'name': 'midea_ac_0030', 'ssid': 'midea_ac_0030', 'ip': '192.168.0.46', 'port': 6444, 'id': 184717954089647, 'version': 3, 'token': 'EF378DB6004CAEA9258C5177A1265B0A0E7CCE48183F4CB88E1548E0AD02D39A05132309306FBB9A7B95FA99615D2C685E42107EBB0D2313C9F27D1D66C81293', 'key': 'daa919867a3644079bef0b05f354dcda0ec8e4faadd849f7b28a7d4557020dd4', 'type': 'ac', 'sn': '00031822396919172101600300000', 'model': '96919', 'support': True, 'run_test': True}

This unit is one of my 5 air conditioners, and I see that it shows "support:True"

benjinne commented 1 year ago

The CRC errors have also been reported here #187.

You could try removing the check here https://github.com/mac-zhou/midea-msmart/blob/97723d055d8e5a3775eaaca96807f2dbbd6db2aa/msmart/device/AC/command.py#L178-L182

Don't know what that recursion error is about though.

I'm having the same issue, and this worked for me. I'm using a pioneer mini split