errors also on the first gateway.
This crypto thing, I hate it …
17-01-31 21:11:04 INFO (Thread-5) [custom_components.xiaomi] Xiaomi Gateway f0b429aa0aa8 found at IP 192.168.1.230
17-01-31 21:11:04 INFO (Thread-5) [custom_components.xiaomi] Discovering Xiaomi Devices
17-01-31 21:11:05 ERROR (MainThread) [homeassistant.bootstrap] Error during setup of component xiaomi
Traceback (most recent call last):
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/bootstrap.py", line 151, in _async_setup_component
None, component.setup, hass, config)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/hass/.homeassistant/custom_components/xiaomi.py", line 55, in setup
comp.discoverGateways()
File "/home/hass/.homeassistant/custom_components/xiaomi.py", line 136, in discoverGateways
self.XIAOMI_GATEWAYS[resp["ip"]] = XiaomiGateway(resp["ip"], resp["port"], resp["sid"], gatewayKey, self._socket)
File "/home/hass/.homeassistant/custom_components/xiaomi.py", line 230, in __init__
if self._discover_devices():
File "/home/hass/.homeassistant/custom_components/xiaomi.py", line 239, in _discover_devices
self.update_key(resp["token"])
File "/home/hass/.homeassistant/custom_components/xiaomi.py", line 333, in update_key
encryptor = AES.new(self.GATEWAY_KEY, AES.MODE_CBC, IV=IV)
File "/home/hass/.homeassistant/deps/Crypto/Cipher/AES.py", line 95, in new
return AESCipher(key, *args, **kwargs)
File "/home/hass/.homeassistant/deps/Crypto/Cipher/AES.py", line 59, in __init__
blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
File "/home/hass/.homeassistant/deps/Crypto/Cipher/blockalgo.py", line 141, in __init__
self._cipher = factory.new(key, *args, **kwargs)
ValueError: Key cannot be the null string
17-01-31 21:11:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=create, domain=persistent_notification, service_call_id=1978468048-1, service_data=notification_id=invalid_config, message=The following components and platforms could not be set up:
* [xiaomi](https://home-assistant.io/components/xiaomi/)
Please check your config, title=Invalid config>
17-01-31 21:11:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state persistent_notification.invalid_config=The following components and platforms could not be set up:
* [xiaomi](https://home-assistant.io/components/xiaomi/)
Please check your config; title=Invalid config @ 2017-01-31T21:11:05.192173+01:00>, entity_id=persistent_notification.invalid_config, old_state=None>
17-01-31 21:11:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1978468048-1>