Home Assistant
Home Assistant 安装
Home Assistant
Docker-Home Assistant
群晖VM-Home Assistant(Supervisor)
Supervisor
Supervisor-无插件
Hacs 家庭助理社区商店
Hacs-和风天气
无法下载
自定义储存库灰色
MQTT
MQTT-红外接收
Tasmota(免编程智能家居)
Tasmota 简易使用
Tasmota 常见指令
Tasmota 重置设备
Tasmota-MQTT
Tasmota-Rules(规则)
Tasmota-Web控制
其它未测试项目
本文档使用 MrDoc 发布
-
+
首页
Hacs 家庭助理社区商店
[Hacs](https://hacs.xyz/) 家庭助理社区商店,扩展你的 Home Assistant ## [Hacs安装](https://hacs.xyz/docs/setup/download) 脚本一键安装,下面任意一个都可 ``` wget -O - https://get.hacs.xyz | bash - #官方脚本 wget -O - https://raw.githubusercontent.com/hacs/install/main/install | bash - #实际下载脚本 wget -O - https://ghproxy.com/https://raw.githubusercontent.com/hacs/install/main/install | bash - #加代理脚本 ``` > 因为实际指向的地址为 Github ,可能会出现无法下载 > 我们可以新建一个 `install.sh` 文件,手动把代码填充进去,给执行权限 > 使用 `bash install.sh` 来手动执行脚本 执行安装完成后重启容器,`配置——设置与日志——服务控制——服务管理——重新启动` 配置——集成,点击右下+号,搜索HACS,安装集成(要确保和Github的网络正常)  随后会有个提示,全部勾就行了  Github授权,点击上方的链接,登录Github帐号,然后输入下方的代码,进行授权到HACS 然后就添加完成,分配区域可以不需要分配 左侧会多个HACS的选项,图标刷新下就可以出来了   刚安装后会在Github中下载内置的软件,需要比较长的时间进行下载,等一会就好了,HACS is starting up这一项就会消失 后面就可以通过HACS——integrations 进行安装所需要的插件了(右下+号) ### `install.sh` 文件代码 存储日期,2022/1/13 ``` #!/bin/bash # wget -O - https://get.hacs.xyz | bash - set -e RED_COLOR='\033[0;31m' GREEN_COLOR='\033[0;32m' GREEN_YELLOW='\033[1;33m' NO_COLOR='\033[0m' declare haPath declare -a paths=( "$PWD" "$PWD/config" "/config" "$HOME/.homeassistant" "/usr/share/hassio/homeassistant" ) function info () { echo -e "${GREEN_COLOR}INFO: $1${NO_COLOR}";} function warn () { echo -e "${GREEN_YELLOW}WARN: $1${NO_COLOR}";} function error () { echo -e "${RED_COLOR}ERROR: $1${NO_COLOR}"; if [ "$2" != "false" ]; then exit 1;fi; } function checkRequirement () { if [ -z "$(command -v "$1")" ]; then error "'$1' is not installed" fi } checkRequirement "wget" checkRequirement "unzip" info "Trying to find the correct directory..." for path in "${paths[@]}"; do if [ -n "$haPath" ]; then break fi if [ -f "$path/home-assistant.log" ]; then haPath="$path" else if [ -d "$path/.storage" ] && [ -f "$path/configuration.yaml" ]; then haPath="$path" fi fi done if [ -n "$haPath" ]; then info "Found Home Assistant configuration directory at '$haPath'" cd "$haPath" || error "Could not change path to $haPath" if [ ! -d "$haPath/custom_components" ]; then info "Creating custom_components directory..." mkdir "$haPath/custom_components" fi info "Changing to the custom_components directory..." cd "$haPath/custom_components" || error "Could not change path to $haPath/custom_components" info "Downloading HACS" wget "https://github.com/hacs/integration/releases/latest/download/hacs.zip" if [ -d "$haPath/custom_components/hacs" ]; then warn "HACS directory already exist, cleaning up..." rm -R "$haPath/custom_components/hacs" fi info "Creating HACS directory..." mkdir "$haPath/custom_components/hacs" info "Unpacking HACS..." unzip "$haPath/custom_components/hacs.zip" -d "$haPath/custom_components/hacs" >/dev/null 2>&1 info "Removing HACS zip file..." rm "$haPath/custom_components/hacs.zip" info "Installation complete." echo info "Remember to restart Home Assistant before you configure it" else echo error "Could not find the directory for Home Assistant" false echo "Manually change the directory to the root of your Home Assistant configuration" echo "With the user that is running Home Assistant" echo "and run the script again" exit 1 fi ```
造物者W
2022年1月13日 22:26
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码