Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR :msmart.security:authentication failed #96

Closed
sh0ckwavevr6 opened this issue Sep 7, 2021 · 7 comments
Closed

ERROR :msmart.security:authentication failed #96

sh0ckwavevr6 opened this issue Sep 7, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@sh0ckwavevr6
Copy link

Hi, When I run the midea-discover programs i got this error

ERROR:msmart.security:authentication failed

and every time the Key and Token are different... I Run on the wifi dongle firmware 150023072116
I hide some parts for privacy reasons but you got the idea.

`INFO:msmart.cli:msmart version: 0.1.35 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast...
ERROR:msmart.security:authentication failed
INFO:msmart.lan:Got TCP key for 192.168.2.59:58510 -> 192.168.2.56:6444 retries: 0 time: 0.55 968a9e2bc8fe4d304f2691e44186bf7f1d8295d6da37cd4b207f0fXXXXXXXXXX
INFO:msmart.cli:*** Found a device: {'type': 'ac', 'support': True, 'version': 3, 'ip': '192.168.2.56', 'id': 307863258XXXXX, 'port': 6444, 'token': '90363BFB9AB945CD0E325105D5047910FAD492FF6C43AE86D8039F52FAB3267D7393FD9239F037A2E5BBE08A7A49E5FFC2BC1E6799D1F9B33185CFxxxxxxxxxx', 'key': '9D851E3A07D34220A2E91FF34ED8B668832D1CC23550475F872005xxxxxxxxxx', 'ssid': 'net_ac_XXXX'}

INFO:msmart.cli:msmart version: 0.1.35 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast...
ERROR:msmart.security:authentication failed
INFO:msmart.lan:Got TCP key for 192.168.2.59:58522 -> 192.168.2.56:6444 retries: 0 time: 0.41 3fd914744686f62893e9ec18a74e6cccf92fad3e3ea4f5f43583512255ac7116
INFO:msmart.cli:*** Found a device: {'type': 'ac', 'support': True, 'version': 3, 'ip': '192.168.2.56', 'id': 307863258XXXXX, 'port': 6444, 'token': 'F0743DDAF1719760A96CDE6BEB52AA86CB1AADB2D28184466CC7A676A4B5AC224263F999791DBCAB694C51751CA96A2FFC46EABBA74F7714905A9BXXXXXXXXXX', 'key': 'BE2D246DCC4E470FA5A4D33F14DD53EC14FE951E915A4DD7B5DCEAXXXXXXXXXX', 'ssid': 'net_ac_XXXX'}
`

@sh0ckwavevr6 sh0ckwavevr6 added the bug Something isn't working label Sep 7, 2021
@ihaettypo
Copy link

same problem here

@mac-zhou
Copy link
Owner

mac-zhou commented Sep 9, 2021

there are 2 ways to get token and k1, one of the ways may fail.
just confirm that your device is v3 and got the token and k1.

@mac-zhou mac-zhou closed this as completed Sep 9, 2021
@mac-zhou mac-zhou pinned this issue Sep 9, 2021
@mac-zhou
Copy link
Owner

mac-zhou commented Sep 9, 2021

Hi, When I run the midea-discover programs i got this error

ERROR:msmart.security:authentication failed

and every time the Key and Token are different... I Run on the wifi dongle firmware 150023072116
I hide some parts for privacy reasons but you got the idea.

`INFO:msmart.cli:msmart version: 0.1.35 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast...
ERROR:msmart.security:authentication failed
INFO:msmart.lan:Got TCP key for 192.168.2.59:58510 -> 192.168.2.56:6444 retries: 0 time: 0.55 968a9e2bc8fe4d304f2691e44186bf7f1d8295d6da37cd4b207f0fXXXXXXXXXX
INFO:msmart.cli:*** Found a device: {'type': 'ac', 'support': True, 'version': 3, 'ip': '192.168.2.56', 'id': 307863258XXXXX, 'port': 6444, 'token': '90363BFB9AB945CD0E325105D5047910FAD492FF6C43AE86D8039F52FAB3267D7393FD9239F037A2E5BBE08A7A49E5FFC2BC1E6799D1F9B33185CFxxxxxxxxxx', 'key': '9D851E3A07D34220A2E91FF34ED8B668832D1CC23550475F872005xxxxxxxxxx', 'ssid': 'net_ac_XXXX'}

INFO:msmart.cli:msmart version: 0.1.35 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast...
ERROR:msmart.security:authentication failed
INFO:msmart.lan:Got TCP key for 192.168.2.59:58522 -> 192.168.2.56:6444 retries: 0 time: 0.41 3fd914744686f62893e9ec18a74e6cccf92fad3e3ea4f5f43583512255ac7116
INFO:msmart.cli:*** Found a device: {'type': 'ac', 'support': True, 'version': 3, 'ip': '192.168.2.56', 'id': 307863258XXXXX, 'port': 6444, 'token': 'F0743DDAF1719760A96CDE6BEB52AA86CB1AADB2D28184466CC7A676A4B5AC224263F999791DBCAB694C51751CA96A2FFC46EABBA74F7714905A9BXXXXXXXXXX', 'key': 'BE2D246DCC4E470FA5A4D33F14DD53EC14FE951E915A4DD7B5DCEAXXXXXXXXXX', 'ssid': 'net_ac_XXXX'}
`

yes, every time the Key and Token are different.
you just choose one, it can reuse.

@XingKongSync
Copy link

same problem here

我在通过 midea-discover 获取到的 token 和 key 之后,可以在 HA 中控制空调,但是一段时间之后(通常是一天)再次尝试控制空调时,空调就没有反应了。这时需要重新获取 token 和 key 并修改配置文件

请问这种情况该怎么解决呢?是否有方法避免 token 失效?

@mac-zhou
Copy link
Owner

same problem here

我在通过 midea-discover 获取到的 token 和 key 之后,可以在 HA 中控制空调,但是一段时间之后(通常是一天)再次尝试控制空调时,空调就没有反应了。这时需要重新获取 token 和 key 并修改配置文件

请问这种情况该怎么解决呢?是否有方法避免 token 失效?

目前没发现失效这一说,可能的原因是tcp连接出现了一些问题,需要你给详细日志出来看看

@vswee
Copy link

vswee commented Mar 19, 2022

Just an observation for my v3 device:
Both methods for fetching key and token work for me, but the aircon must be connected to the internet.
Disallowing internet access to the aircon VLAN makes the device unavailable after a few minutes.
midea-discover returns 'None' for both key and token. Also returns a different device id consistently.

@mac-zhou
Copy link
Owner

@vswee
midea device can't work without internet, and this project is not about disconnecting the midea cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants