Closed Enton-72 closed 10 months ago
Camping on that I just bought a Midea dehumidifier and have run into exactly this problem. I know the device is registered to the network properly as I can discover it using IP address...
root@homebridge:~# midea-beautiful-air-cli discover --address 192.168.29.131
id 000000P0000000Q1B88C291B363A0000/150633093209019
id = 150633093209019
addr = 192.168.29.131
s/n = 000000P0000000Q1B88C291B363A0000
model = Dehumidifier
ssid = net_a1_363A
online = True
name = 150633093209019
running = False
humid% = 45
target% = 50
temp = 0
fan = 40
tank = False
mode = 0
ion = False
filter = False
pump = False
defrost = False
sleep = False
error = 0
supports= {}
version = 3
root@homebridge:~#
But as soon as I try and retrieve credentials using my account/password then I get the 3004 value is illegal error.
root@homebridge:~# midea-beautiful-air-cli --verbose --log DEBUG --no-redact discover --address 192.168.29.131 --account David@<redacted> --password <redacted> --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 <redacted>=', 'sign': '<redacted>', 'secretVersion': '1', 'random': '1691159233', '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': '20230804102713', 'userName': 'david@<redacted>', 'appVNum': '2.22.0', 'appVersion': '2.22.0', 'clientVersion': '2.22.0', 'platformId': '1', 'reqId': '5a87a707a7dd0efeb733536e624116ed', '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:midea_beautiful.cloud:HTTP request /v1/user/login/id/get: {'x-recipe-app': '1010', 'Authorization': 'Basic <redacted>=', 'sign': '<redacted>', 'secretVersion': '1', 'random': '1691159234', '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': '20230804102714', 'loginAccount': 'david@<redacted>', 'appVNum': '2.22.0', 'appVersion': '2.22.0', 'clientVersion': '2.22.0', 'platformId': '1', 'reqId': 'acc4fd5448c0a9bf8c4be0f5cfcd8b94', '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/user/login/id/get HTTP/1.1" 200 41
DEBUG:midea_beautiful.cloud:HTTP response text: {"code":"3004","msg":"value is illegal."}
DEBUG:midea_beautiful.cloud:HTTP response: {'code': '3004', 'msg': 'value is illegal.'}
DEBUG:midea_beautiful.cloud:Restarting session: '3004' - 'value is illegal.'
Like @Enton-72 I am also willing to help debug.
An update that I was successful using the NetHome Plus app. First I downloaded and installed that app on my iPhone, then registered for a new account with it (I used the same email address that I used with the mSmartHome app) and then connected the dehumidifier to it. Now I was able to retrieve the credentials...
root@homebridge:~# midea-beautiful-air-cli discover --address 192.168.29.131 --account David@<redacted> --password <redacted> --credentials
id 000000P0000000Q1B88C291B363A0000/150633093209019
id = 150633093209019
addr = 192.168.29.131
s/n = 000000P0000000Q1B88C291B363A0000
model = Dehumidifier
ssid = net_a1_363A
online = True
name = Dehumidifier_363A
running = True
humid% = 50
target% = 40
temp = 23.0
fan = 80
tank = False
mode = 1
ion = False
filter = False
pump = False
defrost = False
sleep = False
error = 0
supports= {'fan_speed': 3, 'filter': 2, 'dry_clothes': 1, 'water_level': 4}
version = 3
token = 9B1403CC...<redacted>...2311C5743
key = 30dc62ba...<redacted>...97dcc9
and....
root@homebridge:~# midea-beautiful-air-cli status --ip 192.168.29.131 --token 9B1403CC...<redacted>...2311C5743 --key 30dc62ba...<redacted>...97dcc9
id 000000P0000000Q1B88C291B363A0000/150633093209019
id = 150633093209019
addr = 192.168.29.131
s/n = 000000P0000000Q1B88C291B363A0000
model = Dehumidifier
ssid = net_a1_363A
online = True
name = 150633093209019
running = True
humid% = 51
target% = 40
temp = 23.0
fan = 80
tank = False
mode = 1
ion = False
filter = False
pump = False
defrost = False
sleep = False
error = 0
supports= {'fan_speed': 3, 'filter': 2, 'dry_clothes': 1, 'water_level': 4}
version = 3
On my iPhone the device is visible and can be controlled in both apps. I do not know if this will cause future problems or not.
An update that I was successful using the NetHome Plus app. First I downloaded and installed that app on my iPhone, then registered for a new account with it (I used the same email address that I used with the mSmartHome app) and then connected the dehumidifier to it. Now I was able to retrieve the credentials...
root@homebridge:~# midea-beautiful-air-cli discover --address 192.168.29.131 --account David@<redacted> --password <redacted> --credentials id 000000P0000000Q1B88C291B363A0000/150633093209019 id = 150633093209019 addr = 192.168.29.131 s/n = 000000P0000000Q1B88C291B363A0000 model = Dehumidifier ssid = net_a1_363A online = True name = Dehumidifier_363A running = True humid% = 50 target% = 40 temp = 23.0 fan = 80 tank = False mode = 1 ion = False filter = False pump = False defrost = False sleep = False error = 0 supports= {'fan_speed': 3, 'filter': 2, 'dry_clothes': 1, 'water_level': 4} version = 3 token = 9B1403CC...<redacted>...2311C5743 key = 30dc62ba...<redacted>...97dcc9
and....
root@homebridge:~# midea-beautiful-air-cli status --ip 192.168.29.131 --token 9B1403CC...<redacted>...2311C5743 --key 30dc62ba...<redacted>...97dcc9 id 000000P0000000Q1B88C291B363A0000/150633093209019 id = 150633093209019 addr = 192.168.29.131 s/n = 000000P0000000Q1B88C291B363A0000 model = Dehumidifier ssid = net_a1_363A online = True name = 150633093209019 running = True humid% = 51 target% = 40 temp = 23.0 fan = 80 tank = False mode = 1 ion = False filter = False pump = False defrost = False sleep = False error = 0 supports= {'fan_speed': 3, 'filter': 2, 'dry_clothes': 1, 'water_level': 4} version = 3
On my iPhone the device is visible and can be controlled in both apps. I do not know if this will cause future problems or not.
Thank you for the tip! This worked for me!
I have the same original issue, haven't tried the NetHome app yet.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Should be fixed in version 0.10.0
Version of the library
Library version=0.9.5
Environment
LXD Host: Debian 11 (6.0.0-0.deb11.6-amd64) LXC Container: Debian 12 (6.0.0-0.deb11.6-amd64) Network: Full access Python: 3.11.2
Model of appliance where problem occurs
Model: MSMBBU-12HRFN1-QRD0G
Describe the bug
The bug has occurred when I was trying to obtain TOKEN/KEY for our AC appliances via username/password. Command:
Local discover is working (without "--account" and "--password" arguments).
I have tried to do discovery using msmart lib (https://github.com/mac-zhou/midea-msmart) and got the same error but with more info:
ValueError: (1006, 'mobile=main@example.com value is illegal.')
Tried with china server/proxied and phone number/email.
Logs
If you need any additional info I will try my best to provide it.
Thank you.