mac-zhou / midea-msmart

This is a library to allow communicating to a Midea AC via the Local area network.
MIT License
147 stars 39 forks source link

how to obtain k1 #102

Closed meal closed 1 year ago

meal commented 1 year ago

Hey, I'm not sure whether to get k1 I need to log in in Android app and use adb logcat to get k1 (adb logcat | grep doKeyAgree doesn't work on two apps I've tried) or is it the key I get from running midea-discover ? either way I'm getting ERROR:msmart.security:authentication failed when I try to run example.py on any pair of key/token I can get. I have two AC devices and it doesn't work for them (yes, they're supported in midea-discover and both are using V3)

meal commented 1 year ago

I've figured it out. midea-discover returns proper values, but when I use the mobile app in the meantime it does revoke the key and token. So it looks like it's not possible to use this API and mobile app, you need to choose one of them.