From f7b4c60af2dd24b326f44dc069647044c46c4112 Mon Sep 17 00:00:00 2001 From: impressionyang Date: Wed, 15 Apr 2026 18:31:11 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20README=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=92=8C=E6=9B=B4=E6=96=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加本地部署方式(开发/测试推荐) - 添加 HACS 安装方式 - 添加手动安装方式(生产环境) - 添加 Git 更新流程说明 Co-Authored-By: Claude Opus 4.6 --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0cd4a54..f4844f7 100644 --- a/README.md +++ b/README.md @@ -27,23 +27,63 @@ ## 安装 -### 通过 HACS 安装(推荐) +### 方式一:本地部署(开发/测试推荐) + +**快速部署命令**: +```bash +# 克隆或进入项目目录 +cd /path/to/impress_sig_mesh_hacs + +# 复制到 Home Assistant 配置目录 +cp -r custom_components/sigmesh_gateway ~/.homeassistant/custom_components/ + +# 重启 Home Assistant +ha core restart +``` + +**部署脚本**(如已创建 `deploy.sh`): +```bash +chmod +x deploy.sh +./deploy.sh +``` + +### 方式二:通过 HACS 安装 + +**前提**: 需要将代码发布到 Git 仓库并创建 Release 1. 打开 HACS 2. 点击 "Integrations" 3. 点击右上角菜单 → "Custom repositories" -4. 添加仓库:`https://github.com/impress-sig-mesh/sigmesh_gateway` +4. 添加仓库:`http://192.168.124.9:33001/impressionyang/impress_sig_mesh_hacs` 5. 选择类别:`Integration` 6. 点击 "Add" 7. 找到 "SigMesh Gateway" 并点击 "Download" 8. 重启 Home Assistant -### 手动安装 +### 方式三:手动安装(生产环境) -1. 下载最新版本的 `sigmesh_gateway.zip` -2. 解压到 `config/custom_components/sigmesh_gateway/` +1. 从 Releases 页面下载最新版本的 `sigmesh_gateway.zip` +2. 解压到 `/custom_components/sigmesh_gateway/` 3. 重启 Home Assistant +--- + +## 更新 + +**从 Git 拉取最新代码并部署**: +```bash +cd /path/to/impress_sig_mesh_hacs + +# 拉取最新代码 +git pull origin main + +# 重新部署 +cp -r custom_components/sigmesh_gateway ~/.homeassistant/custom_components/ + +# 重启 Home Assistant +ha core restart +``` + ## 配置 ### UI 配置(推荐)