Commit Graph

9 Commits

Author SHA1 Message Date
7071cb7c34 fix: curfew boundary math, HTTP blocking, state file robustness, budget API hardening
- curfew_status: rewrite next-transition calculation to scan up to 7 days
  ahead; old branching showed wrong 'blocked until' for Friday nights
  (assumed next day = weekday schedule) and Sunday nights (off by 2 days).
  Verified against a minute-by-minute reference for a full week: 10080/10080.
- server: ThreadingHTTPServer so slow /status (pings/ssh) no longer blocks
  the TURN OFF button and /budget requests.
- devices: atomic state file writes (tmp + os.replace) and tolerant
  _load_state so a crash mid-write can't silently kill the whole system.
- server: /budget takes _timer_lock (no lost updates vs the budget tick)
  and rejects unknown device ids instead of creating junk state entries.
- status: devices carry an explicit id; web UI keys off it instead of
  parsing titles.
- gabi_check: exact username match (no more 'gabriel' false positives).
- gaja: password readable from GAJA_PASSWORD env var (hardcoded value
  remains as fallback).
- tui: drop unused import.
2026-09-02 20:09:32 +02:00
f3b5cd40fb Add a TUI. 2026-06-09 09:45:55 +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