Inspiration
Around 16% of adults aged 60 and over live alone, across the 130 countries Pew Research studied (Pew Research Center, 2020). In India, people aged 60 and over are projected to make up almost 19.6% of the population by 2050 (UN figure, reported by Down To Earth), and many have children working in other cities.
Families usually rely on a daily phone call, or an inactivity alarm with one fixed time for everyone. A fixed alarm either cries wolf for someone who sleeps late or waits hours for someone who is up at 6. We wanted something that learns one person's own routine, checks quietly before worrying anyone, and explains itself in plain words.
What it does
CareLoop watches the events a Ring doorbell already produces: human motion and button presses at the front door.
- Learns the person's routine. For each weekday it learns when the person usually first appears at the door (for example, between 6:52 and 7:11 AM on Fridays), and the longest quiet stretch they usually have during the day.
- Notices two kinds of unusual day. Late start: no one has appeared well after the usual window. Long silence: seen in the morning, then nothing for longer than usual.
- Checks before alarming anyone. It takes one Ring snapshot and asks an Amazon Bedrock vision model to describe the doorway. The image is held in memory only and never stored.
- Explains why. The caregiver gets a calm, specific message of 70 words or fewer, in a fixed order: what's unusual, why, what the camera shows, what's been tried, and what to do.
- Asks people in order. First the person themselves (one tap on "I'm OK"), then the family caregiver, then a neighbor. Any acknowledgement stops the ladder.
- Stays honest when the camera is down. If the doorbell goes offline, CareLoop says "monitoring degraded" once, instead of raising a false alarm or going silent.
- Away mode. Alerts pause for travel or visits, and those days are left out of the routine it learns.
Every snapshot, model call, message and acknowledgement is listed in a privacy and audit panel on the dashboard.
How we built it
- Ring API (
backend/app/ring/client.py):GET /v1/users/me,GET /v1/devices,GET /v1/devices/{id}/status,GET /v1/history/devices/{id}/events, andPOST /v1/devices/{id}/media/image/downloadfor the snapshot, tested live with a Ring Developer Playground token. - Statistics decide, AI explains. The routine model and detectors are pure Python functions: per-weekday p10–p90 windows, with the alert threshold at p90 + 45 minutes. For daytime silences it uses the longest gap in each 4-hour block, + 60 minutes. No model ever decides whether to alert.
- Amazon Bedrock Converse API: Amazon Nova Lite describes the snapshot and phrases the caregiver message. Every output passes CareLoop's validator (70 words or fewer, no alarming or medical words, every key time present); if anything fails, a deterministic template is sent instead. An optional Bedrock Guardrail denies the topic "medical diagnosis".
- Escalation: a small state machine with signed, expiring acknowledgement tokens. Telegram messages carry an "I'm OK" / "I'm handling it" button, and a big-button web page serves people who don't use messaging apps.
- Dashboard: one HTML file with SVG charts and no build step, using the Atkinson Hyperlegible typeface, WCAG AA contrast, and keyboard support.
- FastAPI, SQLite, one asyncio loop, and 114 automated tests. Ring, Bedrock and Telegram are mocked in tests, and botocore's Stubber validates every Bedrock request against the real API schema.
Challenges we ran into
- Documentation gaps. Event type names differ between the Ring docs (
motion_detectedwithsub_type: human) and the official sample (motion.human,ding). The snapshot request body wasn't
Built With
- amazon-bedrock
- amazon-nova
- boto3
- fastapi
- httpx
- javascript
- python
- ring-api
- sqlite
- sqlmodel
- telegram-bot-api
Log in or sign up for Devpost to join the conversation.