17-02-15 23:11:07 INFO (Thread-5) [custom_components.xiaomi] Expecting 1 gateways 17-02-15 23:11:07 INFO (Thread-5) [custom_components.xiaomi] Discovering Xiaomi Gateways (Try 1) 17-02-15 23:11:07 INFO (Thread-5) [custom_components.xiaomi] Xiaomi Gateway 286c0785919f found at IP 192.168.11.172 17-02-15 23:11:07 INFO (Thread-5) [custom_components.xiaomi] Discovering Xiaomi Devices 17-02-15 23:11:07 DEBUG (Thread-5) [custom_components.xiaomi] >> b’{“cmd” : “get_id_list”}’ 17-02-15 23:11:08 DEBUG (Thread-5) [custom_components.xiaomi] << {‘data’: ‘[“158d000156f96f”,“158d000129b181”,“158d00012636f5”,“158d00012f54bc”]’, ‘cmd’: ‘get_id_list_ack’, ‘token’: ‘You02SmjTIGWLZsf’, ‘sid’: ‘286c0785919f’} 17-02-15 23:11:08 ERROR (MainThread) [homeassistant.bootstrap] Error during setup of component xiaomi Traceback (most recent call last): File “/usr/local/lib/python3.4/dist-packages/homeassistant/bootstrap.py”, line 152, 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 “/var/opt/homeassistant/custom_components/xiaomi.py”, line 77, in setup PY_XIAOMI_GATEWAY.discover_gateways() File “/var/opt/homeassistant/custom_components/xiaomi.py”, line 167, in discover_gateways self.gateways[ip_add] = XiaomiGateway(ip_add, port, sid, gateway_key, self._socket) File “/var/opt/homeassistant/custom_components/xiaomi.py”, line 262, in init if self._discover_devices(): File “/var/opt/homeassistant/custom_components/xiaomi.py”, line 271, in _discover_devices self.update_key(resp[“token”]) File “/var/opt/homeassistant/custom_components/xiaomi.py”, line 370, in update_key encryptor = AES.new(self.key, AES.MODE_CBC, IV=init_vector) File “/var/opt/homeassistant/deps/Crypto/Cipher/AES.py”, line 264, in new return _create_cipher(sys.modules[name], key, mode, *args, **kwargs) File “/var/opt/homeassistant/deps/Crypto/Cipher/init.py”, line 130, in _create_cipher return modes[mode](factory, **kwargs) File “/var/opt/homeassistant/deps/Crypto/Cipher/_mode_cbc.py”, line 232, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) File “/var/opt/homeassistant/deps/Crypto/Cipher/AES.py”, line 131, in _create_base_cipher expect_byte_string(key) File “/var/opt/homeassistant/deps/Crypto/Util/_raw_api.py”, line 175, in expect_byte_string raise TypeError(“Only byte strings can be passed to C code”) TypeError: Only byte strings can be passed to C code 17-02-15 23:11:09 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/lib/python3.4/asyncio/tasks.py”, line 237, in _step result = next(coro) File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/device_tracker/init.py”, line 312, in async_see yield from device.set_vendor_for_mac() File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/device_tracker/init.py”, line 515, in set_vendor_for_mac self.vendor = yield from self.get_vendor_for_mac() File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/device_tracker/init.py”, line 544, in get_vendor_for_mac resp = yield from websession.get(url) File “/var/opt/homeassistant/deps/aiohttp/client.py”, line 577, in iter resp = yield from self._coro File “/var/opt/homeassistant/deps/aiohttp/client.py”, line 213, in _request proxy=proxy, proxy_auth=proxy_auth, timer=timer) File “/var/opt/homeassistant/deps/aiohttp/client_reqrep.py”, line 73, in init assert isinstance(url, URL), url AssertionError: http://api.macvendors.com/8c:be:be