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
367 stars 17 forks source link

Can't get available token for this device - USING SMARTHOME (not meijucloud, unrelated to #275 ?) #395

Open viny182 opened 5 days ago

viny182 commented 5 days ago

HA core version

2024.11.3

Current integration version

0.6.5

Last known working integration version

None

Device type and model

Front Loader Washer Dryer Smart Wi-Fi HealthGuard Titanium MF200D110WB - 38124206

image

Working mobile app

SmartHome

The detail description of bug/problem

When trying to add the device model 38124206, I'm getting the error "Can't get available token for this device", but differently from #275 , I'm using SmartHome app and not meijucloud.

Creating a new issue as recommended in this comment -> https://github.com/wuwentao/midea_ac_lan/issues/275#issuecomment-2496121348

The logs

log_smarthome.txt

wuwentao commented 2 days ago

from your debug log, seems device don't recv normal auth handshaking response, it's a different error as Meijucloud.

Received auth response len 13 error

2024-11-24 15:57:18.268 DEBUG (MainThread) [midealocal.device] [151732605718514] Connecting to 192.168.182.67:6444
2024-11-24 15:57:18.281 DEBUG (MainThread) [midealocal.device] [151732605718514] Connected
2024-11-24 15:57:18.282 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication handshaking
2024-11-24 15:57:18.356 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response with 13 bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.357 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response len 13 error, bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.357 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication failed
2024-11-24 15:57:18.357 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] connect device using method 1 token/key failed
2024-11-24 15:57:18.365 DEBUG (MainThread) [midealocal.device] [151732605718514] Connecting to 192.168.182.67:6444
2024-11-24 15:57:18.395 DEBUG (MainThread) [midealocal.device] [151732605718514] Connected
2024-11-24 15:57:18.396 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication handshaking
2024-11-24 15:57:18.476 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response with 13 bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.476 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response len 13 error, bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.476 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication failed
2024-11-24 15:57:18.477 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] connect device using method 2 token/key failed
2024-11-24 15:57:18.477 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] Unable to connect device with all the token/key
a-flash commented 2 days ago

I have the same problem. The washing machine connects without problems, but the dryer of the same series shows the same error. It seems to me that the problem is in different firmware versions. The washing machine has 3.5.0.20 and the dryer has 1.1.0.7 photo_2024-11-26_18-44-24 photo_2024-11-26_18-44-33

viny182 commented 2 days ago

from your debug log, seems device don't recv normal auth handshaking response, it's a different error as Meijucloud.

Received auth response len 13 error

2024-11-24 15:57:18.268 DEBUG (MainThread) [midealocal.device] [151732605718514] Connecting to 192.168.182.67:6444
2024-11-24 15:57:18.281 DEBUG (MainThread) [midealocal.device] [151732605718514] Connected
2024-11-24 15:57:18.282 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication handshaking
2024-11-24 15:57:18.356 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response with 13 bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.357 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response len 13 error, bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.357 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication failed
2024-11-24 15:57:18.357 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] connect device using method 1 token/key failed
2024-11-24 15:57:18.365 DEBUG (MainThread) [midealocal.device] [151732605718514] Connecting to 192.168.182.67:6444
2024-11-24 15:57:18.395 DEBUG (MainThread) [midealocal.device] [151732605718514] Connected
2024-11-24 15:57:18.396 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication handshaking
2024-11-24 15:57:18.476 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response with 13 bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.476 DEBUG (MainThread) [midealocal.device] [151732605718514] Received auth response len 13 error, bytes: 83700005200f00004552524f52
2024-11-24 15:57:18.476 DEBUG (MainThread) [midealocal.device] [151732605718514] Authentication failed
2024-11-24 15:57:18.477 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] connect device using method 2 token/key failed
2024-11-24 15:57:18.477 DEBUG (MainThread) [custom_components.midea_ac_lan.config_flow] Unable to connect device with all the token/key

@wuwentao is there any way to sniff the communication between the device and the App when adding it to check what kind of authentication key they are exchanging?

viny182 commented 2 days ago

@a-flash I have an all-in-one appliance (washer and dryer), and the firmware looks similar to your washer... Mine is also v3.5.0.20

image