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

'3004' - 'value is illegal.' #26

Closed
JimmyBjorklund opened this issue Aug 8, 2023 · 3 comments · Fixed by #29
Closed

'3004' - 'value is illegal.' #26

JimmyBjorklund opened this issue Aug 8, 2023 · 3 comments · Fixed by #29

Comments

@JimmyBjorklund
Copy link

When using the library i keep getting '3004' - 'value is illegal.' a bit unclear what the issue is. Any one else have this issue?

Version of the library

version': '2.22.0', 'systemVersion': '8.1.0'

Logs

midea-beautiful-air-cli --verbose --log DEBUG discover --account [email protected] --password xxxxx --credentials --app MSmartHome
DEBUG:midea_beautiful:Library version=0.9.15
DEBUG:midea_beautiful.cloud:HTTP request /v1/multicloud/platform/user/route: {'x-recipe-app': '1010', 'Authorization': 'Basic ********************************************************', 'sign': '5146f2233bd1654266e08e4f5a137ebb95e4af70d3f94eb7b8905ba8b7d06994', 'secretVersion': '1', 'random': '1691476063', 'version': '2.22.0', 'systemVersion': '8.1.0', 'platform': '0', 'Accept-Encoding': 'identity', 'Content-Type': 'application/json'} {'appId': 1010, 'format': 2, 'clientType': 1, 'language': 'en_US', 'src': 1010, 'stamp': '20230808082743', 'userName': 'jimmy.bjorklu*************', 'appVNum': '2.22.0', 'appVersion': '2.22.0', 'clientVersion': '2.22.0', 'platformId': '1', 'reqId': 'f41fd6b923bd4a5b9ab375e2e2913614', 'retryCount': '3', 'uid': '', 'userType': '0'}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mp-prod.appsmb.com:443
DEBUG:urllib3.connectionpool:https://mp-prod.appsmb.com:443 "POST /mas/v5/app/proxy?alias=/v1/multicloud/platform/user/route HTTP/1.1" 200 168
DEBUG:midea_beautiful.cloud:HTTP response text: {"msg":"ok","code":0,"data":{"masUrl":"https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=","sseUrl":"https://sse.msmartlife.net","idAdapt":"131329","countryCode":"HK"}}
DEBUG:midea_beautiful.cloud:HTTP response: {'msg': 'ok', 'code': 0, 'data': {'masUrl': 'https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=', 'sseUrl': 'https://sse.msmartlife.net', 'idAdapt': '131329', 'countryCode': 'HK'}}
DEBUG:midea_beautiful.cloud:using key='data', result={'masUrl': 'https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=', 'sseUrl': 'https://sse.msmartlife.net', 'idAdapt': '131329', 'countryCode': 'HK'}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mp-prod.appsmb.com:443
DEBUG:urllib3.connectionpool:https://mp-prod.appsmb.com:443 "POST /mas/v5/app/proxy?alias=/v1/user/login/id/get HTTP/1.1" 200 41
DEBUG:midea_beautiful.cloud:HTTP response: *** REDACTED ***
DEBUG:midea_beautiful.cloud:Restarting session: '3004' - 'value is illegal.'
@cdickmann
Copy link

I ran into the same just now. The app works fine.

@RobbiTobbi1955
Copy link

RobbiTobbi1955 commented Aug 27, 2023

I have the same problem. Obviously Midea changed something.
The MSMartHome has been updated some few weeks ago and is now 3.0.2. It works (of course).
Also my cpp implementation (yet private) of your phyton fails with connection to the cloud and error 3004.
It worked fine until at least may 2023. Local discovery works.

Update: I used new token/key pair derived from midea-discover 2023.8.1 from mac-zhou, then I could request data from my currently active AC. Possibly this token/key pair has "maximum age"? Without connection to the cloud I'm lost (and will check tomorrow what mac zhou exactly did to solve this problem)

@RobbiTobbi1955
Copy link

RobbiTobbi1955 commented Aug 28, 2023

It seems that the solution for this problem is such:
When POST v1/user/login/id/get (you request the LoginID) add "deviceId": "c1acad8939ac0d7d" to the payload (between "stamp" and "LoginAccount").
Add the same in the POST /mk/user/login, between "osVersion" and "deviceId".
It even works with "0123456789abcdef" as a "deviceId".
Thanks to mill1000
mac-zhou/midea-msmart#109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants