This is the log:
[homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 181, in _step
result = coro.throw(exc)
File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
yield from service_handler.func(service_call)
File "/usr/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 279, in async_handle_light_service
yield from light.async_turn_on(**params)
File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
future.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/light/xiaomi.py", line 97, in turn_on
if self._write_to_hub(self._sid, **{self._data_key: rgbhex}):
File "/usr/lib/python3.6/site-packages/PyXiaomiGateway/__init__.py", line 258, in write_to_hub
data['key'] = self._get_key()
File "/usr/lib/python3.6/site-packages/PyXiaomiGateway/__init__.py", line 288, in _get_key
encryptor = AES.new(self.key.encode(), AES.MODE_CBC, IV=init_vector)
File "/usr/lib/python3.6/site-packages/Crypto/Cipher/AES.py", line 202, in new
return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/Crypto/Cipher/__init__.py", line 55, in _create_cipher
return modes[mode](factory, **kwargs)
File "/usr/lib/python3.6/site-packages/Crypto/Cipher/_mode_cbc.py", line 232, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "/usr/lib/python3.6/site-packages/Crypto/Cipher/AES.py", line 92, in _create_base_cipher
raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (0 bytes)
My config:
xiaomi:
gateways:
- mac: 00907FAA2E7B
key: c0665e2dee33421d
I can see the controller, and if i manualy turn on the light it turns on in HA. But if I turn it on i HA nothing happends.
Yes it was in upper-case, did change that now. Still dont work
@hijinx I did have : tried too change it now, dident matter.