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

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

k3梅林安装hass教程

  [复制链接]

4

主题

85

帖子

464

积分

中级会员

Rank: 3Rank: 3

积分
464
金钱
379
HASS币
0
发表于 2018-11-2 08:43:32 | 显示全部楼层
感谢分享
回复

使用道具 举报

0

主题

63

帖子

343

积分

中级会员

Rank: 3Rank: 3

积分
343
金钱
280
HASS币
0
发表于 2018-11-2 20:15:49 | 显示全部楼层
(homeassistant) admin@RT-AC3100-E7C2:/tmp/home/root# hass --open-ui
Config directory: /root/.homeassistant
2018-11-02 12:13:48 INFO (SyncWorker_3) [homeassistant.util.package] Attempting install of PyQRCode==1.2.1
Traceback (most recent call last):
  File "/opt/bin/hass", line 11, in <module>
    sys.exit(main())
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/threading.py", line 917, in _bootstrap_inner
  File "/threading.py", line 865, in run
  File "/opt/lib/python3.7/site-packages/homeassistant/util/logging.py", line 85, in _process
    self._queue.get(), self.loop).result()
  File "/_base.py", line 430, in result
concurrent.futures._base.CancelledError
  File "/opt/lib/python3.7/site-packages/homeassistant/__main__.py", line 389, in main

    exit_code = asyncio_run(setup_and_run_hass(config_dir, args))
  File "/runners.py", line 43, in run
  File "/base_events.py", line 568, in run_until_complete
  File "/opt/lib/python3.7/site-packages/homeassistant/__main__.py", line 283, in setup_and_run_hass
    log_no_color=args.log_no_color)
  File "/opt/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 223, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip)
  File "/opt/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 93, in async_from_config_dict
    hass, core_config, has_api_password, has_trusted_networks)
  File "/opt/lib/python3.7/site-packages/homeassistant/config.py", line 485, in async_process_ha_core_config
    mfa_conf))
  File "/opt/lib/python3.7/site-packages/homeassistant/auth/__init__.py", line 53, in auth_manager_from_config
    for config in module_configs])
  File "/opt/lib/python3.7/site-packages/homeassistant/auth/mfa_modules/__init__.py", line 132, in auth_mfa_module_from_config
    module = await _load_mfa_module(hass, module_name)
  File "/opt/lib/python3.7/site-packages/homeassistant/auth/mfa_modules/__init__.py", line 167, in _load_mfa_module
    hass, module_path, module.REQUIREMENTS)    # type: ignore
  File "/opt/lib/python3.7/site-packages/homeassistant/requirements.py", line 43, in async_process_requirements
    ret = await hass.async_add_executor_job(pip_install, req)
  File "/thread.py", line 57, in run
  File "/opt/lib/python3.7/site-packages/homeassistant/util/package.py", line 43, in install_package
    process = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env)
  File "/subprocess.py", line 756, in __init__
  File "/subprocess.py", line 1430, in _execute_child
OSError: [Errno 12] Cannot allocate memory
启动时候提示这个啥意思  用U盘扩展分区怎么搞 貌似内存不够
回复

使用道具 举报

3

主题

72

帖子

302

积分

论坛分享达人

积分
302
金钱
230
HASS币
0
 楼主| 发表于 2018-11-2 21:46:02 | 显示全部楼层
鼠标手 发表于 2018-11-2 20:15
(homeassistant) admin@RT-AC3100-E7C2:/tmp/home/root# hass --open-ui
Config directory: /root/.homeass ...

你这个不是内存不够 你注意看你第一个错误前一行
2018-11-02 12:13:48 INFO (SyncWorker_3) [homeassistant.util.package] Attempting install of PyQRCode==1.2.1
你要安装PyQRCode==1.2.1
回复

使用道具 举报

0

主题

16

帖子

154

积分

注册会员

Rank: 2

积分
154
金钱
138
HASS币
0
发表于 2018-11-3 03:34:44 | 显示全部楼层
本帖最后由 newspider0311 于 2018-11-3 03:50 编辑

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken 
by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error: certificate is 
not yet valid (_ssl.c:1045)'))': /simple/setuptools/                                                     
/opt/lib/python3.7/site-packages/pip/_vendor/urllib3/connection.py:306: SystemTimeWarning: System time is
 way off (before 2016-01-01). This will probably lead to SSL verification errors                         
  SystemTimeWarning                                                                                      
  Could not fetch URL https://pypi.org/simple/setuptools/: There was a problem confirming the ssl certifi
cate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/setuptools/ 
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error: certific
ate is not yet valid (_ssl.c:1045)'))) - skipping                                                        
  Could not find a version that satisfies the requirement setuptools (from versions: )                   
No matching distribution found for setuptools
##卡到这里 再也装不上了重启路由器后  可以继续安装了  真没想到  还有时间过期这种问题。。。。
回复

使用道具 举报

0

主题

12

帖子

94

积分

注册会员

Rank: 2

积分
94
金钱
82
HASS币
0
发表于 2018-11-3 14:05:07 | 显示全部楼层
终于搞定了,感谢楼主分享教程。
回复

使用道具 举报

10

主题

68

帖子

570

积分

高级会员

Rank: 4

积分
570
金钱
502
HASS币
0
发表于 2018-11-3 18:16:06 | 显示全部楼层
本帖最后由 colock 于 2018-11-3 18:20 编辑

Command "/opt/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5pmbg5if/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-4nhb1vib-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-5pmbg5if/cffi/


试试几次都是这个问题

上面的几个命令都试过了
arm-openwrt-linux-gnueabi-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -DNDEBUG -fno-inline -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -DNDEBUG -fno-inline -I/media/ware4/Entware-ng.2017.12/staging_dir/target-arm_cortex-a9_glibc-2.23_eabi/opt/include -I/media/ware4/Entware-ng.2017.12/staging_dir/target-arm_cortex-a9_glibc-2.23_eabi/include -I/media/ware4/Entware-ng.2017.12/staging_dir/toolchain-arm_cortex-a9_gcc-6.3.0_glibc-2.23_eabi/usr/include -I/media/ware4/Entware-ng.2017.12/staging_dir/toolchain-arm_cortex-a9_gcc-6.3.0_glibc-2.23_eabi/include -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python3.6 -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.6/c/_cffi_backend.o
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
     #include <ffi.h>
                     ^
    compilation terminated.
    error: command 'arm-openwrt-linux-gnueabi-gcc' failed with exit status 1

    ----------------------------------------
Command "/opt/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bny6nzu5/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-uvhco4ik-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-bny6nzu5/cffi/


回复

使用道具 举报

10

主题

68

帖子

570

积分

高级会员

Rank: 4

积分
570
金钱
502
HASS币
0
发表于 2018-11-3 19:24:30 | 显示全部楼层
yeslight 发表于 2018-10-25 10:38
卡在这一步,python3-cffi,python3-pyopenssl,libffi 这些都装了,折腾一天了都不行,求助
...

你解决没我也一样的问题
回复

使用道具 举报

0

主题

16

帖子

154

积分

注册会员

Rank: 2

积分
154
金钱
138
HASS币
0
发表于 2018-11-4 04:17:05 | 显示全部楼层
能不能详细描述一下第9步?具体的命令
回复

使用道具 举报

0

主题

63

帖子

343

积分

中级会员

Rank: 3Rank: 3

积分
343
金钱
280
HASS币
0
发表于 2018-11-4 19:20:30 | 显示全部楼层
我说下我的安装步骤第三步需要进入usb相关应用-Download Master下面的install选择你的u盘安装然后用软件中心的SSH输入用户名和密码后在命令行直接输入entware-setup.sh安装entware   接下来按照楼主第4 5 6 安装完后 参考楼主的pip3 list(输入pip3 list)少几个就装几个 类似这样pip3 install mutagen pycryptodome pyOpenSSL pyotp PyQRCode python-jose-cryptodome ua-parser user-agents warrant xmlto dict  安装完毕再输入hass --open-ui 启动时候巨慢 差不多需要10分钟 当看到KeyError: 'name' 时候 输入你路由器管理ip:8123 就可以了
回复

使用道具 举报

0

主题

63

帖子

343

积分

中级会员

Rank: 3Rank: 3

积分
343
金钱
280
HASS币
0
发表于 2018-11-4 19:22:00 | 显示全部楼层
newspider0311 发表于 2018-11-4 04:17
能不能详细描述一下第9步?具体的命令

第九步需要用到WinSCP 百度下
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-20 02:03 , Processed in 4.739910 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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