Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About

189.3. Home Assistant Community Store



189.3.1. 正常安装

配置 DNS

homeassistant:/config# cat /etc/resolv.conf 
search local.hass.io

进入容器安装 hacs

docker exec -it homeassistant bash
wget -O - https://get.hacs.xyz | bash -
homeassistant:/config# cat /etc/resolv.conf 
search local.hass.io

homeassistant:/config# wget -O - https://get.hacs.xyz | bash -
Connecting to get.hacs.xyz ([2606:4700:3031::ac43:8f2c]:443)
Connecting to raw.githubusercontent.com ([2606:50c0:8001::154]:443)
writing to stdout
INFO: Trying to find the correct directory...
-                    100% |*************************|  3988  0:00:00 ETA
written to stdout
INFO: Found Home Assistant configuration directory at '/config'
INFO: Changing to the custom_components directory...
INFO: Downloading HACS
Connecting to github.com (
Connecting to github.com (
Connecting to objects.githubusercontent.com (
saving to 'hacs.zip'
hacs.zip             100% |*************************| 3889k  0:00:00 ETA
'hacs.zip' saved
INFO: Creating HACS directory...
INFO: Unpacking HACS...

INFO: Verifying versions
INFO: Current version is 2023.6.2, minimum version is 2022.11.0

INFO: Removing HACS zip file...
INFO: Installation complete.

INFO: Remember to restart Home Assistant before you configure it			

189.3.2. 遇到 Github 无法访问的情况怎么处理

如果无法下载,请添加 hosts 文件

docker exec -i homeassistant bash -c "echo    raw.githubusercontent.com >> /etc/hosts"
docker exec -i homeassistant bash -c "echo    github.com >> /etc/hosts"

189.3.3. 手工安装

手工安装,下载 hacs.zip 文件,然后复制到 homeassistant 机器上

unzip hacs.zip
scp -r hacs root@homeassistant.local:/tmp/

将宿主主机的 hacs 目录复制到 homeassistant 容器中的 /config/custom_components/ 目录下

root@homeassistant:~# docker cp /tmp/hacs homeassistant:/config/custom_components/
                             Successfully copied 11.6MB to homeassistant:/config/custom_components/
root@homeassistant:~# docker exec -it homeassistant bash
homeassistant:/config# ls custom_components/

集成方法 https://hacs.xyz/docs/configuration/basic/

189.3.4. Node-Red


scp -r hass-node-red-1.4.0 root@homeassistant.local:/usr/share/hassio/homeassistant/custom_components/

189.3.5. Xiaomi Miot Auto