Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

China cloud access is broken #175

Open
nosuchstudio opened this issue Oct 27, 2024 · 4 comments
Open

China cloud access is broken #175

nosuchstudio opened this issue Oct 27, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nosuchstudio
Copy link

nosuchstudio commented Oct 27, 2024

I'm trying to download device config file from Midea cloud, it seems that 0x9B isn't exist on overseas servers. The server returns "up-to-date lua doesn't be uploaded" in Chinese.
I tried to use msmart-ng download --account [phone number] --password [pswd] --china [IP address] --debug options to obtain the config file from China servers, but the server returned "3004 value is illegal".

Any help will be appreciated!

@nosuchstudio
Copy link
Author

nosuchstudio commented Oct 27, 2024

user@computer:~$ msmart-ng discover [ip address] --debug
DEBUG:asyncio:Using selector: EpollSelector
INFO:msmart.cli:Discovering [ip address] on local network.
DEBUG:msmart.discover:Discovery sent to [ip address]:6445.
DEBUG:msmart.discover:Discovery sent to [ip address]:20086.
DEBUG:msmart.discover:Waiting 5 seconds for responses...
DEBUG:msmart.discover:Discovery response from [ip address]:0516[redacted]
DEBUG:msmart.discover:Decrypted data from [ip address]:0516[redacted]
INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com (China: False).
INFO:httpx:HTTP Request: POST https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=/v1/user/login/id/get "HTTP/1.1 200 "
DEBUG:msmart.cloud:API response: {"code":"0","msg":"ok","data":{"loginId":"[redacted]"}}
DEBUG:msmart.cloud:Received loginId: [red]
DEBUG:msmart.discover:Discovered 1 devices.

user@computer:~$ msmart-ng download [ip address] --debug
DEBUG:asyncio:Using selector: EpollSelector
INFO:msmart.cli:Discovering [ip address] on local network.
DEBUG:msmart.discover:Discovery sent to [ip address]:6445.
DEBUG:msmart.discover:Discovery sent to [ip address]:20086.
DEBUG:msmart.discover:Waiting 5 seconds for responses...
DEBUG:msmart.discover:Discovery response from [ip address]:0516[redacted]
DEBUG:msmart.discover:Decrypted data from [ip]: 0516[redacted]
DEBUG:msmart.discover:Discovered 1 devices.
INFO:msmart.cli:Found device:
{'ip': '', 'port':, 'id':, 'online': False, 'supported': False, 'type': 155, 'name': '', 'sn': '00009BXXXXXXXXXXXXXXX', 'key': None, 'token': None}
INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com (China: False).
INFO:httpx:HTTP Request: POST https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=/v1/user/login/id/get "HTTP/1.1 200 "
DEBUG:msmart.cloud:API response: {"code":"0","msg":"ok","data":{"loginId":"[red]"}}
[...]
INFO:msmart.cli:Downloading protocol from cloud.
INFO:httpx:HTTP Request: POST https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=/v2/luaEncryption/luaGet "HTTP/1.1 200 OK"
DEBUG:msmart.cloud:API response: {"code":1318,"msg":"没有最新lua文件上传","data":null}

@nosuchstudio
Copy link
Author

nosuchstudio commented Oct 27, 2024

And when using Midea China server:

[...]
INFO:msmart.cloud:Using Midea cloud server: https://mp-prod.appsmb.com (China: False).
INFO:httpx:HTTP Request: POST https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=/v1/user/login/id/get "HTTP/1.1 200 "
DEBUG:msmart.cloud:API response: {"code":"3004","msg":"value is illegal."}
ERROR:msmart.cli:Failed to establish cloud connection. Error: Code: 3004, Message: value is illegal

@nosuchstudio
Copy link
Author

It seems that I have messed it up. But now I managed to switch to China server correctly. Sadly, the API endpoint itself seems to have been changed:
https://mp-prod.smartmidea.net/mas/v5/app/proxy?alias=/v2/luaEncryption/luaGet returns "{"msg":"调用业务系统异常(访问地址不存在) [no Route matched with those values]","code":40404}"

@mill1000
Copy link
Owner

mill1000 commented Nov 1, 2024

Hi,

You might have better luck with this project: https://github.com/midea-lan/midea-local

They've implemented the Lua download as well but have support for additional clouds.

@mill1000 mill1000 changed the title Download config from cloud error - 3004 value is illegal China cloud access is broken Nov 5, 2024
@mill1000 mill1000 added the bug Something isn't working label Nov 5, 2024
@mill1000 mill1000 added the help wanted Extra attention is needed label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants