reneklootwijk / node-mideahvac

MIT License
79 stars 7 forks source link

Account or password incorrect, please re-enter (3102) #12

Closed twocolors closed 2 years ago

twocolors commented 2 years ago

if use app https://apps.apple.com/ru/app/midea-air/id1007999530 or https://apps.apple.com/us/app/nethome-plus/id1008001920 everything is working and control AC

~/Downloads/node-red ❯ node ~/.node-red/node_modules/node-mideahvac/discover.js --user=USER --password=***
Found 1 appliances:

Appliance 1:
- Id: 20890720943592
- Host: 192.168.0.116
- Port: 6444
- MAC Address: 84:7c:9b:4a:1:39
- Serial No.: 000000P0000000Q1847C9B4A01390000
- Appliance Type: Air Conditioner
- Firmware Version: 3.0.6
- New Encryption Version: true
- UDP Id: 91c8168fe3d27e17c8643716f17e8fb7
2022-05-14T05:45:09.241Z silly: MideaCloudClient._getToken: Entering with udpId = 91c8168fe3d27e17c8643716f17e8fb7
2022-05-14T05:45:09.242Z silly: MideaCloudClient._authenticate: Entering
2022-05-14T05:45:09.242Z silly: MideaCloudClient._getLoginId: Entering with uid = USER
2022-05-14T05:45:09.244Z silly: MideaCloudClient._apiRequest: Entering
2022-05-14T05:45:09.245Z debug: MideaCloudClient._apiRequest: Options = {"method":"POST","path":"/mas/v5/app/proxy?alias=/v1/user/login/id/get","hostname":"mp-prod.appsmb.com","agent":{"_events":{},"_eventsCount":2,"defaultPort":443,"protocol":"https:","options":{"path":null},"requests":{},"sockets":{},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"scheduling":"lifo","maxTotalSockets":null,"totalSocketCount":0,"maxCachedSessions":100,"_sessionCache":{"map":{},"list":[]}},"timeout":5000,"body":"{\"appId\":\"1010\",\"format\":2,\"clientType\":1,\"language\":\"en_US\",\"src\":\"1010\",\"stamp\":\"20220514084509\",\"reqId\":\"55e5d0b565665f49f1eef54b9db42d05\",\"loginAccount\":\"USER\"}","headers":{"Authorization":"Basic MTAxM********","sign":"816c65a9e5e8fcbef7328254bab4dac1807258d95d75a0ea3ea6f292391c872f","secretVersion":"1","random":"1652507109","Content-Type":"application/json","accessToken":null}}
2022-05-14T05:45:10.251Z debug: dnsLookup: Returning 18.198.115.88 for mp-prod.appsmb.com
2022-05-14T05:45:10.868Z debug: MideaCloudClient._apiRequest: Response {"code":"3102","msg":"Account or password incorrect, please re-enter"}
2022-05-14T05:45:10.870Z error: MideaCloudClient._getLoginId: Account or password incorrect, please re-enter (3102) (UnknownError)
- Authentication Key: An unknown error occurred
- Authentication Token: An unknown error occurred
reneklootwijk commented 2 years ago

As stated in the README (maybe it should be more explicit): The discover command required to obtain the token and key required for direct communication only supports accounts that have been migrated to the MSmartHome app.

Midea is migrating to a new cloud solution that requires a new mobile app, MSmartHome instead of Midea Air. As part of this migration they disabled the capability to request a token and key using an account that has not been migrated. So you first have to migrate your account (you can do that from within the MSmartHome app).

twocolors commented 2 years ago

thx all work