Cory 105 Lab Availability System

View on GitHub View Live Site

A real-time lab station monitoring and queue management system for UC Berkeley's EECS 106A/B robotics courses, serving 200+ students per semester.

Cory 105 Lab Availability System Screenshot

Overview

Built to solve a real problem: students would walk across campus to Cory 105, only to find all robot stations occupied. This Flask-based web application provides real-time visibility into which of the 11 lab stations (6 Turtlebots, 5 UR7e robot arms) are available, plus a smart queue system that notifies students via email when a station opens up.

Key Features

Real-time Station Monitoring

SSH into each lab machine every 10 seconds during office hours (1 minute otherwise) to check active user sessions via the who command. Automatic retry logic handles network failures.

Smart Queue System

When all stations of a type are full, students can join a queue. When a station opens, the first person in queue receives an email with a 5-minute claim window.

Google OAuth Authentication

Secure berkeley.edu-only authentication ensures only UC Berkeley students can join queues. Session management persists across browser refreshes.

Calendar-Aware Scheduling

Parses ICS calendar files to detect Lab OH vs Lab Section times. Adjusts update frequency and queue visibility based on current lab status.

Admin Dashboard

Course staff can manage queues (drag to reorder, remove entries), set manual station overrides, and upload course calendars.

Email Notifications

Gmail SMTP integration sends claim notifications with unique tokens. Confirmed claims keep stations marked as "claimed" until the student actually logs in.

Technical Architecture

The system runs on UC Berkeley's apphost infrastructure with multiple systemd services working in concert:

The architecture separates concerns: data collection runs independently of the web server, ensuring the site remains responsive even during SSH connection delays. State is tracked in both MySQL (for station status) and CSV files (for queues and claims), with JSON files caching previous states for change detection.

Interactive Lab Layout

Dynamic SVG visualization shows the physical layout of Cory 105 with color-coded availability:

Cory 105 Lab Room Layout