{"id":24317906,"url":"https://github.com/netcookies/gewe-notify","last_synced_at":"2025-09-01T04:33:36.286Z","repository":{"id":268679012,"uuid":"904663616","full_name":"netcookies/Gewe-Notify","owner":"netcookies","description":"Gewe-Notify 是一个基于 Home Assistant HACS 的插件，允许用户通过 Home Assistant 系统调用 Gewechat 后端 API 的发送微信。","archived":false,"fork":false,"pushed_at":"2025-03-09T06:00:23.000Z","size":283,"stargazers_count":17,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T01:36:42.920Z","etag":null,"topics":["docker","home-assistant","homeassistant","homeassistant-integration","wechat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netcookies.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-17T10:18:27.000Z","updated_at":"2025-07-11T06:06:41.000Z","dependencies_parsed_at":"2024-12-18T09:30:56.261Z","dependency_job_id":"d02a2764-278f-4777-8674-d42c9e1237c8","html_url":"https://github.com/netcookies/Gewe-Notify","commit_stats":null,"previous_names":["netcookies/gewe-notify"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/netcookies/Gewe-Notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FGewe-Notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FGewe-Notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FGewe-Notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FGewe-Notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netcookies","download_url":"https://codeload.github.com/netcookies/Gewe-Notify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netcookies%2FGewe-Notify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273073338,"owners_count":25040704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","home-assistant","homeassistant","homeassistant-integration","wechat"],"created_at":"2025-01-17T14:35:33.415Z","updated_at":"2025-09-01T04:33:36.261Z","avatar_url":"https://github.com/netcookies.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gewe-Notify\n\nGewe-Notify 是一个基于 Home Assistant HACS 的插件，允许用户通过 **Home Assistant** 系统调用 **Gewechat** 后端 API 的发送微信。\n\n## 功能特点\n\n- 支持通过 Home Assistant 发送微信\n- 支持 **Action --\u003e Notify** 动作\n- 支持 **微信在线状态实体**,可用于自动化检测微信是否在线\n- 轻量、易于安装和配置\n- 适用于使用 **Home Assistant** 和 **Gewechat** 的用户\n\n## 安装\n\n### 先决条件\n\n- 确保你已安装 [Home Assistant](https://www.home-assistant.io/) 并已配置好 HACS（Home Assistant Community Store）。\n- 本插件依赖 **Gewechat** 后端 API，请参阅 [Gewechat 部署文档](https://github.com/Devo919/Gewechat) 进行配置。\n- **Gewechat** 是通过模拟一台iPad设备, 而微信只支持一台iPad登录,所以....\n\n### 插图\n\n1. 添加集成或重新配置时支持扫码登录\n![](images/1.png)\n2. 搭配卡片使用搜索userName(wxid)\n![](images/2.png)\n3. 调用 notify 发送微信\n![](images/3.png)\n\n\n# TL;DR\n\n### 安装插件\n\n1. 打开 Home Assistant 系统并进入 HACS。\n2. 搜索 **Gewe-Notify** 插件，并点击 **安装**。\n3. 安装完成后，重启 Home Assistant 系统。\n\n### 配置 Gewechat 后端\n\nGewe-Notify 插件需要配合 **Gewechat** 后端 API 使用。请按照以下步骤部署和配置 **Gewechat** 后端：\n\n1. 根据 [Gewechat 配置指南](https://github.com/Devo919/Gewechat) 完成后端部署。\n2. docker 稳定运行后访问`http://{docker_ip}:2531`，看到 **欢迎使用gewe后台管理框架** 就搞定了。\n\n## 使用方法\n\n1. 在 Home Assistant 中，进入插件设置页面，找到 **Gewe-Notify** 插件。\n2. 配置 Gewechat API 的地址。ex:  \n```\n# 假设你的容器 ip是192.168.0.2\nhttp://192.168.0.2:2531\n```\n3. 首次运行请执行 **Action --\u003e gewe_notify.fetch_contacts**, 可搭配`https://github.com/netcookies/gewe-notify-card`卡片查找target值\n4. 在 Action 中找到**notify.gewe_notify**填入target, 默认消息类型是文本(text), message是必填字段, 但仅在文本类型时有效, 其他类型时请随意填写, 不为空就行, 支持的消息类型见下表。ex:\n```\naction: notify.gewe_notify\ndata:\n  data:\n    message_type: image\n    img_url: https://dummyimage.com/300x300\n  target: someones_wxid\n  message: 这是一个图片消息（图片类型没有message 参数所以无效，但message 是Notify 组件的必填项）\n```\n\n### 支持的消息类型及所需参数\n\n| 消息类型   | 所需参数                                                      | 描述                                                                                           |\n|------------|---------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| `text`     | `message`，`ats`（可选）                                       | 发送文本消息。`ats` 是一个可选参数，用于提及用户。                                                |\n| `file`     | `file_url`，`file_name`                                        | 发送文件消息。                                                                                 |\n| `image`    | `img_url`                                                     | 发送图片消息。                                                                                 |\n| `voice`    | `voice_url`，`voice_duration`                                  | 发送语音消息。`voice_duration` 是语音消息的时长，单位为秒。                                       |\n| `video`    | `video_url`，`video_duration`，`thumb_url`                     | 发送视频消息。`video_duration` 是视频的时长，`thumb_url` 是视频的缩略图 URL。                     |\n| `link`     | `link_url`，`title`，`desc`，`thumb_url`                       | 发送链接消息。`title` 是链接的标题，`desc` 是描述，`thumb_url` 是缩略图 URL。                      |\n\n### 支持的实体、动作和其他功能\n\n1. `sensor.gewe_notify_online_status` 显示微信在线状态，**True** 为在线，**False**为离线。\n2. `action: gewe_notify.get_qrcode` 可手动调用获取登录的二维码，日志会打印当前二维码的url地址和uuid。**注意：获取二维码会退出当前账号**。\n3. `action: gewe_notify.login` 在手机上执行完扫描二维码后调用，需要传入payload参数：uuid、img_url，这两个参数可以从上个action获取。\n```\naction: gewe_notify.login\ndata:\n  uuid: abcdefghijklmn\n  img_url: /local/gewe_qr_code.jpg?v=1234\n```\n\n### 在AppleWatch或其他设备上执行重新登录\n\n1. 执行**http_post**调用`action: gewe_notify.get_qrcode`，ex：`http://your_ha_server_ip:port/api/services/gewe_notify/get_qrcode?return_response`\n2. 从步骤1获取返回值uuid、img_url作为**post**或action参数，调用`action: gewe_notify.login`, ex: `http://your_ha_server_ip:port/api/services/gewe_notify/login`\n3. ios 可以直接导入这个shortcuts `https://www.icloud.com/shortcuts/ed3f146607c0474693f29f32dd7fcd08`\n\n\n## 贡献指南\n\n欢迎大家为 **Gewe-Notify** 插件贡献代码！如果你希望参与开发，请遵循以下步骤：\n\n1. Fork 本仓库。\n2. 创建一个新的分支（`git checkout -b feature-branch`）。\n3. 提交你的修改（`git commit -am 'Add new feature'`）。\n4. 将更改推送到你的分支（`git push origin feature-branch`）。\n5. 创建一个 Pull Request。\n\n## 许可证\n\n本项目使用 **MIT 许可证** - 详细信息请参见 [LICENSE](LICENSE) 文件。\n\n## 感谢\n\n- [Devo919/Gewechat](https://github.com/Devo919/Gewechat) 提供了后端 API。\n- 感谢所有为 Gewe-Notify 和 Gewechat 项目做出贡献的开发者。\n\n## 联系方式\n\n如果你有任何问题或建议，欢迎提出 issue 或联系项目维护者。\n\n---\n\n### 说明\n\n1. **项目描述**：介绍 **Gewe-Notify** 插件的功能，并指出它与 **Gewechat** 后端 API 的依赖关系。\n2. **安装方法**：提供插件的安装方法以及 Gewechat 后端 API 的部署指南。\n3. **使用方法**：详细说明如何配置和使用插件。\n4. **配置**：介绍插件的配置项以及需要设置的 Gewechat API 信息。\n5. **贡献指南**：如何为插件贡献代码。\n6. **感谢**：特别感谢 **Gewechat** 提供的后端 API。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcookies%2Fgewe-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetcookies%2Fgewe-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcookies%2Fgewe-notify/lists"}