『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 12684|回复: 13

[求助] ha连接小米网关问题

[复制链接]

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
发表于 2017-7-19 23:10:48 | 显示全部楼层 |阅读模式
我完全按这个帖子做的https://bbs.hassbian.com/thread-31-1-1.html,为什么会出现这个错误?2017-07-19 13:32:13 ERROR (MainThread) [homeassistant.loader] Unable to find component xiaomi2017-07-19 13:32:13 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component not found.


回复

使用道具 举报

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
 楼主| 发表于 2017-7-20 07:44:11 | 显示全部楼层
基本上是configuration的配置问题,有没有大神提供配置好的configuration给我试试!
回复

使用道具 举报

13

主题

554

帖子

4310

积分

论坛元老

Jeff

Rank: 8Rank: 8

积分
4310
金钱
3756
HASS币
10

活跃会员

发表于 2017-7-20 08:17:50 | 显示全部楼层
所有的文件全放了?是不是漏了一个xiaomi.py?
Jeff
回复

使用道具 举报

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
 楼主| 发表于 2017-7-20 10:40:09 | 显示全部楼层
karl_31 发表于 2017-7-20 08:17
所有的文件全放了?是不是漏了一个xiaomi.py?

没有!!!!!!!!
回复

使用道具 举报

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
 楼主| 发表于 2017-7-20 10:44:00 | 显示全部楼层
Testing configuration at /config
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up introduction
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain introduction took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up http
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up recorder
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up api
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up history
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up frontend
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up updater
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up discovery
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up conversation
2017-07-20 01:19:10 ERROR (MainThread) [homeassistant.loader] Unable to find component xiaomi
2017-07-20 01:19:10 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component not found.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up group
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up sun
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up logbook
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up config
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up tts
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setting up automation
2017-07-20 01:19:10 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
Failed config
  General Errors:
    - Component not found: xiaomi
    - Setup failed for xiaomi: Component not found.

Successful config (partial)
回复

使用道具 举报

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
 楼主| 发表于 2017-7-20 10:44:40 | 显示全部楼层
哪里出问题?
回复

使用道具 举报

4

主题

342

帖子

2696

积分

金牌会员

Rank: 6Rank: 6

积分
2696
金钱
2354
HASS币
0
发表于 2017-7-20 16:17:57 | 显示全部楼层
网关的文件没放进去吧,要不就是路径有问题
回复

使用道具 举报

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
 楼主| 发表于 2017-7-20 16:33:33 | 显示全部楼层
Solita 发表于 2017-7-20 16:17
网关的文件没放进去吧,要不就是路径有问题

是文件夹名字问题,处理了又出现这个错误2017-07-20 07:05:45 ERROR (MainThread) [homeassistant.setup] Error during setup of component xiaomi
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 190, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi.py", line 77, in setup
    PY_XIAOMI_GATEWAY.discover_gateways()
  File "/config/custom_components/xiaomi.py", line 167, in discover_gateways
    self.gateways[ip_add] = XiaomiGateway(ip_add, port, sid, gateway_key, self._socket)
  File "/config/custom_components/xiaomi.py", line 262, in __init__
    if self._discover_devices():
  File "/config/custom_components/xiaomi.py", line 271, in _discover_devices
    self.update_key(resp["token"])
  File "/config/custom_components/xiaomi.py", line 387, in update_key
    encryptor = AES.new(self.key.encode(), AES.MODE_CBC, IV=init_vector)
  File "/usr/local/lib/python3.6/site-packages/Crypto/Cipher/AES.py", line 264, in new
    return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/Crypto/Cipher/__init__.py", line 130, in _create_cipher
    return modes[mode](factory, **kwargs)
  File "/usr/local/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/local/lib/python3.6/site-packages/Crypto/Cipher/AES.py", line 134, in _create_base_cipher
    raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (0 bytes)
回复

使用道具 举报

4

主题

342

帖子

2696

积分

金牌会员

Rank: 6Rank: 6

积分
2696
金钱
2354
HASS币
0
发表于 2017-7-20 16:40:39 | 显示全部楼层
eva006 发表于 2017-7-20 16:33
是文件夹名字问题,处理了又出现这个错误2017-07-20 07:05:45 ERROR (MainThread) [homeassistant.setup] ...

你把目录列出来看一下就知道了
回复

使用道具 举报

6

主题

48

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
144
HASS币
0
 楼主| 发表于 2017-7-20 16:54:08 | 显示全部楼层
Solita 发表于 2017-7-20 16:40
你把目录列出来看一下就知道了

发现是没有这些路径的文件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-23 07:05 , Processed in 0.058381 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表