- Add GET /stream SSE endpoint to aggregator.py; state is pushed instantly on every change instead of fetched every 2s - Replace setInterval polling in index.html with EventSource; onerror shows the ( ?.?) face and auto-reconnect is handled by the browser natively - Fix ModuleNotFoundError in detectors: inject project root into PYTHONPATH when launching subprocesses from kao.py - Update openapi.yaml, CLAUDE.md, README.md with /stream endpoint - Remove completed SSE item from TODO.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
1.2 KiB
Markdown
25 lines
1.2 KiB
Markdown
# Kao — TODO
|
|
|
|
Feature ideas for future work, roughly in priority order.
|
|
|
|
## REST API improvements
|
|
|
|
- **Notification queue** — buffer rapid `/notify` calls and auto-advance through
|
|
them instead of clobbering; important when HA fires several events at once
|
|
- **Sticky notifications** — a `sticky: true` flag on `/notify` to keep a
|
|
notification visible until explicitly cleared via `/clear`, rather than TTL-expiring
|
|
- **Named presets** — define reusable notification profiles in `config.json`
|
|
(e.g. `"doorbell"` → specific emote/sound/color/duration) so callers can
|
|
POST `{"preset": "doorbell"}` without repeating fields every time
|
|
- **Batch `/notify`** — accept an array in a single POST so multiple
|
|
notifications can be queued atomically
|
|
- **`/history` endpoint** — a ring buffer of the last N state changes/events
|
|
received, for auditing what fired overnight without tailing logs
|
|
|
|
## Display / frontend
|
|
|
|
- **Brightness curve** — dim gradually after dark rather than hard-sleeping;
|
|
reduces OLED burn-in without losing glanceability
|
|
- **Scrolling ticker** — when multiple events are active, cycle through their
|
|
messages rather than only showing the top one
|