Home Assistant Custom Integration for Midea Group(Hualing, Senville, Klimaire, AirCon, Century, Pridiom, Thermocore, Comfee, Toshiba, Carrier, Goodman, Friedrich, Samsung, Kenmore, Trane, Lennox, LG and much more) Air Conditioners via LAN.
Describe the bug (描述一下问题)
when doing midea-discover, I get this error:
ERROR:msmart.lan:Connect Error: 192.168.10.168:6444 [Errno 111] Connection refused
ERROR:msmart.lan:Sokcet is None: 192.168.10.168:6444
ERROR:msmart.security:unexpected data length
ERROR:msmart.lan:Connect Error: 192.168.10.168:6444 [Errno 111] Connection refused
ERROR:msmart.lan:Sokcet is None: 192.168.10.168:6444
ERROR:msmart.security:unexpected data length
ERROR:msmart.lan:Connect Error: 192.168.10.168:6444 [Errno 111] Connection refused
ERROR:msmart.lan:Sokcet is None: 192.168.10.168:6444
ERROR:msmart.security:unexpected data length
Traceback (most recent call last):
File "/usr/bin/midea-discover", line 8, in
sys.exit(discover())
File "/usr/lib/python3.9/site-packages/click/core.py", line 1128, in call
return self.main(args, kwargs)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(args, kwargs)
File "/usr/lib/python3.9/site-packages/msmart/cli.py", line 43, in discover
found_devices = loop.run_until_complete(discovery.get_all())
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/lib/python3.9/site-packages/msmart/scanner.py", line 179, in get_all
[self.result.add(task.result()) for task in tasks]
File "/usr/lib/python3.9/site-packages/msmart/scanner.py", line 179, in
[self.result.add(task.result()) for task in tasks]
File "/usr/lib/python3.9/site-packages/msmart/scanner.py", line 47, in support_test
await loop.run_in_executor(None, _device.refresh)
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, *self.kwargs)
File "/usr/lib/python3.9/site-packages/msmart/device.py", line 198, in refresh
self._send_cmd(cmd)
File "/usr/lib/python3.9/site-packages/msmart/device.py", line 208, in _send_cmd
responses = self._lan_service.appliance_transparent_send_8370(data)
File "/usr/lib/python3.9/site-packages/msmart/lan.py", line 136, in appliance_transparent_send_8370
data = self.security.encode_8370(data, msgtype)
File "/usr/lib/python3.9/site-packages/msmart/security.py", line 117, in encode_8370
data = self.aes_cbc_encrypt(data, self._tcp_key) + sign
File "/usr/lib/python3.9/site-packages/msmart/security.py", line 57, in aes_cbc_encrypt
return AES.new(key, AES.MODE_CBC, iv=self.iv).encrypt(raw)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/AES.py", line 232, in new
return _create_cipher(sys.modules[name], key, mode, args, kwargs)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/init.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/AES.py", line 92, in _create_base_cipher
if len(key) not in key_size:
TypeError: object of type 'NoneType' has no len()
Describe the bug (描述一下问题) when doing midea-discover, I get this error:
ERROR:msmart.lan:Connect Error: 192.168.10.168:6444 [Errno 111] Connection refused ERROR:msmart.lan:Sokcet is None: 192.168.10.168:6444 ERROR:msmart.security:unexpected data length ERROR:msmart.lan:Connect Error: 192.168.10.168:6444 [Errno 111] Connection refused ERROR:msmart.lan:Sokcet is None: 192.168.10.168:6444 ERROR:msmart.security:unexpected data length ERROR:msmart.lan:Connect Error: 192.168.10.168:6444 [Errno 111] Connection refused ERROR:msmart.lan:Sokcet is None: 192.168.10.168:6444 ERROR:msmart.security:unexpected data length Traceback (most recent call last): File "/usr/bin/midea-discover", line 8, in
sys.exit(discover())
File "/usr/lib/python3.9/site-packages/click/core.py", line 1128, in call
return self.main(args, kwargs)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(args, kwargs)
File "/usr/lib/python3.9/site-packages/msmart/cli.py", line 43, in discover
found_devices = loop.run_until_complete(discovery.get_all())
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/lib/python3.9/site-packages/msmart/scanner.py", line 179, in get_all
[self.result.add(task.result()) for task in tasks]
File "/usr/lib/python3.9/site-packages/msmart/scanner.py", line 179, in
[self.result.add(task.result()) for task in tasks]
File "/usr/lib/python3.9/site-packages/msmart/scanner.py", line 47, in support_test
await loop.run_in_executor(None, _device.refresh)
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, *self.kwargs)
File "/usr/lib/python3.9/site-packages/msmart/device.py", line 198, in refresh
self._send_cmd(cmd)
File "/usr/lib/python3.9/site-packages/msmart/device.py", line 208, in _send_cmd
responses = self._lan_service.appliance_transparent_send_8370(data)
File "/usr/lib/python3.9/site-packages/msmart/lan.py", line 136, in appliance_transparent_send_8370
data = self.security.encode_8370(data, msgtype)
File "/usr/lib/python3.9/site-packages/msmart/security.py", line 117, in encode_8370
data = self.aes_cbc_encrypt(data, self._tcp_key) + sign
File "/usr/lib/python3.9/site-packages/msmart/security.py", line 57, in aes_cbc_encrypt
return AES.new(key, AES.MODE_CBC, iv=self.iv).encrypt(raw)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/AES.py", line 232, in new
return _create_cipher(sys.modules[name], key, mode, args, kwargs)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/init.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "/usr/lib/python3.9/site-packages/Cryptodome/Cipher/AES.py", line 92, in _create_base_cipher
if len(key) not in key_size:
TypeError: object of type 'NoneType' has no len()
Versions (版本信息)