zoukankan      html  css  js  c++  java
  • 13树莓派手动安装Home Assistant

    2017-09-05 00:53:02

    https://home-assistant.io/docs/installation/raspberry-pi/

    已经安装步骤安装了带桌面的树莓派系统,在SD卡的根目录新建文件SSH.txt,然后删除后缀名.txt,将恶意SD插入树莓派,启动就可以使用SSH命令登录了。

    sudo apt-get update

    sudo apt-get upgrade -y

    sudo apt-get install python3 python3-venv python3-pip

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    python3 is already the newest version (3.5.3-1).
    python3-pip is already the newest version (9.0.1-2).
    python3-venv is already the newest version (3.5.3-1).
    python3-venv set to manually installed.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

     

    sudo useradd -rm homeassistant

    $ cd /srv
    $ sudo mkdir homeassistant
    $ sudo chown homeassistant:homeassistant homeassistant

    chown [-R] [用户名称:组名称] [文件或目录]

    $ sudo su -s /bin/bash homeassistant
    $ cd /srv/homeassistant
    $ python3 -m venv .
    $ source bin/activate

     

    (homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install home assistant
    Collecting homeassistant
    Downloading homeassistant-0.52.1-py2.py3-none-any.whl (7.3MB)
    100% |████████████████████████████████| 7.4MB 7.1kB/s
    Collecting aiohttp==2.2.5 (from homeassistant)
    Downloading aiohttp-2.2.5.tar.gz (788kB)
    100% |████████████████████████████████| 798kB 11kB/s
    Collecting pytz>=2017.02 (from homeassistant)
    Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
    100% |████████████████████████████████| 491kB 7.0kB/s
    Collecting pyyaml<4,>=3.11 (from homeassistant)
    Downloading PyYAML-3.12.tar.gz (253kB)
    100% |████████████████████████████████| 256kB 9.4kB/s
    Collecting async-timeout==1.2.1 (from homeassistant)
    Downloading async_timeout-1.2.1-py3-none-any.whl
    Collecting jinja2>=2.9.5 (from homeassistant)
    Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB) 100% |████████████████████████████████| 348kB 18kB/sCollecting chardet==3.0.4 (from homeassistant) Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |████████████████████████████████| 143kB 11kB/sCollecting voluptuous==0.10.5 (from homeassistant) Downloading voluptuous-0.10.5.tar.gz (41kB) 100% |████████████████████████████████| 51kB 17kB/sCollecting astral==1.4 (from homeassistant) Downloading astral-1.4-py2.py3-none-any.whlCollecting requests==2.14.2 (from homeassistant) Downloading requests-2.14.2-py2.py3-none-any.whl (560kB) 100% |████████████████████████████████| 563kB 10kB/sCollecting typing<4,>=3 (from homeassistant) Downloading typing-3.6.2-py3-none-any.whlRequirement already satisfied: pip>=8.0.3 in ./lib/python3.5/site-packages (from homeassistant)Collecting multidict>=2.1.4 (from aiohttp==2.2.5->homeassistant) Downloading multidict-3.1.3.tar.gz (118kB) 100% |████████████████████████████████| 122kB 9.3kB/sCollecting yarl>=0.11 (from aiohttp==2.2.5->homeassistant) Downloading yarl-0.12.0.tar.gz (132kB) 100% |████████████████████████████████| 133kB 18kB/sCollecting MarkupSafe>=0.23 (from jinja2>=2.9.5->homeassistant) Downloading MarkupSafe-1.0.tar.gzBuilding wheels for collected packages: aiohttp, pyyaml, voluptuous, multidict, yarl,MarkupSafeRunning setup.py bdist_wheel for aiohttp ... errorComplete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-20h68syg/aiohttp/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(' ', ' ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpa7vgh_ubpip-wheel---python-tag cp35: usage:-c [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts]...]or:-c --help [cmd1 cmd2 ...]or:-c --help-commandsor:-c cmd --help error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel for aiohttpRunning setup.py clean for aiohttpRunning setup.py bdist_wheel for pyyaml ... errorComplete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-20h68syg/pyyaml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(' ', ' ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpsx8fngxzpip-wheel---python-tag cp35: usage:-c [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts]...]or:-c --help [cmd1 cmd2 ...]or:-c --help-commandsor:-c cmd --help error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel for pyyamlRunning setup.py clean for pyyamlRunning setup.py bdist_wheel for voluptuous ... errorComplete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-20h68syg/voluptuous/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(' ', ' ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpit2li645pip-wheel---python-tag cp35: WARNING:Couldnot locate pandoc,usingMarkdown long_description. usage:-c [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts]...]or:-c --help [cmd1 cmd2 ...]or:-c --help-commandsor:-c cmd --help error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel for voluptuousRunning setup.py clean for voluptuousRunning setup.py bdist_wheel for multidict ... errorComplete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-20h68syg/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(' ', ' ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpvknq293hpip-wheel---python-tag cp35: usage:-c [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts]...]or:-c --help [cmd1 cmd2 ...]or:-c --help-commandsor:-c cmd --help error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel for multidictRunning setup.py clean for multidictRunning setup.py bdist_wheel for yarl ... errorComplete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-20h68syg/yarl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(' ', ' ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp4sfjw_wbpip-wheel---python-tag cp35: usage:-c [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts]...]or:-c --help [cmd1 cmd2 ...]or:-c --help-commandsor:-c cmd --help error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel for yarlRunning setup.py clean for yarlRunning setup.py bdist_wheel forMarkupSafe... errorComplete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-20h68syg/MarkupSafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(' ', ' ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp8zijlp_zpip-wheel---python-tag cp35: usage:-c [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts]...]or:-c --help [cmd1 cmd2 ...]or:-c --help-commandsor:-c cmd --help error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel forMarkupSafeRunning setup.py clean forMarkupSafeFailed to build aiohttp pyyaml voluptuous multidict yarl MarkupSafeInstalling collected packages: chardet, multidict, async-timeout, yarl, aiohttp, pytz, pyyaml,MarkupSafe, jinja2, voluptuous, astral, requests, typing, homeassistantRunning setup.py install for multidict ...doneRunning setup.py install for yarl ...doneRunning setup.py install for aiohttp ...doneRunning setup.py install for pyyaml ...doneRunning setup.py install forMarkupSafe...doneRunning setup.py install for voluptuous ...doneSuccessfully installed MarkupSafe-1.0 aiohttp-2.2.5 astral-1.4 async-timeout-1.2.1 chardet-3.0.4 homeassistant-0.52.1 jinja2-2.9.6 multidict-3.1.3 pytz-2017.2 pyyaml-3.12 requests-2.14.2 typing-3.6.2 voluptuous-0.10.5 yarl-0.12.0(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $

     

    (homeassistant) $ hass

    一堆提示符中间包含这个


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Hello, and welcome to Home Assistant!

    We'll hope that we can make all your dreams come true.

    Here are some resources to get started:

    - Configuring Home Assistant:
    https://home-assistant.io/getting-started/configuration/

    - Available components:
    https://home-assistant.io/components/

    - Troubleshooting your configuration:
    https://home-assistant.io/getting-started/troubleshooting-configuration/

    - Getting help:
    https://home-assistant.io/help/

    This message is generated by the introduction component. You can
    disable it in configuration.yaml.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    网页无法打开

     
    接着安装samba看看
    少了一个sqlalchemy依赖

    (homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install sqlalchemy

  • 相关阅读:
    简单的Makefile
    共享库
    链接静态库
    /proc/uptime参数的意义
    磁盘挂载失败
    linux环境变量设置
    使用systemd-analyze 工具来分析各个服务进程的启动性能
    面试-2020C/C++后台开发深信服科技股份有限公司一面凉经(一问三不知,我是真的菜。。。)
    笔记-C/C++工程师面试笔记收集整理
    SpringCloud-分布式与集群的使用四(断路器Hystrix)
  • 原文地址:https://www.cnblogs.com/arrive/p/9602827.html
Copyright © 2011-2022 走看看