Introduction
Life in a modern city involves managing a lot of moving parts—traffic, train delays, changing weather, and academic schedules. I found myself checking multiple apps every morning, so I decided to consolidate everything into a single service: Timekeeper.
The Evolution: From AI to Data
Originally, I experimented with using AI (Gemini) to summarize my day. However, I realized that for a "Personal Assistant," speed and reliability are more important than conversational flair. I refactored the entire project into a clean, Object-Oriented (OOP) Python engine that relies on direct API data.
Core Modules
The system is divided into specialized managers, each handling a specific part of my day:
🚗 Traffic & Commute
Using the Google Maps API, Timekeeper monitors my route to the train station. - Dynamic "Leave Now" Alerts: If traffic builds up, it calculates exactly when I need to walk out the door to make my 8:00 AM train. - Chelsea’s Commute: I added a specialized monitor for my partner, Chelsea, to help her navigate her 10:00 AM work start.
🚆 Public Transport (GTFS-Realtime)
Traffic is only half the battle. Timekeeper also parses Translink GTFS feeds. - It watches for delays at Eagle Junction and Central station. - If a train is more than 60 seconds late, I get a Discord ping before I even leave the house.
🌤️ Weather Awareness
Instead of just a forecast, I wanted context: - BOM Integration: It parses XML feeds from the Bureau of Meteorology for severe weather warnings. - Condition Change Alerts: If it starts raining while I'm at work, I know to adjust my route home.
The "Quiet Hours" Logic
One of the most important features is the Notification Suppression. I don't want a "Heavy Rain" alert at 2:00 AM unless it’s a critical emergency.
# Suppress notifications between 1:00 AM and 4:59 AM
is_quiet_hours = 1 <= now_brisbane.hour < 5
if is_quiet_hours and not force:
logging.info(f"Suppressed: {title}")
return
Automated Health Checks
Since Timekeeper runs in a Docker container on my homelab, I implemented a Heartbeat System. Every minute, it updates a timestamp file. If the file stops updating, my Proxmox monitoring knows the service has crashed and needs a restart.
Conclusion
Timekeeper has saved me countless minutes of "app-hopping." By moving to a structured OOP design, I can easily add new modules—like a "Finance Monitor" or "Grocery Reminder"—without breaking the core scheduler. It’s not just a script; it’s the backbone of my daily routine.
Comments