Commit Graph

14 Commits

Author SHA1 Message Date
fdfced6901 fix: reset budgets using state file mtime when server was stopped across the daily reset
The old per-device last_check timestamp was only persisted while a
device was consuming budget, so a stop/restart across days left stale
budgets. Check the state file mtime instead: if it predates today's 7 AM
and we're past 7 AM, the server was offline during the daily reset, so
give every device a fresh budget. Also drops the redundant 2-minute
reset window and the persisted last_check field.
2026-09-02 16:21:47 +02:00
06771cd866 config: adjust allowed hours 2026-09-02 16:03:46 +02:00
10245c97c4 chore: ignore __pycache__ and runtime files, stop tracking generated artifacts 2026-09-02 16:01:41 +02:00
4401b88726 feat: parallelize device shutdown with common _shutdown_devices function
- Curfew and budget exhaustion now use shared _shutdown_devices()
- All device turnoffs run in parallel via ThreadPoolExecutor
- Faster shutdown when multiple devices need to be turned off
2026-06-17 22:23:18 +02:00
2e47aa84f9 feat: complete device management system with float budget tracking, curfew enforcement, TUI, and parallel checks
- Float-based budget tracking with precise elapsed time calculation
- Curfew enforcement (devices turn off when blocked)
- Terminal TUI with live status refresh
- Parallel device checks using ThreadPoolExecutor
- Simplified config with time range format (e.g. '15:00-20:30')
- Optimistic UI updates for budget buttons
- Bug fixes: curfew shutdown, last_check reset on offline
2026-06-16 22:37:48 +02:00
f3b5cd40fb Add a TUI. 2026-06-09 09:45:55 +02:00
d25104b8a1 Make checking parallel (faster). 2026-06-09 09:36:10 +02:00
438836913a Make +- snappier. 2026-06-09 09:32:19 +02:00
0c6e94ef9f Move configuration to config.py 2026-06-09 09:20:49 +02:00
9002cbbe08 Implement curfew. 2026-06-09 09:12:57 +02:00
d3493f50d1 Implementation of the 1 hour budgeting system. 2026-06-09 08:07:45 +02:00
c5b9036644 Move the off.sh script to a pure Python implementation -- devices.py. 2026-06-08 22:59:39 +02:00
b15f87e3d5 Add Gaja to the list of computers 2026-06-08 22:46:46 +02:00
c337a0d5f1 First version -- working. 2026-06-06 15:54:28 +02:00