HOME ASSISTANT

来自iCenter Wiki
跳转至: 导航搜索

折腾记录

101.6.161.107

1 安装centos7 mini root密码123456 icenter用户密码:icenter


2 网络dhclient 获取地址

 开启sshd  systemctl start sshd
 putty连接到 IP地址

3 更新清华镜像yum源(ssh后可以复制的到repo源文件)

 yum makecache

4 安装 python3 ,似乎是要连接外网才能通过

yum install rh-python36
scl enable rh-python36 bash

或者下面方法:

yum -y install centos-release-scl-rh centos-release-scl

附记:一眨眼好几年过去了,最近要配置个新的 Python 运行环境,发现以前的知识都已经过时了,所以更新一下,使用 SCL 来安装 Python,使用 venv 取代 virtualenv。

一定要记住,我们是安装新版 Python,而不是升级系统上原有的旧版 Python,否则很多依赖关系可能会被破坏,下面是通过 SCL 来安装软件的典型步骤:

yum install centos-release-scl
yum install rh-python35
scl enable rh-python35 bash
python --version

如此新版 Python 就基本配置好了,再通过 venv 安装一个干净的环境:

python -m venv /path/to/project
source /path/to/project/bin/activate


5 安装home assistant

pip3 install homeassistant
hass           (启动hass,端口8123)

打开 IP:8123 (要启动10多分钟才能配置好,似乎在安软件)设置用户名密码admin

6 重启后无网络ip的处理

 编辑网卡配置文件改onboot=yes  
 运行hass,不工作,python默认为2.7,还需要运行这个命令,使用python3,再启动hass
scl enable rh-python36 bash
浏览中发现的一个网站与物联网有关,留存参考 https://www.balena.io/what-is-balena