midea-ac-py icon indicating copy to clipboard operation
midea-ac-py copied to clipboard

homeassistant Exception: authentication failed

Open lhy741059930 opened this issue 4 years ago • 6 comments

homeassistant Error

Logger: homeassistant.components.climate
Source: custom_components/midea_ac/climate.py:73
Integration: 空调 (documentation, issues)
First occurred: 下午8:20:14 (1 occurrences)
Last logged: 下午8:20:14

Error while setting up midea_ac platform for climate
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 198, in _async_setup_platform
    await asyncio.shield(task)
  File "/home/luhaiyong/.homeassistant/custom_components/midea_ac/climate.py", line 73, in async_setup_platform
    device.authenticate(device_8370_only_ac_mac, device_8370_only_wifi_ssid, device_8370_only_wifi_pw)
  File "/usr/local/lib/python3.9/site-packages/msmart/device.py", line 43, in authenticate
    self._authenticate()
  File "/usr/local/lib/python3.9/site-packages/msmart/device.py", line 46, in _authenticate
    self._lan_service.authenticate(self._mac, self._wifi_ssid, self._wifi_pw)
  File "/usr/local/lib/python3.9/site-packages/msmart/lan.py", line 68, in authenticate
    self._authenticate()
  File "/usr/local/lib/python3.9/site-packages/msmart/lan.py", line 80, in _authenticate
    raise error
  File "/usr/local/lib/python3.9/site-packages/msmart/lan.py", line 76, in _authenticate
    tcp_key = self.security.tcp_key(response, self._key)
  File "/usr/local/lib/python3.9/site-packages/msmart/security.py", line 90, in tcp_key
    raise Exception('authentication failed')
Exception: authentication failed

MyConfig ———————————————————————————— climate:

  • platform: midea_ac host: 192.168.8.219 id: 162727722342346 8370_only_ac_mac: A0681C272AA7 8370_only_wifi_ssid: iK 8370_only_wifi_pw: Lhy19941011. ————————————————————————————

Versions (版本信息)

  • Home Assistant version: Home Assistant 2021.2.3
  • Midea msmart version: 0.1.20

lhy741059930 avatar Feb 28 '21 07:02 lhy741059930

I have the exact same error. Home Assistant 2021.1.5 in Docker.

wachux avatar Mar 23 '21 07:03 wachux

I have the exact same error. Home Assistant core-2021.7.2

zawias avatar Jul 14 '21 06:07 zawias

Try with this version of msmart:

pip3 uninstall msmart
pip3 install git+https://github.com/kueblc/midea-msmart.git@support-8370

plutec avatar Jul 15 '21 12:07 plutec

I have this problem too. Home Assistant 2021.7.2 on Docker. Happens with the correct pip package

cjlawson02 avatar Jul 15 '21 19:07 cjlawson02

Same error. I had a glance at it, but couldn't figure out the reason.

After self.request(request) in lan._authenticate() we get b'\x83p\x00\x05 \x0f\x00\x00ERROR'. Maybe encoding should happen differently, but I'm not sure where to start. Let me know if I can help debugging this.

maraid avatar Jul 20 '21 20:07 maraid

I had this problem, the received answer was b'\x83p\x00\x05 \x0f\x00\x00ERROR' (and authentication failed exception). I installed this new msmart in my windows pc, but the problem is same.

The solution: Restart the climate hardware device.

Other remark: I noticed that I can control the climate via android app . But the dns server direct all request from module.appsmb.com:443 to my fake-cloud.service. I test the fake server with YAT, it went will (with dns redirect). That’s when I thought about restarting the climate. After reboot got the climate new server address from dns.

eztmondom avatar Jul 27 '21 17:07 eztmondom