hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=85
home-assistant 取名字不能大寫字母
pi國內(nèi)源
1.修改之前,先備份下配置文件仁讨。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources..list.d/raspi.list.bak
2.修改/etc/apt/sources.list或者直接修改原文件,把原有的配置全部注釋掉(使用#注釋)扬舒。
http://mirrors.ustc.edu.cn/raspbian/raspbian/
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
#科大源
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi
3.修改/etc/apt/sources.list.d/raspi.list
http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/
#deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/ jessie main ui
#科大源
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/ jessie main ui
實際是將archive.raspberrypi.org替換為mirrors.ustc.edu.cn/archive.raspberrypi.org就可以了。
安裝到python 虛擬空間
https://home-assistant.io/docs/installation/virtualenv/
pip install setuptools --upgrade
sudo -u homeassistant
/home/homeassistant/homeassistant/bin/hass
開機啟動
樹莓派采用systemd 管理啟動所以以下
添加新文件/etc/systemd/system/homeassistant.service
[Unit]
Description=Home Assistant
After=network.target
[Service]
Type=simple
User=%i
ExecStart=/home/homeassistant/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"
[Install]
WantedBy=multi-user.target
sudo systemctl enable homeassistant
sudo systemctl disable homeassistant
sudo systemctl start homeassistant
sudo systemctl stop homeassistant
usermod -a -G video hass