midea-ac-py
midea-ac-py copied to clipboard
Recursion error
Describe the bug (描述一下问题) Hello, i am getting resursion error, when trying to search for ac conditioner with the right command.
Screenshots / Logs / Pcap File(屏幕截图/日志/抓包文件)
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 "/Library/Frameworks/Python.framework/Versions/3.11/bin/midea-discover", line 8, in
Versions (版本信息)
- Home Assistant version: 10.5
- Midea msmart version: 0.2.5
Duplicate of #217.
I've got this fixed in my fork if you want to check it out. (#220)
Hi @mill1000 , in my case it seems to not work as well:
root@debian:/home/jacek# msmart-ng discover
INFO:msmart.cli:Discovering all devices on local network.
INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com (China: False).
Traceback (most recent call last):
File "/usr/local/bin/msmart-ng", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/msmart/cli.py", line 188, in main
_run(parser.parse_args())
File "/usr/local/lib/python3.9/dist-packages/msmart/cli.py", line 119, in _run
asyncio.run(args.func(args))
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/dist-packages/msmart/cli.py", line 21, in _discover
devices = await Discover.discover(account=args.account, password=args.password, discovery_packets=args.count)
File "/usr/local/lib/python3.9/dist-packages/msmart/discover.py", line 188, in discover
devices = await asyncio.gather(*protocol.tasks)
File "/usr/local/lib/python3.9/dist-packages/msmart/discover.py", line 401, in _get_device
await Discover.connect(dev)
File "/usr/local/lib/python3.9/dist-packages/msmart/discover.py", line 409, in connect
success = await Discover._authenticate_device(dev)
File "/usr/local/lib/python3.9/dist-packages/msmart/discover.py", line 359, in _authenticate_device
cloud = await Discover._get_cloud()
File "/usr/local/lib/python3.9/dist-packages/msmart/discover.py", line 225, in _get_cloud
async with cls._lock:
File "/usr/lib/python3.9/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/usr/lib/python3.9/asyncio/locks.py", line 120, in acquire
await fut
RuntimeError: Task <Task pending name='Task-3' coro=<Discover._get_device() running at /usr/local/lib/python3.9/dist-packages/msmart/discover.py:401>> got Future <Future pending> attached to a different loop
root@debian:/home/jacek#
My devices are midea-products under brand MDV
Hey @YoMan12, sorry you're having trouble. I've created an issue to track this here: https://github.com/mill1000/midea-msmart/issues/74
Could you reply in the above issue with your Python and msmart-ng version? e.g. python --version and msmart-ng --version?
Hey @YoMan12, sorry you're having trouble. I've created an issue to track this here: mill1000/midea-msmart#74
Could you reply in the above issue with your Python and msmart-ng version? e.g.
python --versionandmsmart-ng --version?
Python 3.9.2, msmart 2023.9.4