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

 找回密码
 立即注册
楼主: tda2030a

[集成接入] eWelink易微联通过局域网API连接HA 无需刷固件Sonoff设备连接HA

  [复制链接]

0

主题

183

帖子

3464

积分

论坛元老

Rank: 8Rank: 8

积分
3464
金钱
3281
HASS币
0
发表于 2020-8-7 10:40:46 | 显示全部楼层
感谢分享!
回复

使用道具 举报

0

主题

15

帖子

157

积分

论坛积极会员

积分
157
金钱
142
HASS币
0
发表于 2020-8-15 01:07:50 | 显示全部楼层
谢谢分享
回复

使用道具 举报

2

主题

34

帖子

457

积分

论坛积极会员

积分
457
金钱
423
HASS币
0
发表于 2020-8-19 10:24:52 | 显示全部楼层
来学习学习
回复

使用道具 举报

1

主题

16

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
56
HASS币
0
发表于 2020-9-17 12:01:48 | 显示全部楼层
大佬,我按照你的步骤做的也是报错,报错如下:
2020-09-17 11:55:35 ERROR (SyncWorker_3) [homeassistant.loader] Error parsing manifest.json file at /home/pi/.homeassistant/custom_components/sonoff/manifest.json: Expecting value: line 2 column 1 (char 1)
2020-09-17 11:55:35 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/homeassistant/loader.py", line 436, in _load_file
    module = importlib.import_module(path)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/.homeassistant/custom_components/sonoff/__init__.py", line 18, in <module>
    from . import utils
  File "/home/pi/.homeassistant/custom_components/sonoff/utils.py", line 17, in <module>
    from Crypto.Random import get_random_bytes
ImportError: cannot import name 'get_random_bytes' from 'Crypto.Random' (/usr/local/lib/python3.8/dist-packages/Crypto/Random/__init__.py)
2020-09-17 11:55:43 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/homeassistant/loader.py", line 436, in _load_file
    module = importlib.import_module(path)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/.homeassistant/custom_components/sonoff/__init__.py", line 18, in <module>
    from . import utils
  File "/home/pi/.homeassistant/custom_components/sonoff/utils.py", line 17, in <module>
    from Crypto.Random import get_random_bytes
ImportError: cannot import name 'get_random_bytes' from 'Crypto.Random' (/usr/local/lib/python3.8/dist-packages/Crypto/Random/__init__.py)
2020-09-17 11:55:43 ERROR (MainThread) [homeassistant.setup] Setup failed for sonoff: Integration not found.
回复

使用道具 举报

1

主题

16

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
56
HASS币
0
发表于 2020-9-17 18:12:22 | 显示全部楼层
fliesyan 发表于 2020-2-29 14:03
補充1、版本要升級

楼主您好:
  我这边有个智能插座sonoff26的,我在github上下载了最新的插件,配置文件也更改了,然后报了这么个错误
错误如下:
2020-09-17 15:51:40 ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration sonoff - received exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/homeassistant/setup.py", line 68, in async_setup_component
return await task # type: ignore
File "/usr/local/lib/python3.8/dist-packages/homeassistant/setup.py", line 137, in _async_setup_component
await async_process_deps_reqs(hass, config, integration)
File "/usr/local/lib/python3.8/dist-packages/homeassistant/setup.py", line 322, in async_process_deps_reqs
await requirements.async_get_integration_with_requirements(
File "/usr/local/lib/python3.8/dist-packages/homeassistant/requirements.py", line 77, in async_get_integration_with_requirements
await async_process_requirements(
File "/usr/local/lib/python3.8/dist-packages/homeassistant/requirements.py", line 124, in async_process_requirements
if pkg_util.is_installed(req):
File "/usr/local/lib/python3.8/dist-packages/homeassistant/util/package.py", line 54, in is_installed
return version(req.project_name) in req
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2978, in contains
return self.specifier.contains(item, prereleases=True)
File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/specifiers.py", line 703, in contains
item = parse(item)
File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 31, in parse
return Version(version)
File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 200, in init
match = self._regex.search(version)
TypeError: expected string or bytes-like object

能否帮我看看哪里出了问题吗,下载的最新的插件是针对他那个设备的?我这边需要在代码里更改什么吗?求助!
回复

使用道具 举报

1

主题

47

帖子

159

积分

注册会员

Rank: 2

积分
159
金钱
112
HASS币
0
发表于 2020-9-19 17:45:20 | 显示全部楼层
终于找到易微联的教程了,好好研究研究
回复

使用道具 举报

0

主题

4

帖子

44

积分

新手上路

Rank: 1

积分
44
金钱
40
HASS币
0
发表于 2020-10-15 13:31:57 | 显示全部楼层
这个太适合了。。手里好几个易微联呢
回复

使用道具 举报

3

主题

17

帖子

267

积分

论坛分享达人

积分
267
金钱
250
HASS币
10
发表于 2020-10-23 18:44:32 来自手机 | 显示全部楼层
顶顶 ,之前的不能用了 现在又可以啦
回复

使用道具 举报

0

主题

42

帖子

244

积分

中级会员

Rank: 3Rank: 3

积分
244
金钱
202
HASS币
0
发表于 2020-10-26 13:16:52 来自手机 | 显示全部楼层
好东西学习一下
回复

使用道具 举报

11

主题

125

帖子

1089

积分

论坛积极会员

积分
1089
金钱
964
HASS币
0
发表于 2020-11-7 22:28:19 | 显示全部楼层
学习下怎么配置
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-22 14:30 , Processed in 0.675222 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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