从 PrismaAPP API(Löwenstein Medical)获取 CPAP 治疗数据,并写入每日 Obsidian 日志。用户说“CPAP 日志”“睡眠治疗”等时使用。
Automatically fetches CPAP therapy data from the Löwenstein PrismaAPP backend and writes a structured daily Obsidian note.
my.prismacloud.com with a linked Löwenstein CPAP deviceskills/cpap-prisma-app/config.jsonYesterday (default):
bash
python3 ~/.openclaw/workspace/skills/cpap-prisma-app/scripts/fetch-cpap.py
Specific date:
bash
python3 ~/.openclaw/workspace/skills/cpap-prisma-app/scripts/fetch-cpap.py 2026-04-06
Backfill all data since first sync:
bash
python3 ~/.openclaw/workspace/skills/cpap-prisma-app/scripts/fetch-cpap.py --all
Backfill from a specific date:
bash
python3 ~/.openclaw/workspace/skills/cpap-prisma-app/scripts/fetch-cpap.py --from=2026-03-01
The script prints a summary and writes the note to:
text
<vault_path>/<log_dir>/YYYY-MM-DD.md
The generated note contains:
All text is fully localised — see the locales/ folder.
API valueLabelMeaning0🟢 GoodOptimal1🟡 OkayAcceptable2🔴 PoorNeeds attention3🟠 BorderlineMonitor closely4—No data
AHIClassification< 5Normal5–15Mild15–30Moderate> 30Severe
No data for date:
Login error:
config.jsonmy.prismacloud.com is reachableconfig.json updateWrong API responses (HTML instead of JSON):
my.prismacloud.com as the API basebucharest.prismacloud.cc is the web SPA only — it returns HTML for all pathstext
17 18 * * * python3 /path/to/skills/cpap-prisma-app/scripts/fetch-cpap.py