wuwentao / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
124 stars 6 forks source link

Can't connect to appliance "Midea Mobile 35C" #201

Closed aichingerk closed 1 week ago

aichingerk commented 1 week ago

HA core version

2024.6.4

Integration version

v0.4.3

Device type and model

AC 153931628323124

Used App

NetHome Plus

The description of problem

I want to add the AC Midea Mobile 35C with appliance code 153931628323124 and receife the error "Can't connect to appliance"

image

The logs

2024-07-03 18:19:30.885 DEBUG (Air Conditioner) [midealocal.device] [153931628323124] Does not supports the protocol MessageQueryAppliance, ignored 2024-07-03 18:19:30.885 DEBUG (Air Conditioner) [midealocal.device] [153931628323124] Sending: {'header': 'aa20ac00000000000003', 'body': '418100ff000000000000000000000000000000008e66', 'message type': '.03', 'body type': '.41'} 2024-07-03 18:19:34.039 DEBUG (MainThread) [midealocal.cloud] Midea cloud API url: https://mapp.appsmb.com/v1/user/login/id/get, data: {'src': '1017', 'format': '2', 'stamp': '20240703161934', 'deviceId': '432d1ed868f0965a', 'reqId': 'b2992fdf867d4bb9f850655ac1dc7950', 'clientType': '1', 'appId': '1017', 'sessionId': '737c1bc9cf334b58ab7688aa63c3e4e020240703161927345', 'loginAccount': 'k.aichinger@gmx.at', 'sign': '2f7b26439fdff9f781c5f6f45e33746571eb4ce18b679a9b071f7b0a59548f9d'}, response: b'{"msg":"ok","result":{"loginId":"60995c5a-9737-4016-a70f-812b1d2bf937"},"errorCode":"0"}' 2024-07-03 18:19:34.176 DEBUG (MainThread) [midealocal.cloud] Midea cloud API url: https://mapp.appsmb.com/v1/user/login, data: {'src': '1017', 'format': '2', 'stamp': '20240703161934', 'deviceId': '432d1ed868f0965a', 'reqId': '5f080146439809de5ef14c05301afaa0', 'clientType': '1', 'appId': '1017', 'sessionId': '737c1bc9cf334b58ab7688aa63c3e4e020240703161927345', 'loginAccount': 'k.aichinger@gmx.at', 'password': 'd1c028814950f75f442602bdb4111672a3c87566bd7eee8b87558d371f8b1129', 'sign': '81242d7006dc18b0322cbd9eec83f04298777ce68322259bbb4db1235887daa1'}, response: b'{"msg":"ok","result":{"originPrivateVersion":"","nickname":"k.aichinger@gmx.at","sessionId":"cf1141b6730143c8bae4f1cc6394524c20240703161934157","accessToken":"a5209296ef91c04f0e5a69ca1e24be4cb920ebb829d567559397ded751813801","userId":"11495743","versionCode":"","leftCount":""},"errorCode":"0"}' 2024-07-03 18:19:34.216 DEBUG (MainThread) [midealocal.cloud] Midea cloud API url: https://mapp.appsmb.com/v1/appliance/user/list/get, data: {'src': '1017', 'format': '2', 'stamp': '20240703161934', 'deviceId': '432d1ed868f0965a', 'reqId': '66dbafb944ebdb253418d8a061f6379c', 'clientType': '1', 'appId': '1017', 'sessionId': 'cf1141b6730143c8bae4f1cc6394524c20240703161934157', 'sign': 'b535ae45d0702836340853f74732ec4900c179c814499aa0759346b42f0b8c60'}, response: b'{"msg":"ok","result":{"list":[{"registerTime":"Wed Jul 03 10:26:20 UTC 2024","onlineStatus":"1","type":"0xAC","homegroupId":"","userId":"11495743","tsn":"","mac":"","des":"","activeStatus":"1","homegroupCreateUserId":"","wifiVersion":"","name":"Midea_35C","modelNumber":"0","homegroupNumber":"","id":"153931628323124","sn":"70bc671d5ea3a7d4eaa3e24fa71c189bd90738b7828c409977e416f565bb5b737f10ab2f465947fd18112e68a1a16417","userType":"1"}]},"errorCode":"0"}' 2024-07-03 18:19:34.243 DEBUG (MainThread) [midealocal.cloud] Midea cloud API url: https://mapp.appsmb.com/v1/iot/secure/getToken, data: {'src': '1017', 'format': '2', 'stamp': '20240703161934', 'deviceId': '432d1ed868f0965a', 'reqId': '2f070cb5acaf28cb63ad51fd1e11010f', 'clientType': '1', 'appId': '1017', 'sessionId': 'cf1141b6730143c8bae4f1cc6394524c20240703161934157', 'udpid': '9b64e1177a60fff42080f7480c3f0568', 'sign': '98dcde2c5cfcdd1db9b5d17c0a38ee63773efe4016b9aad35c9f6cd45a4165e6'}, response: b'{"result":{"tokenlist":[{"udpId":"9b64e1177a60fff42080f7480c3f0568","key":"b0c660def39f40308c05f947236d6418609f9f9408724e2281bcebf567127ef3","token":"90912C1ABE9ED0B0419486E76C71F8E07285E08905A295720B32C2D48A8DD54FCCE1077AA2EB84BCD9A656F19250231E85839397017830DC02F8364EFE047714"}]},"msg":"ok","errorCode":0}' 2024-07-03 18:19:34.243 DEBUG (MainThread) [midealocal.cloud] Response from get_keys() for appliance_id 153931628323124 with method 1: {'tokenlist': [{'udpId': '9b64e1177a60fff42080f7480c3f0568', 'key': 'b0c660def39f40308c05f947236d6418609f9f9408724e2281bcebf567127ef3', 'token': '90912C1ABE9ED0B0419486E76C71F8E07285E08905A295720B32C2D48A8DD54FCCE1077AA2EB84BCD9A656F19250231E85839397017830DC02F8364EFE047714'}]} 2024-07-03 18:19:34.245 DEBUG (MainThread) [midealocal.device] [153931628323124] Connecting to 192.168.4.18:6444 2024-07-03 18:19:34.247 DEBUG (MainThread) [midealocal.device] [153931628323124] Connected 2024-07-03 18:19:34.247 DEBUG (MainThread) [midealocal.device] [153931628323124] Handshaking 2024-07-03 18:19:34.677 DEBUG (MainThread) [midealocal.device] [153931628323124] Authentication failed 2024-07-03 18:19:34.677 DEBUG (MainThread) [midealocal.device] [153931628323124] Status update: {'available': False} 2024-07-03 18:19:37.806 DEBUG (Midea_35C) [midealocal.device] [153931628323124] Does not supports the protocol MessageQueryAppliance, ignored 2024-07-03 18:19:37.807 DEBUG (Midea_35C) [midealocal.device] [153931628323124] Sending: {'header': 'aa20ac00000000000003', 'body': '418100ff0000000000000000000000000000000091ba', 'message type': '.03', 'body type': '.41'} 2024-07-03 18:19:40.892 DEBUG (Air Conditioner) [midealocal.device] [153931628323124] Does not supports the protocol MessageQuery, ignored 2024-07-03 18:19:40.892 DEBUG (Air Conditioner) [midealocal.device] [153931628323124] Sending: {'header': 'aa1aac00000000000003', 'body': 'b106420018001500170033024b008f6d', 'message type': '.03', 'body type': '.b1'}

rokam commented 1 week ago

Can you please provide the logs as an attachment?

wuwentao commented 1 week ago

seems you are using MideaAirCloud/NetHome Plus, it get token pass and can't use token to connect device. Is this possible for you to register a MSmartHome APP account, and try to add this device to MsmartHome and try to login with MSmartHome account to add this device? I'm not sure, maybe you can have a try?

@aichingerk

chemelli74 commented 1 week ago

, and try to add this device to MsmartHome and try to login with MSmartHome account to add this device?

Is enough to create the account, no need to register a device there.

aichingerk commented 1 week ago

That this is working i had to reinstall the integration within HA, also the the app MSmartHome has been updated to SmartHome.

Here is the same problem, that the device is not accepted to the integration. It is the same error as with the NetHome Plus application.

home-assistant.log

chemelli74 commented 1 week ago

Seems the log is not complete, anyway the issue is linked to the token/keys. We a re working on improving it

aichingerk commented 1 week ago

how long do you think that will take ? i only bought this climate control because it said there was an integration "out of the box" for homeassistant, , otherwise i would return it.

wuwentao commented 1 week ago

how long do you think that will take ? i only bought this climate control because it said there was an integration "out of the box" for homeassistant, , otherwise i would return it.

got it, you can contact us via Discord group chat(got the link from readme page), and we can have a try before we publish a new release. we are not sure whether it can works, so directly check and confirm it with your device should be a quickly solution for you.

@aichingerk

aichingerk commented 1 week ago

as from discord updated to the latest PR #200 and #206 it is working now