home assistant 的
02 December 2023
Home Assistant 的 HACS 安装配置
Homa Assistant 下载:https://www.home-assistant.io/installation/alternative HACS 下载:https://hacs.xyz/docs/setup/download/ 使用WireGuard:https://www.hachina.io/04.%E5%85%AC%E7%BD%91%E8%AE%BF%E9%97%AE%E7%AF%87/%E4%BD%BF%E7%94%A8WireGuard/
一、http://raw.githubusercontent.com无法访问
解决方法:修改ha的dns服务。
ping http://raw.githubusercontent.com 可以发现ip是127.0.0.1,说明dns解析有问题,很多教程都是弄定时hosts修改啥的,实在是有点麻烦,其实这个问题很好解决,修改ha的dns服务就好了。
ha dns options --servers dns://ip //ip就是常用的dns,比如8.8.8.8或114.114.114.114
# 如: ha dns options --servers dns://8.8.8.8
设置完再去ping,就发现ip是正常的了,这可以算是最简单的方法了,此方法来源于
HACS与(国内)安装准备 - HACHINA中文网: https://www.hachina.io/09.HACS/HACS%E4%B8%8E(%E5%9B%BD%E5%86%85)%E5%AE%89%E8%A3%85%E5%87%86%E5%A4%87/
二、下载好HACS,在集成中添加HACS的时候无法访问gitbub
解决方法:改hosts 或 上科学上网环境。
GitHub520
GitHub 访问速度慢,图片无法加载?一劳永逸的解决方法
手把手教你解决HACS无法访问github问题:无需科学上网
三、安装HACS 与 Add-On
- 在个人设置里开启进阶模式,重启Home-Assistant;
- 在 Add-On 里安装Terminal & SSH 配置并启动,打开ssh的Web-UI, 输入HACS download script命令:
wget -O - https://get.hacs.xyz | bash -;- 这里需要访问github, 在ssh-terminal添加设置好dns:
ha dns options --servers dns://8.8.8.8,查看:ha dns info. - 访问Github520项目中的github hosts的配置,编加
vi /etc/hosts文件并添加github的hosts.
- 这里需要访问github, 在ssh-terminal添加设置好dns:
- 在设置(Settings -> Devices & Services)里添加 Integrations, 搜索HACS点击添加后,重启;
- Nginx反代需要开启websocket支持,在
config/configuration.yaml添加trusted_proxies如下: ```yaml http: server_port: 8123 use_x_forwarded_for: true trusted_proxies:- 127.0.0.1
- ::1
- 192.168.1.0/24
- 192.168.11.0/24
- 192.168.12.0/24
- 10.10.10.0/24 ```
