Skip to content

Latest commit

 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Safety Workspace (pi4)

Layout

  • pet/: voice/camera companion app (Python + ADB + Termux)
  • android-flash-kit/: phone flashing/rooting related assets
    • images/: boot/twrp/patched images
    • meta/: kernel/vbmeta/dtb/ramdisk artifacts
    • tools/: magisk/busybox/apk/tools
    • lib/: extracted native libs

Goal

Build a practical home safety system for a 3.5-floor house:

  • Easy SOS access (especially near stairs)
  • Minimal privacy impact
  • Reliable alerts to family

Recommended Architecture (MVP)

  1. ESP32 SOS buttons distributed by floor/stairs
  2. Pi4 as central receiver and alert router
  3. Phone as optional secondary path (not single point of failure)
  4. Camera for event-triggered snapshots only (no default 24/7 recording)

Placement Plan (3.5-floor townhouse)

  • Floor 1: 1 SOS button near living area
  • Floor 2: 1 SOS button near bedroom/living area
  • Floor 3: 1 SOS button near frequently used space
  • Stairs:
    • 1 button at lower landing
    • 1 button at upper landing
    • Optional: 1 large slap/pull type trigger at middle segment

Suggested device IDs:

  • F1_MAIN, F2_MAIN, F3_MAIN, STAIR_LOW, STAIR_HIGH, STAIR_MID

Procurement List

Core

  • Raspberry Pi 4B (already available)
  • microSD card (high endurance recommended)
  • Official/quality Pi power supply
  • Stable Wi-Fi AP / Mesh node (for full-house signal)

SOS Nodes

  • ESP32 development boards x 5-6
  • Large momentary buttons x 5-6 (high visibility)
  • Enclosures x 5-6
  • USB power adapters + cables (where wall power exists)
  • Battery kits for no-outlet areas (stairs):
    • 18650 holder + protected 18650 cells OR AA battery pack
    • Optional charging board / battery protection module

Optional Safety Add-ons

  • Buzzer or siren module (local audible confirmation)
  • LED indicator strips/buttons (visual confirmation)
  • PIR/mmWave sensor for inactivity detection (stairs/high-risk zones)
  • UPS/power bank for Pi backup power

Camera (Privacy-first)

  • 1 low-cost USB webcam or Pi camera
  • Use event-triggered snapshot only, no always-on stream by default

Software Stack (Suggested)

  • Pi Receiver: Python FastAPI/Flask or Node.js endpoint
  • Transport: HTTP webhook (simple) or MQTT (scalable)
  • Notification: LINE Notify alternative / Telegram bot / SMS provider
  • Logging: local JSON/SQLite event log
  • Heartbeat monitor: offline alert when SOS node stops reporting

Event Policy

  • Short press: assist (normal help request)
  • Long press (>=3 sec): emergency
  • All events include:
    • device_id
    • event_type
    • timestamp
    • battery_level (if available)

Escalation example:

  1. Send instant message to family
  2. If no acknowledgement in 60 sec, re-alert + backup contact
  3. Optional local buzzer feedback to confirm event was sent

Privacy Policy (Default)

  • No continuous audio recording
  • No continuous public streaming
  • Camera snapshots only on event trigger
  • Auto-delete event images after retention window (e.g., 24-72h)

TODOs

Phase 1 - MVP (this week)

  • Define final button count and install locations
  • Buy 2 prototype ESP32 + buttons first
  • Build Pi receiver endpoint (/sos)
  • Send Telegram/LINE alert from Pi on event
  • Implement short/long press detection on ESP32
  • Add heartbeat ping from ESP32 to Pi (every 5-10 min)
  • Add offline alert if heartbeat missing > 30 min

Phase 2 - House rollout

  • Deploy full 5-6 SOS nodes with unique IDs
  • Label each device physically (same as device_id)
  • Validate Wi-Fi coverage on every floor and stair segment
  • Add battery status report + low battery alert
  • Add local LED/buzzer confirmation on button press

Phase 3 - Reliability & operations

  • Add backup power for Pi (UPS/power bank)
  • Add event log dashboard (last 7 days)
  • Add monthly maintenance checklist
  • Run family drill: simulate emergency and verify notification path

Maintenance Checklist

  • Weekly: test at least one button per floor
  • Monthly: battery inspection/replacement plan for stair buttons
  • Quarterly: full end-to-end emergency drill

Notes

  • Existing pet/ app remains available for voice/camera interaction.
  • Safety SOS path should be independent from voice recognition reliability.

About

ai-cat home safety + pet + android flash kit

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages