从HCGateway获取Amazfit GTR3健康数据,并写入每日的Obsidian日志。当用户说“健康日志”、“GTR3数据”、“写入健康数据”等时使用。
Automatically fetches Amazfit GTR3 health data from HCGateway and writes a structured daily Obsidian note.
http://127.0.0.1:6644hcgateway_api + hcgateway_db are activeskills/amazfit-health-log/config.jsonbash
docker ps --filter "name=hcgateway" --format "{{.Names}}: {{.Status}}"
If containers are not running:
bash
sudo docker compose -f /home/docker/hcgateway/docker-compose.yml up -d
For yesterday (default):
bash
python3 ~/.openclaw/workspace/skills/amazfit-health-log/scripts/fetch-health.py
For a specific date:
bash
python3 ~/.openclaw/workspace/skills/amazfit-health-log/scripts/fetch-health.py 2026-04-06
The script prints a summary and writes the note to:
text
<VAULT_ROOT>/30 Bereiche/Gesundheit/Logs/GTR3/YYYY-MM-DD.md
The generated note contains:
CodeStage1Awake4Light5Deep6REM
No data for date:
Containers unreachable:
bash
sudo docker compose -f /home/docker/hcgateway/docker-compose.yml logs --tail=20
Changing credentials:
skills/amazfit-health-log/config.jsonFor automatic daily execution:
text
0 6 * * * python3 /home/openclaw/.openclaw/workspace/skills/amazfit-health-log/scripts/fetch-health.py
TypeHCGateway EndpointSourceSteps/fetch/stepscom.huami.watch.hmwatchmanagerSleep/fetch/sleepSessioncom.huami.watch.hmwatchmanagerHeart Rate/fetch/heartRatecom.huami.watch.hmwatchmanagerResting HR/fetch/restingHeartRatecom.huami.watch.hmwatchmanagerSpO2/fetch/oxygenSaturationcom.huami.watch.hmwatchmanagerDistance/fetch/distancecom.huami.watch.hmwatchmanager