jphein/smartring
GitHub: jphein/smartring
一个无需云端的 Home Assistant 集成,通过逆向 Lefun BLE 协议读取廉价智能戒指的健康数据,并利用蓝牙广播构建融合多传感器的全屋跟随式照明系统。
Stars: 0 | Forks: 0
# smartring
**一个无需云端的 Home Assistant 集成,专为廉价的 Lefun 协议 BLE 智能戒指打造 —— 以及基于此构建的房间存在感照明系统。**
[](LICENSE)


这个项目最初的想法只是*“我能不能在不用那个充满广告的厂商 App 的情况下,与这枚 10 美元的戒指通信?”*,后来却演变成了一个覆盖全屋、具备身份识别功能的**跟随式照明**系统。所有操作均在本地运行 ——
无需云端,无需厂商 App,也无需手机。
📖 **[项目站点与详细说明 →](https://jphein.github.io/smartring/)**
&& bluetoothctl trust
# 读取 live data
.venv/bin/python lefun_ring.py --address hr
.venv/bin/python lefun_ring.py --address poll
```
### Home Assistant
1. 将 `custom_components/lefun_ring/` 复制到你的 HA `config/custom_components/` 目录中。
2. 重启 HA → **设置 → 设备与服务 → 添加集成 → "Lefun Ring"**
(可通过任何 Bluetooth 适配器或 ESPHome 代理自动发现)。
3. 启用跟随式照明:将 `ha-packages/lefun_ring.yaml` 放入你的 `packages/` 目录中,使用
`button_lights` 标签标记每个房间的灯具,然后从仪表盘切换开启这些房间。
4. 从 `dashboard/` 导入仪表盘(storage-mode Lovelace YAML)。
有关
集成的详细信息,请参阅 [`custom_components/lefun_ring/README.md`](custom_components/lefun_ring/README.md)。
## 致谢与许可
- 协议移植自 **[Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge)**
Lefun 驱动。房间三边测量由 **[Bermuda](https://github.com/agittins/bermuda)** 提供。
- 由于协议代码源自 Gadgetbridge (AGPL-3.0),本项目采用
**[AGPL-3.0](LICENSE)** 许可。
*与 Lefun 无关联。“Lefun”仅用于标识这些戒指所使用的协议。*

标签:Home Assistant, Python, 低功耗蓝牙, 无后门, 智能家居, 智能戒指, 物联网, 网络调试, 自动化, 逆向工具