nclamvn/openclawvn/eldercare-fall-detect
Claude Code and agent skill by nclamvn/openclawvn
- community
Checking that the SKILL.md file is still in the repository.
Phát hiện bà ngã bằng 2 layer: Layer 1: Aqara FP2 native fall detection entity (nếu firmware hỗ trợ) Layer 2: AI pattern — motion spike rồi bất động đột ngột (> 5 phút) Khi phát hiện → TTS hỏi bà xác nhận → chờ 30 giây → nếu bà không trả lời → trigger SOS Level 2. Đối tượng: Người cao tuổi cần chăm sóc, nằm giường.
Install
npx vskill@latest install nclamvn/openclawvn/eldercare-fall-detectSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Eldercare Fall Detect — Phát hiện bà ngã
Skill này phát hiện té ngã bằng 2 layer và xác nhận trước khi escalate.
Khi nào skill này chạy
Skill này KHÔNG chạy theo cron. Nó được trigger bởi:
- HA Event:
state_changedtrên entity fall detection (Layer 1) - Từ eldercare-monitor: Khi monitor phát hiện pattern nghi ngờ ngã (Layer 2)
Layer 1: Aqara FP2 Native Fall Detection
Kiểm tra entity tồn tại
Trước tiên, kiểm tra xem firmware FP2 có hỗ trợ fall detection không:
- Nếu entity TỒN TẠI → Layer 1 active, subscribe event
- Nếu entity KHÔNG TỒN TẠI (unavailable / not found) → Layer 1 disabled, chỉ dùng Layer 2
Khi FP2 báo fall detected
Khi binary_sensor.grandma_room_fall_detected chuyển sang on:
- Log:
eldercare_fall_raw_{timestamp}: { "source": "fp2_native", "entity_state": "on" } - Chuyển sang Bước Xác Nhận (xem bên dưới)
False positive filtering (Layer 1)
FP2 fall detection có thể false positive khi:
- Bà nằm xuống giường bình thường (từ ngồi → nằm)
- Trẻ con/thú nuôi di chuyển nhanh
Lọc:
- Nếu
sensor.grandma_room_motion_minutes< 2 VÀbinary_sensor.grandma_room_presence= on → có thể bà chỉ nằm xuống - Vẫn tiếp tục TTS xác nhận, nhưng ghi note:
"likely_normal_movement": true
Layer 2: AI Pattern Detection
Pattern: Motion Spike → Sudden Stillness
Được trigger từ eldercare-monitor khi phát hiện pattern sau:
- Motion spike: Camera motion (
binary_sensor.grandma_room_camera_motion) chuyểnonđột ngột - Rồi bất động:
sensor.grandma_room_motion_minutestăng nhanh (> 5 phút bất động) ngay sau spike - Presence vẫn on:
binary_sensor.grandma_room_presence= on (người vẫn trong phòng)
Quy tắc phát hiện (eldercare-monitor gọi skill này khi):
- Camera motion
on→ rồiofftrong vòng 30 giây (spike ngắn) - SAU ĐÓ: motion_minutes tăng liên tục > 5 phút
- VÀ: KHÔNG phải giờ ngủ đêm (22-6h) hoặc giờ nap (13-15h)
- VÀ: Presence = on
Khi match pattern → log + chuyển sang Bước Xác Nhận.
Loại trừ false positive (Layer 2)
KHÔNG trigger khi:
- Giờ ngủ đêm (22:00-06:00)
- Giờ nap (13:00-15:00) VÀ no motion < 30 phút (bà vừa nằm ngủ)
- Đang có cuộc gọi video (check memory
eldercare_call_*trong 30 phút qua) - SOS đã active (check memory
eldercare_sos_active→ resolved=false) - Đã có fall detect check trong 10 phút qua (cooldown — check memory
eldercare_fall_last_check)
Bước Xác Nhận (TTS Confirm)
QUAN TRỌNG: KHÔNG bao giờ trigger SOS ngay. PHẢI hỏi bà trước.
1. Chụp camera snapshot
2. TTS hỏi bà (VOLUME CAO, CHẬM)
Set volume MAX:
TTS:
3. Chờ 30 giây
Trong 30 giây, kiểm tra:
- Sensor motion: Nếu
sensor.grandma_room_motion_minutesreset về 0 (bà cử động) → BÀ ỔN - Voice reply: Nếu có voice input (qua Whisper STT) chứa "ổn", "ừ", "được", "không sao" → BÀ ỔN
- Camera motion: Nếu
binary_sensor.grandma_room_camera_motion= on → BÀ CỬ ĐỘNG
4. Kết quả xác nhận
Bà ỔN (có phản hồi trong 30s):
- TTS: "Dạ, tốt quá! Bà nghỉ ngơi nha!"
- Log:
eldercare_fall_check_{timestamp}: { "result": "confirmed_ok", "source": "{fp2_native|ai_pattern}", "response_type": "{motion|voice|camera}" } - Gửi Zalo cho contact ưu tiên #1 (nếu nguồn là fp2_native):
ℹ️ [Bà Nội Care] FP2 phát hiện nghi ngã lúc {giờ}. Đã hỏi bà — bà ổn. [Ảnh camera]
- Cập nhật
eldercare_fall_last_check= timestamp hiện tại
Bà KHÔNG phản hồi (hết 30s, không cử động):
- TTS lần 2 (lần cuối): "Bà ơi! Bà có nghe không ạ? Bà cử động tay chân giúp con!"
- Chờ thêm 15 giây
- Nếu VẪN không phản hồi:
- Chụp thêm 1 snapshot mới
- Log:
eldercare_fall_check_{timestamp}: { "result": "no_response", "source": "{fp2_native|ai_pattern}", "escalated": true } - Trigger SOS Level 2 — gọi skill eldercare-sos với source = "fall_detect"
- Gửi kèm 2 ảnh snapshot (trước và sau TTS)
- Cập nhật
eldercare_fall_last_check= timestamp hiện tại
Config Override (đọc từ memory)
Trước khi dùng giá trị mặc định, PHẢI kiểm tra memory:
- Dùng memory search query
eldercare_fall_config - Nếu tìm thấy → parse JSON, dùng config từ memory
- Nếu KHÔNG tìm thấy → dùng defaults từ fall-config.json
Các field có thể override:
detection.stillness_threshold_minutes(mặc định: 5)detection.spike_window_seconds(mặc định: 30)confirm.tts_wait_seconds(mặc định: 30)confirm.second_tts_wait_seconds(mặc định: 15)cooldown.between_checks_minutes(mặc định: 10)
Cooldown
- Không trigger fall check quá 1 lần mỗi 10 phút (tránh spam TTS cho bà)
- Check memory
eldercare_fall_last_checktimestamp - Nếu < 10 phút trước → skip, chỉ log:
eldercare_fall_skipped_cooldown_{timestamp}
Entities
| Entity ID | Ý nghĩa | |
|---|---|---|
binary_sensor.grandma_room_fall_detected | FP2 native fall detect (nếu có) | |
binary_sensor.grandma_room_presence | mmWave presence | |
sensor.grandma_room_motion_minutes | Phút từ cử động cuối | |
binary_sensor.grandma_room_camera_motion | Camera phát hiện cử động | |
camera.grandma_room | Camera phòng bà (snapshot) | |
media_player.grandma_room | Loa phòng bà (TTS) |
Offline Queue Integration
Khi gửi thông báo thất bại (Zalo error):
- Lưu vào memory:
eldercare_queue_{timestamp} - Priority:
EMERGENCY(nếu escalated to SOS) hoặcINFO(nếu bà ổn) - Skill eldercare-offline-queue sẽ retry
Quy tắc an toàn
- KHÔNG trigger SOS ngay khi phát hiện ngã — PHẢI hỏi bà trước
- KHÔNG trigger khi giờ ngủ/nap (trừ khi Layer 1 FP2 báo)
- PHẢI có cooldown 10 phút giữa các lần check
- PHẢI chụp camera snapshot trước và sau TTS
- PHẢI log mọi detection (cả true positive và false positive)
- TTS cho bà phải CHẬM, RÕ RÀNG, VOLUME CAO
Tóm tắt flow
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/eldercare-fall-detect/SKILL.md
Popularity
- Repository stars
- 53
- Repository forks
- 26
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Mar 2026, 7 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nclamvn/openclawvn/eldercare-fall-detect)