← 返回
未分类 中文

Apple Health → OpenClaw

Sync Apple Health data from iPhone to OpenClaw. One QR code scan — no manual setup. Works on Mac, Linux, and VPS.
将 iPhone 的 Apple Health 数据同步到 OpenClaw。只需扫描一次二维码,无需手动配置。支持 Mac、Linux 和 VPS。
reffwu reffwu 来源
未分类 clawhub v2.0.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 315
下载
💾 0
安装
1
版本
#apple#biometrics#chinese#fitness#health#healthkit#iphone#latest

概述

Apple Health Sync

Companion iOS app: Health Sync for OpenClaw — install from the App Store or sideload the IPA.


Setup (first time)

When the user asks to set up, connect their iPhone, or pair their phone, run:

python3 {baseDir}/scripts/setup.py

This script:

  1. Reads your OpenClaw gateway token automatically
  2. Detects your machine's accessible IP (LAN or public)
  3. Starts the gateway in LAN mode if needed
  4. Prints a QR code in the terminal

Tell the user:

> 打开 Health Sync for OpenClaw App,点击「扫码自动配置」,扫描上方的 QR 码即可完成配置。

After scanning, the app is fully configured — no manual URL or token entry needed.

If the QR code is too big for the terminal

The script also prints the raw JSON. Tell the user they can manually enter it, or run with --compact for a smaller QR:

python3 {baseDir}/scripts/setup.py --compact

If OpenClaw is on a VPS / remote server

The script auto-detects VPS vs local and picks the right IP automatically.

If the detected IP is wrong, or you have a domain name, pass it explicitly:

python3 {baseDir}/scripts/setup.py --host <your-public-ip-or-domain>

The script will also check if port 18789 is reachable and print firewall instructions if not:

# Linux iptables
sudo iptables -A INPUT -p tcp --dport 18789 -j ACCEPT

# Ubuntu ufw
sudo ufw allow 18789/tcp

# Oracle Cloud: Console → VCN → Security List → Add Ingress Rule TCP 18789

Auto-trigger: incoming health data

Activate automatically when a message starts with 🍎 Apple Health 数据更新.

Do NOT ask for confirmation — just ingest and acknowledge in one line.

python3 {baseDir}/scripts/ingest.py << 'EOF'
[paste full message here]
EOF

Reply format (one line only):

> ✅ 已存储 N 条 [类型] 数据(时间)


User health queries

Activate when the user asks about steps, heart rate, sleep, weight, HRV, calories, workouts, SpO2, etc.

# Specific type
python3 {baseDir}/scripts/query.py --type stepCount --period today

# Summary
python3 {baseDir}/scripts/query.py --summary --period week

# Database status
python3 {baseDir}/scripts/query.py --status

Type mappings:

用户说--type
----------------
步数/步stepCount
心率heartRate
HRVheartRateVariabilitySDNN
血氧oxygenSaturation
体重bodyMass
睡眠sleepAnalysis
卡路里activeEnergyBurned
运动workout
呼吸率respiratoryRate
体温bodyTemperature
血压收缩bloodPressureSystolic
血压舒张bloodPressureDiastolic

Format query output naturally in Chinese. Never dump raw JSON.


Data storage

All data lives at ~/.apple-health-sync/health.db (SQLite, created automatically on first ingest).


Rules

  1. Auto-ingest first, acknowledge second — no confirmation prompts on incoming data.
  2. Never fabricate data — only report what's in the database.
  3. All responses in Chinese.
  4. Never expose the bearer token to the user.
  5. If setup fails, show the exact error and suggest --host flag for custom IP.

版本历史

共 1 个版本

  • v2.0.0 当前
    2026-05-09 17:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

life-service

Sonoscli

steipete
控制Sonos音箱(发现/状态/播放/音量/分组)
★ 56 📥 85,234
ai-agent

L4 Skill Forge

reffwu
设计并产出可发布的 Agent Skill(L4生产级)。用于从0到1创建技能、重构现有技能、做安全评审、建立评估与发布流程。
★ 2 📥 735
life-service

Caldav Calendar

asleep123
使用 vdirsyncer + khal 同步并查询 CalDAV 日历(iCloud、Google、Fastmail、Nextcloud 等)。适用于 Linux。
★ 244 📥 30,678