You are browsing as a guest. Sign up (or log in) to start making projects!

2h 15m 52s logged

Devlog #4: Retro Robot Enclosure, LED Matrix & Security Backend Integration

🛠️ Summary & Overview

Transitioned RoomOps Zero from a software dashboard into a fully physical retro-tech robot assistant. The physical chassis has been built—featuring an acrylic robot enclosure complete with an integrated LED Matrix display that serves as an expressive face/visual telemetry hub.

On the software side, fully deployed the core security engine in main.py. The backend now supports dynamic system arming/disarming, security PIN verification, automated motion monitoring loops, and immediate smart home alert triggers (escalating room volume, dispatching notifications, and turning Tapo L900 smart light strips red upon motion detection).


⚙️ Key Technical Updates

1. Hardware Assembly & Visual LED Matrix (Chassis & Enclosure)

  • Robot Frame Assembly: Constructed the physical retro robot enclosure housing the Raspberry Pi Zero W board, internal wiring, and top mounting antenna accent.
  • LED Matrix Expression Display: Mounted the bright yellow LED matrix module into the mouth/screen cutout. Configured visual feedback routines to render dynamic waveforms and active telemetry states.
  • Hardware Prep: Prepared structural mounting slots for future physical USB camera integration directly alongside the chassis.

2. Security State Management & PIN Logic (main.py)

  • State Control: Implemented global state flags (armed = False) to track real-time security modes across all REST endpoints.
  • PIN Verification Endpoint: Configured POST /api/verify-pin utilizing Pydantic validation (PinModel) against environment parameters (SECURITY_PIN).
  • Direct Action Routes: Added dual-method action endpoints (/api/arm & /api/disarm) for rapid arming/disarming from web controls and action blocks.

3. Automated Threat Detection & Action Escalation (services/camera.py)

  • Motion Detection Loop: Built the /api/camera/check-motion endpoint to continuously poll motion sensors when the system is armed.
  • Automated Escalation Sequence: Linked motion events to a multi-layered alert workflow:
    1. Triggers desktop notification dispatch via utils.notifier.
    2. Escalates audio volume to maximum (100%) via utils.volume.
    3. Switches room lighting via tapo_control.DeviceFactory by powering on the Tapo L900 light strip and setting its colour directly to Red.
  • Snapshot Cache: Serves capture snapshots dynamically at /static/last_motion.jpg for active monitoring logging.

📡 Active Routes & API Reference

  1. Security State Management

    • Endpoint: GET / POST /api/arm → Sets system status to armed: true.
    • Endpoint: GET / POST /api/disarm → Sets system status to armed: false.
    • Endpoint: GET /api/status → Returns current system state ({"system_armed": armed}).
  2. Security PIN Verification

    • Endpoint: POST /api/verify-pin
    • Payload Example:
      {
        "pin": "1234"
      }
      
    • Response Example:
      {
        "status": "success",
        "correct": true,
        "system_armed": false
      }
      
  3. Motion Detection Polling Endpoint

    • Endpoint: GET /api/camera/check-motion
    • Response Example (Motion Detected):
      {
        "motion": true,
        "system_armed": true,
        "timestamp": "2026-08-26T15:56:00",
        "image_url": "/static/last_motion.jpg"
      }
      
0
34

Comments 0

No comments yet. Be the first!