Skip to content

Comments

Code modernization + Countdown to close#3

Open
rinc3w1nd wants to merge 3 commits intoUnallocated:masterfrom
rinc3w1nd:master
Open

Code modernization + Countdown to close#3
rinc3w1nd wants to merge 3 commits intoUnallocated:masterfrom
rinc3w1nd:master

Conversation

@rinc3w1nd
Copy link

@rinc3w1nd rinc3w1nd commented Feb 23, 2026

I've been gone for a while and was thinking about you guys. This is an alt for GitHub. Mileage may vary. Couldn't test locally.
-lov3craft

rinc3w1nd and others added 3 commits February 23, 2026 15:21
…idation

- Replace RPi.GPIO with gpiozero TrafficLights for simpler API and automatic cleanup
- Add environment variable configuration for pins, port, host, and timing
- Add Python logging for production visibility
- Add input validation on Flask routes (return 404 for invalid color/action)
- Fix if/if/if chain to if/elif/elif to prevent undefined message variable
- Fix bare except clause to catch ValueError specifically
- Cap rager iterations to prevent abuse
- Add type hints to all functions
- Use PEP 8 naming conventions throughout
- Use f-strings instead of string concatenation
- Remove dead code, commented-out blocks, and unused imports
- Update template to use dict-based data structure instead of fragile list indexing
- Pin dependency versions in requirements.txt
- Modernize systemd service with User/Group, restart policy, journal logging
- Rewrite test scripts from Python 2 to Python 3 with gpiozero
- Update .gitignore with specific patterns instead of overly broad .*
Allows a keyholder to schedule a venue closing time via password-protected
form. Runs an automated light sequence (warning yellow → flashing red →
solid red → off) and locks the UI during the countdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the old mini.css UI with a self-contained dark dashboard featuring
realistic glowing LED visualizations, real-time polling, and toast
notifications. Migrate all routes to a JSON API with session-based
keyholder authentication (PIN + hmac.compare_digest), system lock/unlock
capability, and proper access control for light operations during lock
or closing sequences.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rinc3w1nd
Copy link
Author

image

@rinc3w1nd
Copy link
Author

image

@rinc3w1nd
Copy link
Author

Note - Heavily accelerated with Claude Code.

@ckoval7
Copy link
Member

ckoval7 commented Feb 23, 2026

I'll have to see if the traffic light is even hanging up at the new location. @Digital-Tinker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants