Endringslogg og utviklingslogg

Se hva som er nytt og hva som kommer i Ampaera

Sist oppdatert: 2025-12-02 v0.32.1

Changelog

All notable changes to the Ampæra Energy Management Platform will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

0.32.1 (2026-01-27)

Bug Fixes

  • i18n: Add missing meter_reading translation key (e1e5d3f)
  • telemetry: Add validation to reject suspicious energy_kwh values (8114152)
  • telemetry: Prefer energy_import_kwh over energy_kwh for AMS meters (b13f5e6)

Documentation

  • Update What's New for v0.30.0-v0.32.0 and fix workflow (884db8e)

0.32.0 (2026-01-27)

Features

  • admin: Refactor admin dashboard for production data (4ed7b11)

Bug Fixes

  • admin: Add impersonation support to timeline and get_current_site_id (051293f)
  • admin: Add impersonation token support to device breakdown endpoint (7a5afac)
  • admin: Repair impersonation system and prepare for migration (b67cdda)
  • docker: Update healthcheck endpoint path (ef69e56)
  • oauth: Support post-login redirect for OAuth2 flows (4dde966)

0.31.0 (2026-01-26)

Features

  • AMS meter data handling and device control improvements (a4cedbc)

Bug Fixes

  • homeassistant: Fix undefined 'entry' variable and import sorting (2de2f36)
  • tests: Add get_optional_user override to test fixtures (4b6f2be)

0.30.0 (2026-01-26)

Features

  • auth: Add Google OAuth login buttons to login/register pages (7b11cfb)
  • auth: Implement email verification and Google OAuth2 login (ae3c7dd)
  • homeassistant: Add icons.json for HA 2024.2+ compliance (f32c757)
  • homeassistant: Add Regenerate Dashboard button for upgrade path (99670e7)
  • homeassistant: Add simulation mode dashboard with correct entity IDs (1bf8d60)
  • homeassistant: Embed simulation module for seamless demo mode (v1.5.0) (28ecd8c)
  • settings: Add delete site button with confirmation modal (c87de51)

Bug Fixes

  • Add missing template and locale files for Phase 2 navigation (7971b3a)
  • Correct punycode for ampæra.no domain (7055a26)
  • deploy: Update domain from navomat.no to ampæra.no (84a2947)
  • homeassistant: Check installation_mode for simulation entity creation (f3e7a43)
  • homeassistant: Use proper platform forwarding for simulation entities (95e1b93)
  • i18n: Add missing dashboard translation keys for no-sites onboarding (e8952de)
  • onboarding: Update HA plugin setup for HACS custom repo and OAuth2 (ba616a2)
  • sites: Filter deleted sites from all view queries (d54cc5f)

Documentation

  • Update whats-new for v0.28.0 and v0.29.0 releases (dc1587d)

0.29.0 (2026-01-13)

Features

  • ampaera-sim: Add household status sensors for monitoring (e06b702)
  • ampaera-sim: Add presence-based household simulation patterns (9ba6d9d)
  • ampaera-sim: Support building_type/presence_mode from config options (73bbd47)
  • homeassistant: Open source integration with MIT license (e95e6c1)
  • homeassistant: Support multi-instance OAuth with direct callbacks (2828991)
  • pricing: Add user-selectable VAT display preference with default VAT-included (22cfea6)
  • pricing: Complete VAT display preference implementation with full template integration (2eb243b)
  • telemetry: Track Home Assistant managed sites in portfolio stats (e7783db)

Bug Fixes

  • deploy: Fix Python indentation in HA sync heredoc (e72ddb4)
  • ha-integration: Add QuestDB write tracking and error logging (285ba6d)

0.28.0 (2026-01-12)

Features

  • homeassistant: Add OAuth2 authentication and auto-dashboard (8e28464)

Bug Fixes

  • HA demo sync, SSE status, rule test NaN, and translations (9f988f9)
  • homeassistant: Fix OAuth flow tests and add pre-registered HA client (3cb5119)

Documentation

  • Add comprehensive HA installation guides (bdb3250)

0.27.0 (2026-01-12)

Features

  • Add Elhub data sync and deprecate hardcoded seed data (148130a)
  • auth: Increase session timeout to 2 hours with auto-redirect to login (3a4d0d0)
  • dashboard: Add pricing scheme badge (Spotpris/Norgespris) (1c16b45)
  • dashboard: Full cost breakdown with nettleie, elavgift, mva (a4135b7)
  • dashboard: Move floor/room management from settings to dashboard (16995b4)
  • design: Add Ampæra design system foundation from Figma (6b2f1ef)
  • floors: Add floors and rooms hierarchy with HA sync (3663e07)
  • floors: Add floors and rooms hierarchy with HA sync (e880b54)
  • homeassistant: Add ampaera_sim simulation component and enhance main integration (4abbbef)
  • homeassistant: v1.1.0 - Installation mode separation and enhanced device discovery (90380e9)
  • landing: Add version link to whats-new page (37aec4c)
  • mcp: add floor and room management tools for external LLM integration (0ed014f)
  • nettleie: Add grid tariff integration for Norwegian DSOs (c5784f1)
  • nettleie: Fix map click and combine with supplier comparison (596526c)
  • pricing: Show scheme-specific reference lines with VAT clarification (cf2cf24)
  • settings: Polish settings page with unified site configuration (5f7dda1)
  • timeline: Add per-device event tracking with source attribution (73718d5)
  • ui: Add new page templates and UI components (a31d6b5)

Bug Fixes

  • ci: Integrate HACS publishing into release-please workflow (d59cb77)
  • ci: Make Docker E2E tests non-blocking in HA CI (bdaf2b0)
  • ci: Make HA CI more robust for monorepo structure (f970b10)
  • ci: Remove demo endpoint tests from production smoke tests (6704627)
  • ci: Remove docs endpoint check from staging smoke tests (2e2a9ae)
  • ci: Update staging smoke tests for removed demo endpoints (5359c4c)
  • ci: Use docker compose V2 command in HA workflow (ca01025)
  • csp: Add unpkg.com to style-src for Leaflet CSS (26e9099)
  • dashboard: Clarify effekttariff info - now showing nettleie in breakdown (089f8ad)
  • dashboard: Fix Effekthistorikk spacing and add full timeline link (152e095)
  • dashboard: Proper site-based view routing (8e23bfe)
  • dashboard: Standardize nettleie terminology (energiledd/kapasitetsledd) (a63b077)
  • homeassistant: Fix ampaera_sim config flow tests (35f1565)
  • layout: Move block head before Alpine.js to fix timeline page (7b16c9a)
  • nettleie: Increase map size and add supplier website links (272dd04)
  • Resolve type errors in floors, electricity_supplier, and timeline (f555d60)
  • rules: Add legacy trigger config normalization (3b84f39)
  • tests: Resolve flaky tests in hypothesis and QuestDB integration (2fd029b)
  • tests: Skip load test files from pytest collection (2014489)
  • timeline: Handle power_meter-only telemetry for device breakdown (4d91d5b)

Performance Improvements

  • Add GZip middleware for large JSON responses (81db52a)
  • nettleie: Add Cache-Control header for map data (eb0b170)
  • nettleie: Add Redis caching and polygon simplification for map data (97493df)

Documentation

  • Add nettleie integration ADRs and research documentation (4260de1)
  • Update whats-new and devlog for v0.27.0 release (bbe2751)

0.26.0 (2026-01-05)

Features

  • mcp: Add weather-based extended price forecasting (49fbae5)
  • timeline: Add device boundary markers and improve projections (4eec672)
  • timeline: Add extended forecasting with weather-based price predictions (77385ab)
  • timeline: Add tooltip distance threshold and consistent spacing (76e9fc2)
  • timeline: Improve chart interaction with click-to-inspect and trackpad pan (bc7cfae)
  • timeline: Toggle device boundary lines with legend clicks (381a590)

Bug Fixes

  • auth: Fix demo session cookie path for API access (49fbae5)
  • tests: Update MCP auth and timeline tests for API changes (d07c201)
  • timeline: Clean up chart display issues (38751f8)
  • timeline: Fix segment transitions, tooltip delay and proximity (47f3be7)
  • timeline: Fix tooltip plugin stack overflow (6c11c19)
  • timeline: Fix undefined labels and clean up chart display (0d2a62c)
  • timeline: Improve tooltip and device visualization (0474d3b)
  • timeline: Improve tooltip power aggregation and add device history MCP tool (b8b9af7)
  • timeline: Simplify tooltip label and improve interaction (7df15a1)

0.25.0 (2026-01-04)

Features

  • mcp: Add optimization and analytics tools (5060be7)

Bug Fixes

  • core: Add global Redis client accessor for OAuth (6cdfa54)
  • mcp: Add ProxyHeadersMiddleware for correct https redirects (f4507a2)
  • mcp: Enable stateless HTTP mode for MCP server (c713aa8)
  • mcp: Fix OAuth + MCP authentication flow for Claude.ai (3afb05f)
  • mcp: Fix source_id length and threshold parsing in MCP tools (e1f3550)
  • mcp: Require login before OAuth consent (a1c7cad)
  • oauth: Add MCP scopes to APITokenScopeEnum (6c0d07d)
  • oauth: Store pending authorizations in Redis for multi-worker support (d761c8b)
  • timeline: Improve real-time responsiveness (22bc824)
  • timeline: Use relative URL for static JS to avoid CSP violation (ec8ae73)
  • ui: Fix datetime serialization in sites settings page (77d35b9)
  • ui: Match timeline legend colors to actual chart styling (02ec882)
  • ui: Use Norwegian ø in øre/kWh across timeline and dashboard (a972f7b)

Documentation

  • Add v0.22.0-v0.24.0 to what's-new page (1f64349)
  • Update devlog and MCP docs for new optimization tools (ff0caab)

0.24.0 (2026-01-04)

Features

  • homeassistant: Add simulation dashboard and packages (683c394)
  • mcp: Switch to fastapi-mcp with ASGI transport (4168f08)
  • timeline: Add scheduling timeline with dual-axis chart (19e8bd5)

Bug Fixes

  • mcp: CSRF exemption and HTTP transport improvements (1c7d3d2)
  • mcp: Exempt /mcp/ and /oauth/ paths from CSRF protection (9e82093)
  • mcp: Explicitly pass app and mount_path to mount_http (59d4cbf)
  • mcp: Resolve type errors in MCP tools and models (8293e32)
  • mcp: Rewrite OAuth to follow MCP 2025-03-26 spec (75af471)
  • mcp: Switch to standalone fastmcp for HTTP transport (2ca9e1d)
  • mcp: Use correct Rule model field names in rules tools (f8089c0)
  • mcp: Use correct schema field names in create_rule (3b6532e)
  • mcp: Use mount_http() and correct endpoint path (423f7c8)

0.23.0 (2026-01-02)

Features

  • mcp: Add remote MCP server with OAuth 2.1 authentication (ec7cc08)

0.22.1 (2026-01-02)

Bug Fixes

  • tests: Fix visibility policy and SSE tests for CI (f012c2c)
  • tests: Update tests for new mock site ID pattern and settings behavior (552ad8a)

0.22.0 (2026-01-02)

Features

  • device: Add device_type to DeviceUpdate schema for admin corrections (669d27d)
  • ha: Add periodic heartbeat push for continuous telemetry (cdb97ed)
  • ha: Add server-side device type inference for power meters (c7086ae)
  • ha: Add simulation services and HA integration tests (26f8d0d)
  • ha: Auto-consolidate orphan devices into virtual parent devices (a0d7f58)

Bug Fixes

  • dashboard: Fix energy calculation and add device entity mapping display (54d59b3)
  • ha-integration: Add phase-specific power capabilities and fix QuestDB ingestion (d40fec2)
  • ha: Fix integration setup - use correct service parameters (807c49a)
  • ha: Map energy_import_kwh to energy_kwh for QuestDB storage (9f77db2)
  • hooks: Fix pre-tool-code-quality.sh for macOS compatibility (5f7c1ff)
  • telemetry: Fix 0W bug and implement tech debt cleanup (bd8d612)
  • telemetry: Isolate simulated data to demo/test sites only (d2132a2)
  • telemetry: Never show simulated data on real HA-managed sites (18bcc6d)

Documentation

  • ha: Update device discovery and push service docstrings (3f3407c)

0.21.0 (2025-12-31)

Features

  • ha: Add best practices compliance for production-quality integration (d491896)
  • ha: Add HA site indicators and command tracking (#161, #162) (53220a5)
  • ha: Group HA entities by parent device with entity_mapping (#162) (1b77793)
  • ui: simplify device display with compact cards and detail drawer (24d70ad)

Bug Fixes

  • tests: Add ha_device_id to HADeviceInfo in all HA integration tests (687d903)
  • tests: Use ha_device_id as device_mappings key in data accuracy tests (7ff8918)
  • tests: Use ha_device_id as device_mappings key in HA integration tests (74b37be)

Documentation

  • Add v0.20.0 to what's-new page (c0d0236)
  • Update devlog with HA testing progress (0b01c94)

0.20.0 (2025-12-31)

Features

  • backup: Add comprehensive backup system with monitoring (03b7948)
  • user: Split full_name into first_name and last_name fields (#128) (d3e9232)

Bug Fixes

  • Allow negative power values for solar export scenarios (dfc616d)
  • backup: Fix backup-status.sh for Hetzner Storage Box restricted shell (3158ab3)
  • ci: Handle disabled demo mode in production smoke tests (4829da9)
  • ci: Remove invalid --headed=false pytest-playwright flag (cee2eb8)
  • ui: Improve what's-new page typography and remove duplicate content (202367f)

Dependencies

  • Update dependencies and GitHub Actions (81e36f8)

Reverts

  • Remove HACS token check step (testing workflow) (f84be40)

Documentation

  • Add v0.17.0, v0.18.0, v0.19.0 release notes to what's-new page (61c15fe)
  • Update devlog, project-status, and README for 2025-12-31 (4f7965c)

0.19.0 (2025-12-30)

Features

  • ha: Add device state update on command acknowledgment (#182) (82ca305)

Bug Fixes

  • admin: Correct import path for database session dependency (db554b1)
  • admin: Include demo users in cleanup patterns (ce676c3)
  • admin: Include real users in Network Topology stats (5e9dafd)
  • ci: Add helpful error message for missing HACS token (79fc5a4)
  • ha: Improve HA integration data flow correctness (98f86e1)
  • telemetry: Query power sensors first for live dashboard (5e98a1e)

Documentation

  • Update ROADMAP and project-status for v0.18.0 release (a34cacb)

0.18.0 (2025-12-30)

Features

  • ha-integration: Implement device discovery and sync (#181) (da3d2f5)
  • ha: Add device sync service for periodic HA-to-Ampæra sync (#182) (ed93355)

Bug Fixes

  • ci: Clean up staging container after production deployment (a06a8dc)
  • tests: Use unique site_id in history service test (0ebf82d)
  • ui: Explicitly pass demo_mode=False to login/register pages (436c629)
  • ui: Only show demo mode banner when explicitly enabled (b16a583)
  • ui: Show demo mode badge only for demo users, not on login page (e56349f)

0.17.0 (2025-12-30)

Features

  • ci: Integrate staging as gate for production deployment (cbad022)
  • history: Add data source indicators for real vs demo data (8650b8d)

Bug Fixes

  • ci: Install dev dependencies in post-release tests (9304285)

Documentation

  • agents: Update deployment chain documentation to reflect staging-as-gate (ea9771f)
  • Update What's New for v0.16.0 (998263f)

0.16.0 (2025-12-30)

Features

  • api: Add data_source field to history API responses (0b1dd9c)
  • infra: Add staging environment with logical multi-tenancy (51d36b8)
  • ui: Complete Real Data Foundation for v0.16.0 (b4ff5c5)

Bug Fixes

  • ci: Pass required secrets to staging deployment (0fc6c42)
  • ci: Remove environment block to use repository-level secrets (8f51f76)
  • ci: Remove secrets reference from environment.url (5f096d8)
  • ci: Source secrets from server .env file like production (2d3bab7)
  • ci: Use --env-file flag for docker compose (9e85298)
  • staging: Add build section to staging compose (88296f7)
  • staging: Include all Docker build dependencies in rsync (2306b0f)
  • staging: Make REDIS_PASSWORD optional in staging compose (7230d09)
  • staging: Run health checks via SSH on server (8885b5f)
  • staging: Use correct Docker network name (23d61d6)
  • staging: Use correct PostgreSQL user default (731e165)
  • tests: Enable mock data and reset service singletons in CI (c8e506a)
  • tests: Replace demo-site-001 with valid UUID format (8a04276)
  • tests: Use demo-prefixed site ID for simulated data detection test (506ae93)
  • ui: Fix YAML syntax in component registry files (7d1ae18)

Documentation

  • config: Complete .env.example with all configurable settings (2535bd8)

0.15.0 (2025-12-29)

Features

  • ha: Use real telemetry for HA-managed sites (55e53be)

Bug Fixes

  • tests: Update telemetry tests for Site object parameter (8573959)

Documentation

  • Add v0.14.0 to What's New page (Norwegian) (2966938)
  • Add v0.15.0 to What's New page (Norwegian) (4197ae9)

0.14.0 (2025-12-29)

Features

  • auth: Add API token generation for integrations (2f979e1)
  • dashboard: Add multi-site dashboard aggregation API (f8b1c95)
  • dashboard: Add room grid view component (#117) (ab3e536)
  • ha: Implement Home Assistant push integration v2.0 (81444df)
  • simulation: Add multi-site user profiles for enhanced simulation (b8be2be)

Bug Fixes

  • ci: Fix E2E health check URL and Safety CLI syntax (aeaf0a9)
  • deploy: Add debugging for alembic file discovery (5afca44)
  • deploy: Clean up smoke test accounts after deployment (099a52f)
  • deploy: Fix migration detection to properly match alphanumeric revision IDs (d6d1b4a)
  • deploy: Fix SSH heredoc variable expansion for DEPLOY_PATH (7146088)
  • deploy: Fix YAML indentation in cleanup script (b504afd)
  • deploy: Include whats-new.md in Docker image (ff104df)
  • deploy: Simplify migration script - always run upgrade head (89be17a)
  • deploy: Specify working directory for alembic commands (a3bfecc)
  • deploy: Use bash -c with single-quoted commands for alembic (a6802b3)
  • deploy: Use sh -c with cd for alembic working directory (f4e0354)
  • tests: Resolve async event loop isolation issue in test suite (42d03fc)
  • types: Resolve pyright warnings for type annotations (6720d8a)

Documentation

  • Add v0.13.0 to What's New page (Norwegian) (852b202)
  • Update devlog with HA integration v2.0 work (88c40cf)
  • Update version references to v0.13.0 (25822f9)

0.13.0 (2025-12-27)

Features

  • Add user-friendly What's New page with auto-generation (e813215)
  • homeassistant: Add Home Assistant integration to monorepo (6e89dd1)

Bug Fixes

  • deploy: Include docs/whats-new.md in deployment sync (7e96013)
  • docker: Include CHANGELOG.md for devlog page (bf2f548)
  • tests: Reset circuit breakers between tests to prevent flaky failures (492b85d)

0.12.0 (2025-12-27)

Features

  • monitoring: Add comprehensive alerting infrastructure (931f096)

Bug Fixes

  • dashboard: Prevent SSE race condition with Alpine.js initialization (5823b15)
  • deploy: Accept 201 status for registration endpoint (dcdecc6)
  • deploy: Auto-detect migrations and add smoke tests (875f029)
  • deploy: Include CHANGELOG.md in production rsync (e5aa983)

Documentation

  • Add Home Assistant integration planning document (87ba146)
  • Document HTMX-centric architecture pattern (01c4f46)

0.11.0 (2025-12-27)

Features

  • api: Add device CRUD with room assignment (#99) (412d9be)
  • api: Add Room CRUD API endpoints (#104) (a7c7d17)
  • api: Add site-scoped telemetry queries and portfolio endpoint (#102) (27c8813)
  • demo: Add demo button with scenario selector on login page (9d9ddd9)
  • demo: Improve multi-site demo session handling (4e79346)
  • devlog: Add clickable version badge linking to changelog page (794ec09)
  • simulation: Add multi-site user simulation support (#100) (e8dfaa6)
  • ui: Add multi-site dashboard visualization (#101) (070657e)
  • ui: Add site management UI with CRUD functionality (#98) (cb9aed5)

Bug Fixes

  • admin: Fix 500 error on /admin/users due to full_name column removal (cbe97e2)
  • admin: Fix loading spinner issue on /admin/users page (#132) (fd5c831)
  • admin: Sync code with database schema (first_name/last_name) (155ee5d)
  • admin: Sync code with database schema (first_name/last_name) (3cb29c7)
  • ci: Add migration option to deploy workflow (26df3e9)
  • ci: Fix heredoc variable expansion in migration step (173557b)
  • db: Add migration to split full_name into first_name/last_name (6c44209)
  • db: Add migration to split full_name into first_name/last_name (fda80a9)
  • resolve async generator and session mismatch test failures (5faa319)

0.10.0 (2025-12-12)

Features

  • api: Implement Site CRUD API endpoints (#97) (7c62a98)
  • api: Replace hardcoded site_id with user-scoped dependencies (#3) (0e94904)
  • ci: Production deployment workflow with best practices (587ff24)
  • deps: Add site dependency for multi-tenancy (#3) (2033b52)

Bug Fixes

  • api: Support mock site ID in site dependencies (7b33415)
  • ci: Add README.md and locales/ to deploy rsync (805eb05)
  • ci: Remove non-existent production environment reference (faaf25d)
  • ci: Remove UTF-8 character from deploy workflow comments (f29d95c)
  • ci: Restore original working deploy workflow from faaf25d (70678f2)
  • ci: Restore working two-job deploy structure (a906ea3)
  • ci: Simplify deploy workflow to resolve workflow file issues (667f9f5)
  • ci: Use correct Production environment name (case-sensitive) (6eb7903)
  • ci: Use rsync -R to preserve locales directory structure (ca218f0)

0.9.0 (2025-12-11)

Features

  • ui: Add inline device controls with Alpine.js (#116) (d7c74d7)

Documentation

  • agents: Remove hardcoded versions, add session startup checklists (6557fae)
  • Update project documentation to v0.7.0 (51330c7)

0.8.0 (2025-12-11)

Features

  • service: Add DeviceCommandRouter for real/simulated command routing (#113) (1c673ed)
  • ui: Add HTMX device control modals for water heater and EV charger (#116) (6f5a1a3)

Bug Fixes

  • deploy: Use correct health endpoint path /api/v1/health (2740a50)
  • test: Make price forecast test deterministic (#119) (e4b60eb)

0.7.0 (2025-12-11)

Features

  • admin: Add logs endpoint and templates for admin dashboard (d764e64)
  • admin: Add role management UI for superadmins (9638a90)
  • api: Add DeviceCommand API endpoints and service layer (#112) (24fdb29)
  • model: Add DeviceCommand model for command tracking (#112) (998a909)
  • models: Add GridContract model for provider/DSO tracking (a03a3fa)
  • models: Add HANMeter model for site-level consumption tracking (87851ff)
  • models: Add Room model and device enhancements for multi-site architecture (b307a5d)
  • simulation: Add physics-based device simulators (#108-#111) (eadf681)
  • telemetry: Complete telemetry data pipeline (v0.8.0 milestone) (4bd4f43)

Bug Fixes

  • admin: Show simulated user MQTT stats in admin dashboard (f728cad)
  • csp: Add CDN domains for Sigma.js and Graphology scripts (3f7f50f)
  • deploy: Fix CSP for Tailwind CDN and add Hetzner deployment scripts (6f2900d)
  • test: Add FK fixtures and missing templates for CI (497afb3)
  • test: Skip device commands tests and fix telemetry assertion (b26a4ed)
  • test: Use proper UUIDs in DeviceCommand API tests (3d62bec)

Documentation

  • ui: Add settings page to component registry (757aa87)
  • Update devlog with multi-site architecture progress (5a7ebed)
  • Update documentation for DeviceCommand API and recent work (174d1f5)

0.6.0 (2025-12-09)

Features

  • auth: Add admin role-based access control for admin panel (34edad1)

Bug Fixes

  • test: Skip demo mode badge test when demo mode is disabled (7585542)

Documentation

  • Update devlog with admin RBAC implementation (24196f7)

0.5.0 (2025-12-08)

Features

  • i18n: Add translation validation workflow (#11) (157da2e)
  • ui: Add demo mode indicators (#72) (027c033)

Dependencies

  • python: Update cryptography requirement (f3f3e89)
  • python: Update fastapi requirement (3cf955c)

0.4.0 (2025-12-08)

Features

  • admin: Add real-time System Visualization dashboard (#60) (41028fd)
  • admin: Add simulation events visualization and spotlight effects (74d99bd)
  • admin: Add user impersonation and modular visualization system (23601fe)
  • admin: Add user management with impersonation support (8585572)
  • admin: Enhance network topology with infrastructure nodes and modals (2dc21b7)
  • admin: Enhance visualization with LOD, grouping, and centralized constants (2ef965a)
  • admin: Improve spotlight centering and add GUI fade on inactivity (71a0f17)
  • ci: Add SBOM generation to release workflow (#43) (a3dc13e)
  • devops: Add deployment workflow with health checks and rollback (#42) (bd8606a)
  • grafana: Add Telemetry and Business dashboards with admin UI integration (#59) (4c2f4c0)
  • observability: Add custom Prometheus metrics and correlation IDs (#18) (b96c7e4)
  • observability: Add Sentry integration for error tracking (#12) (4e0ec5e)
  • simulation: Add Norwegian Calendar Service (#70) (e50284d)
  • simulation: Add price-responsive device optimization (#71) (9c8e549)
  • simulation: Add simulation admin UI and API endpoints (c494259)
  • simulation: Add v0.4.0 simulation platform core engine (eb294d4)

Bug Fixes

  • admin: Enable JSON encoding for HTMX mock customer requests (22c0313)
  • admin: Remove confusing floating spotlight labels (c01f8ad)
  • admin: Replace meaningless group labels with user count and power (55b09fb)
  • admin: Stabilize visualization system and fix comet trail rendering (5db7c9b)
  • admin: Use dedicated EMQX API credentials for dashboard metrics (e1e5ba0)
  • ci: Resolve event loop teardown error in test shutdown (#63) (e9a1086)
  • loadtest: Mark PENDING tests as CANCELLED in stop_all() (0a9d755)
  • observability: Fix Prometheus metrics and Grafana dashboard connectivity (4632009)
  • test: Mock check_database in ready endpoint contract test (5d79fd4)
  • ui: Complete Page Object coverage and visual regression infrastructure (ffb83bc)
  • Update pyproject.toml version to match v0.3.0 release (61ca25e)

Dependencies

  • python: Update asyncpg requirement to <0.32.0 (a9935fc)
  • python: Update cryptography requirement to <46.0.0 (e650414)
  • python: Update fastapi requirement to <0.124.0 (3385191)

Documentation

  • Add database migrations and secrets management guides (#10) (cbe8140)
  • Add future-roadmap for Simulation & Rule Builder platforms (63785d2)
  • Integrate future-roadmap with documentation system (739fb5b)
  • Update devlog and project-status for System Visualization (#60) (a170cad)

[Unreleased] - v0.3.0 Security & Compliance

Changed

Redis-Backed Rate Limiting (2025-12-02)

Migrate rate limiting from in-memory to Redis for multi-instance support.

  • SlowAPI Limiter now uses Redis storage URI for distributed rate limiting
  • RateLimitHeadersMiddleware updated to use Redis with atomic increment operations
  • Graceful fallback to in-memory tracking if Redis unavailable
  • Key pattern: ratelimit:headers:{client_ip}:{window_start} with automatic TTL

Technical improvements:
- Rate limits persist across app restarts
- Rate limits shared across multiple API instances (Docker Swarm)
- Atomic Redis INCR with pipeline for consistency
- 8 new unit tests for Redis-backed rate limiting

Closes #54.


0.2.0 - 2025-12-02

v0.2.0 MVP Release: Complete energy monitoring platform with authentication, real-time telemetry, rule engine, alerts, and pricing integration. Full admin dashboard with load testing, mock customers, and scaling visualization.

Added

Load Testing Integration (2025-12-02)

CI/CD performance testing with regression detection.

Admin API endpoints (/admin/v1/loadtest/*):
- GET /scenarios - List 7 predefined scenarios (peak_dinner, morning_rush, weekend_cabin, commercial_daytime, night_minimal, price_spike, custom)
- POST /run - Start load tests with configurable scale factor (0.1x to 10x)
- GET /results - List test results with summaries
- GET /results/{id} - Get detailed metrics (throughput, latency percentiles, error rates)
- POST /results/{id}/cancel - Cancel running tests
- GET /compare - Compare tests for regression detection

Features:
- Performance regression detection with configurable thresholds
- Metrics: messages/sec, P50/P95/P99 latency, error rates
- Result storage in Redis with 7-day TTL
- 14 integration tests

Scaling Visualization (2025-12-02)

Docker Swarm monitoring and scaling for production ops.

Admin API endpoints (/admin/v1/swarm/*):
- GET /status - Overall cluster status (nodes, services, replicas)
- GET /services - List all services with task details
- GET /services/{name} - Service details with container stats
- POST /scale - Scale service replicas (0-100)
- GET /utilization - Resource utilization (CPU, memory, network)

Features:
- Graceful degradation when not in Swarm mode
- Per-service and per-container resource metrics
- 13 integration tests

Mock Customer Injection (2025-12-02)

Demo and load testing support with simulated customers.

Admin API endpoints (/admin/v1/mocks/*):
- POST /customers - Create mock customer batches
- GET /customers - List active batches
- GET /customers/{id} - Get batch details
- DELETE /customers/{id} - Delete specific batch
- DELETE /customers - Delete all batches

Features:
- Norwegian consumption patterns (residential, apartment, cabin, commercial)
- Region-specific simulation (NO1-NO5)
- Configurable telemetry publishing intervals
- Redis-backed batch registry
- 13 integration tests

Admin Dashboard Foundation (2025-12-02)

System-wide metrics and health monitoring for administrators.

Admin API endpoints (/admin/v1/metrics/*):
- GET /summary - Aggregated platform metrics
- GET /services - Per-service health and stats
- GET /telemetry - Telemetry pipeline metrics
- GET /users - User activity statistics

Integration Test Coverage (2025-12-02)

Comprehensive integration tests for v0.2.0 release quality gate.

Test suites delivered:
- Sites API tests (tests/integration/test_sites_api.py) - 17 tests for create-default, update-scheme, update-region endpoints
- Rule engine tests (tests/integration/test_rule_engine_integration.py) - 15 tests for power/price/time/device state triggers, compound triggers (AND/OR logic)
- Action executor tests (tests/integration/test_action_executor_integration.py) - 31 tests for device control, notifications (email/SMS/push/webhook), error handling
- HTMX partials tests (tests/integration/test_htmx_partials.py) - 22 tests for dashboard/device/alert/rule/pricing fragments with DaisyUI validation
- RuleService unit tests (tests/services/test_rule_service.py) - 352 unit tests for service-level rule logic

Test suite metrics:
- Total tests: 1264 (up from ~1179)
- New tests added: 85 integration tests
- Test coverage: ~85% (exceeds 80% target)

Data Source Labeling (2025-12-01)

Visual indicators to distinguish simulated vs production data.

Components delivered:
- Data source labels - UI badges showing "Simulert" (simulated) or "Direkte" (live) data
- Visual distinction - Prevents confusion between test and production telemetry
- Norwegian labels - Uses pilot-friendly Norwegian terminology

Docker Health Check Fixes (2025-12-01)

  • Fixed health check endpoints - Corrected Docker container health check configuration
  • Improved container reliability - Services now properly report health status

Slice 7: Rule Builder Mock Data (2025-12-01)

Norwegian household automation rules with realistic mock data.

Components delivered:
- MockRuleGenerator (app/services/rule.py) - Generates realistic demo rules
- 5 Norwegian household automation rules included
- Power threshold rules (Reduser effekttopper)
- Smart charging rules (Smart nattlading) with compound triggers
- Price alert rules (Høy strømpris-varsel)
- Time schedule rules (Morgenoppvarming)
- Device state monitoring (Elbillader frakoblet)
- Mock execution history - Generates realistic rule execution records
- RuleService integration - Automatic mock data initialization in development mode
- API endpoints working - /api/v1/rules, /api/v1/rules/summary, /api/v1/rules/executions

Norwegian household automation examples:
- Reduce power peaks by turning off water heater above 10kW
- Smart night charging when price < 50 øre/kWh between 22:00-06:00
- High price alerts when spot price > 200 øre/kWh
- Morning heating schedule on weekdays

GitHub Repository Infrastructure (2025-12-01)

DevOps and security improvements for repository management.

Closed Issues: #21, #35, #36, #37, #38, #39

  • SECURITY.md (#37) - Security policy with vulnerability reporting guidelines
  • CODEOWNERS (#36) - Code ownership for PR review automation
  • Dependabot (#38) - Automated dependency updates for Python, GitHub Actions, Docker
  • Branch Protection (#35) - Required status checks and PR reviews on main branch
  • Repository Topics (#39) - Added discoverability topics: energy, smart-home, iot, fastapi, htmx, norway, electricity, mqtt, home-automation, timeseries
  • i18n Relative Time (#21) - Translated all timeAgo() strings to Norwegian (akkurat nå, m siden, t siden, d siden)

Rule Service Documentation (2025-12-01)

  • docs/services/rule-service.md - Comprehensive service documentation for Rule Builder
  • Architecture overview with component diagram
  • MockRuleGenerator usage and default rules
  • RuleEngine trigger evaluation patterns
  • ActionExecutor execution types
  • API usage examples and database schema

Foundation F3: Telemetry Ingestion Pipeline (2025-11-29)

Complete MQTT → QuestDB → Redis real-time telemetry pipeline.

Components delivered:
- MQTT Client (app/services/mqtt.py) - Async EMQX broker connectivity
- paho-mqtt with asyncio integration
- Automatic reconnection with exponential backoff
- Wildcard topic subscription support
- TLS support for secure communication
- Redis Pub/Sub Service (app/services/redis_pubsub.py) - Real-time message distribution
- Pub/sub for SSE streaming to web clients
- Latest reading cache (60s TTL)
- Pattern subscription support
- Telemetry Ingestion Service (app/services/telemetry_ingestion.py) - Pipeline orchestrator
- MQTT message reception and validation
- QuestDB storage for historical queries
- Redis publish for real-time SSE
- Metrics tracking (received/processed/failed)
- Integration Tests - Comprehensive test suites for all three services
- tests/integration/test_mqtt_integration.py (23 tests)
- tests/integration/test_redis_pubsub_integration.py
- tests/integration/test_telemetry_ingestion_integration.py
- Service Documentation (docs/services/)
- mqtt-service.md - MQTT client usage and configuration
- redis-pubsub-service.md - Pub/sub patterns and SSE integration
- telemetry-ingestion-service.md - Pipeline architecture and flow

Test Results: 906 tests passing, 90.84% coverage


i18n Enhancements (2025-11-29)

  • Enhanced i18n nested key support for translations
  • Auto-migrations support for database schema updates
  • Dashboard UI cleanup improvements

Fixed

Infrastructure and Test Fixes (2025-11-29)

  • MQTT timestamp issue - Changed asyncio.get_event_loop().time() to time.time() to fix tests running outside async context
  • Health check test - Updated assertion to use issubset() for new optional dependencies (mqtt_client, ingestion)
  • Dockerfile health check - Fixed path from /api/v1/health to /health
  • conftest.py cleanup - Removed unused MQTT_BROKER environment variable
  • .env.example cleanup - Removed redundant REDIS_URL and APP_TITLE, added REDIS_DB
  • Redis pub/sub test timing - Added retry logic for subscription race condition

Foundation F2: QuestDB Integration (2025-11-28)

QuestDB client and HistoryService database integration.

Components delivered:
- QuestDB Client (app/services/questdb.py) - Async time-series database queries
- Connection pooling via asyncpg
- Query methods: query_telemetry_aggregated, query_latest_telemetry, get_statistics
- Insert methods for telemetry data
- Health check endpoint support
- HistoryService Integration - Updated to use QuestDB when use_mock=False
- QUESTDB_SAMPLE_MAP for interval translation (1m, 5m, 15m, 1h)
- Seamless switching between mock and real data via flag
- QuestDB Integration Tests (tests/integration/test_questdb_integration.py)
- 15 comprehensive tests for QuestDB client and HistoryService
- Tests marked with pytest.mark.questdb for selective execution
- Covers connection, queries, aggregation, and error handling

Test Results: 728 tests passing (15 new QuestDB integration tests)


Foundation F1: Database Models (2025-11-28)

SQLAlchemy models for multi-tenancy and IoT device management.

Components delivered:
- Site Model (app/models/site.py) - Multi-tenancy support with Norwegian grid regions (NO1-NO5)
- Device Model (app/models/device.py) - Water heaters and EV chargers (MVP scope)
- Alert Model (app/models/alert.py) - Threshold alerts with cooldown logic and event history
- Alembic Migration - Initial migration for Site, Device, Alert tables

Features:
- GridRegion enum with all 5 Norwegian price regions and display names
- DeviceType enum (water_heater, ev_charger) with DeviceStatus tracking
- AlertType enum (power_threshold, price_threshold, device_offline, daily_consumption)
- AlertEvent model for tracking alert history with acknowledgment workflow
- Proper SQLAlchemy relationships with cascade deletes
- TYPE_CHECKING imports for clean forward references
- Comprehensive indexes for query performance

Tests: 87 new unit tests for database models
- tests/unit/models/test_site_model.py - GridRegion and Site model tests
- tests/unit/models/test_device_model.py - Device model and enum tests
- tests/unit/models/test_alert_model.py - Alert and AlertEvent model tests

Test Results: 729 tests passing, 93.76% coverage


0.3.0 - 2025-11-27

Release v0.3.0: Alert Management API, complete documentation, 643 tests passing.

Added

Alert Management API Documentation (2025-11-27)

  • Complete API documentation for 9 alert endpoints (docs/api/alerts-endpoints.md)
  • Includes endpoint specs, request/response examples, HTMX integration patterns
  • Documents all alert types, conditions, severity levels, and notification channels

Documentation Index Updates

  • Added Device Endpoints and Alert Endpoints to docs/INDEX.md
  • Updated API documentation section with current endpoint coverage

Fixed

Test Count Accuracy

  • Corrected test count reporting (643 tests, not 722 as previously documented)
  • Alert tests (79 tests) are in untracked files pending commit

0.2.0 - 2025-11-27

Major feature release: Device Management, Pricing API, History API, Figma integration, i18n infrastructure.

Added

Alert Management API (2025-11-27)

Threshold alert system with real-time notifications. Configurable alerts for power consumption, price changes, device status, and daily usage.

Components delivered:
- Alert Schemas (app/schemas/alert.py) - Pydantic models for alert types, conditions, severity, channels, status
- Alert Service (app/services/alert.py) - MockAlertGenerator with Norwegian household defaults
- Alert API (app/api/v1/alerts.py) - 9 RESTful endpoints for alert management
- Alert Widget (app/templates/components/alert-list-widget.html) - HTMX + Alpine.js dashboard component

Endpoints:
- GET /alerts - List alerts with filters (type, enabled)
- GET /alerts/summary - Summary statistics (counts by type/severity)
- GET /alerts/history - Alert event history with acknowledge status
- GET /alerts/{alert_id} - Single alert details
- POST /alerts - Create new alert
- PUT /alerts/{alert_id} - Update alert
- DELETE /alerts/{alert_id} - Delete alert
- POST /alerts/{alert_id}/toggle - Enable/disable alert
- POST /alerts/history/{event_id}/acknowledge - Acknowledge event

Alert types supported:
- Power threshold: Alert when power exceeds/falls below limit (W)
- Price threshold: Alert on electricity price changes (øre/kWh)
- Device offline: Alert when device disconnects for specified duration
- Daily consumption: Alert when daily energy usage exceeds limit (kWh)

Severity levels: Info, Warning, Critical (with badge styling)
Notification channels: Push, Email, Webhook

Mock data features:
- 5 default alerts per site (High power, EV charger offline, Low price, etc.)
- Norwegian translations for all alert types and conditions
- History event generation with status tracking
- Reproducible output with seed parameter for testing

Tests: 79 new tests (44 unit, 27 integration, 8 schema)

Device Management API (2025-11-27)

Smart device inventory with real-time status monitoring. MVP scope: Water heaters (varmtvannsbereder) and EV chargers (elbillader) only.

Components delivered:
- Device Schemas (app/schemas/device.py) - Pydantic models for device types, states, and responses
- Device Service (app/services/device.py) - MockDeviceGenerator with Norwegian household patterns
- Device API (app/api/v1/devices.py) - 4 RESTful endpoints for device management
- Device Widget (app/templates/components/device-list-widget.html) - HTMX + Alpine.js dashboard component

Endpoints:
- GET /devices - List devices with filters (device_type, status)
- GET /devices/{device_id} - Single device details with current state
- GET /devices/summary - Device statistics (counts, power ratings)
- POST /devices/refresh - Force refresh device states

Device types supported:
- Water heater (varmtvannsbereder): 2kW typical, temperature monitoring, heating status
- EV charger (elbillader): 11kW typical (16A 3-phase), charging status, session energy

Mock data features:
- Norwegian manufacturers (OSO water heaters, Easee/Zaptec chargers)
- Norwegian location names (Bad, Garasje)
- Realistic state simulation (temperature, charging power, session energy)
- Reproducible output with seed parameter for testing

Tests: 71 new tests (27 schema, 20 service, 24 integration)

Component Registry Directory Split (2025-11-27)

Improved maintainability for UI component registry. Split monolithic 1,747-line YAML into 15 domain-specific files.

Components delivered:
- Directory Structure (docs/ui/component-registry/) - 15 domain-specific YAML files
- Updated Validation (scripts/validation/validate_ui_components.py) - Auto-detects directory vs single file

Files created:
- _meta.yaml - Metadata and naming conventions
- _index.yaml - Directory structure documentation
- figma.yaml - Figma frame mappings
- daisyui.yaml - DaisyUI component classes
- checklists.yaml - Implementation guides
- shared-components.yaml - Navbar, footer, toast, alert
- user-journeys.yaml - Cross-page user flows
- responsive.yaml - Breakpoint definitions
- themes.yaml - Theme configuration
- accessibility.yaml - WCAG requirements
- i18n.yaml - i18n key coverage
- pages/login.yaml - Login page components
- pages/register.yaml - Register page components
- pages/dashboard.yaml - Dashboard page components
- pages/placeholders.yaml - Settings, devices, alerts, rules

Agent updates:
- All 6 agents updated with component registry directory references
- figma-designer, ui-guardian, documentation-guardian, test-guardian, devops-guardian, project-manager

Historical Data API (2025-11-26)

Time-series visualization for power consumption history. Interactive charts with multiple time ranges and export capabilities.

Components delivered:
- History API (/api/v1/history/*) - 4 RESTful endpoints for historical queries
- History Service (app/services/history.py) - Mock data generator with Norwegian patterns
- History Schemas (app/schemas/history.py) - Pydantic models for time-series data
- Chart Widget (app/templates/components/history-widget.html) - Chart.js + Alpine.js component

Endpoints:
- GET /history/{site_id} - Historical data with aggregation
- GET /history/{site_id}/chart - Chart.js-ready format
- GET /history/{site_id}/stats - Summary statistics
- GET /history/{site_id}/export - CSV download

Time ranges supported: 1h (60 points), 24h (96 points), 7d (168 points), 30d (720 points)
Aggregation intervals: 1m, 5m, 15m, 1h (auto-selected based on time range)

Nord Pool Pricing API (2025-11-26)

Electricity spot price integration for Norwegian market. Real-time prices from Nord Pool for all 5 Norwegian bidding zones.

Components delivered:
- Pricing API (/api/v1/prices/*) - 5 RESTful endpoints for price queries
- Nord Pool Client (app/services/pricing.py) - HTTP client with caching (5-min TTL)
- Price Schemas (app/schemas/pricing.py) - Pydantic models for price data
- Price Widget (app/templates/components/price-widget.html) - HTMX + Alpine.js dashboard component

Endpoints:
- GET /prices/regions - All regions with current prices
- GET /prices/{region}/current - Current price with trend indicator
- GET /prices/{region}/today - Today's 24 hourly prices
- GET /prices/{region}/tomorrow - Tomorrow's prices (after 13:00 CET)
- GET /prices/cost - Cost calculator for power consumption

Norwegian regions supported: NO1 (Oslo), NO2 (Kristiansand), NO3 (Trondheim), NO4 (Tromsø), NO5 (Bergen)

Figma Designer Agent (2025-11-26)

Design-to-code workflow with DaisyUI component library integration.

Components delivered:
- figma-designer agent (.claude/agents/figma-designer.md) - Haiku-based design agent
- DaisyUI component keys (docs/figma/daisyui-component-keys.yaml) - Node IDs for cloning
- Design kit structure (docs/figma/daisyui-design-kit-structure.json) - Full component tree
- Design-to-code bridge (docs/ui/design-to-code-bridge.md) - Mapping documentation
- Component extraction scripts (scripts/extract_figma_components*.py) - MCP + direct API

Integration:
- Figma MCP server integration via WebSocket (port 3055)
- Clone-only workflow (never hardcode colors)
- Handoff to ui-guardian for code implementation

Dashboard Internationalization (2025-11-26)

  • Added Norwegian (nb) and English (en) translations for price widget
  • New translation keys: spot price, price trends, day statistics, region names
  • Updated locales/{nb,en}/dashboard.json with 13 new price-related keys

UI Testing Infrastructure (2025-11-26)

Comprehensive E2E testing architecture with Claude Code agent integration. See ADR-009.

Components delivered:
- Component Registry (docs/ui/component-registry.yaml) - Single source of truth for 71 UI components
- Enhanced Page Objects - HTMX, Alpine.js, and accessibility utilities in base_page.py
- Shared Components - Navbar, Toast, Alert reusable objects
- Visual Regression Testing - Baseline capture and comparison framework
- Error/Loading State Tests - 15 new test classes covering validation, HTMX transitions, accessibility

Agent integration:
- ui-guardian - New Tier 1 Guardian for UI quality management
- /ui-validate - Slash command for quick component validation
- Full integration with test-guardian, documentation-guardian, project-manager

Metrics:
- 427 tests passing (80 new E2E tests)
- 88.82% code coverage
- 6 Page Objects covering all major pages
- 71 components tracked in registry

Planned

Admin Dashboard & Demo System (Slices 9-12)

Architecture decision made for unified demo/load-testing/operations system. See ADR-008.

Strategic Value:
- Compelling investor demos ("watch me add 1000 customers")
- Validated scaling through real infrastructure pipeline
- Shared infrastructure for demos + load tests + operations

Planned Features:
- Admin dashboard with embedded Grafana metrics (Slice 9)
- Mock customer injection through MQTT pipeline (Slice 10)
- Docker Swarm scaling visualization (Slice 11)
- Automated load testing scenarios for CI/CD (Slice 12)

Milestones

Slice 5 Complete: Device List (2025-11-27)

Fifth vertical slice of MVP is complete. Device inventory with status monitoring.

Components delivered:
- Device schemas with MVP types (water heater, EV charger)
- Mock device generator with Norwegian household patterns
- Device API endpoints (/api/v1/devices/*) - 4 RESTful endpoints
- Device list widget (HTMX + Alpine.js) with status indicators
- i18n translations (Norwegian Bokmål + English)
- 643 tests passing (71 new device tests)

Next: Slice 6 - Alerts Configuration (threshold alerts, push notifications)

Slice 6 Complete: Alerts Configuration (2025-11-27)

Sixth vertical slice of MVP is complete. Threshold alerts with CRUD operations and real-time updates.

Components delivered:
- Alert schemas (AlertType, AlertCondition, AlertSeverity, AlertChannel, AlertStatus)
- Alert types: Power threshold, Price threshold, Device offline, Daily consumption
- Mock alert generator with 5 default Norwegian household alerts
- Alert API endpoints (/api/v1/alerts/*) - 9 RESTful endpoints
- Alert list widget (HTMX + Alpine.js) with create/edit/delete modals
- i18n translations (Norwegian Bokmål + English)
- 722 tests passing (79 new alert tests)

API endpoints:
- GET /alerts - List alerts with filters (type, enabled)
- GET /alerts/summary - Summary statistics (counts by type/severity)
- GET /alerts/history - Alert event history with acknowledge status
- GET /alerts/{alert_id} - Single alert details
- POST /alerts - Create new alert
- PUT /alerts/{alert_id} - Update alert
- DELETE /alerts/{alert_id} - Delete alert
- POST /alerts/{alert_id}/toggle - Enable/disable alert
- POST /alerts/history/{event_id}/acknowledge - Acknowledge event

Next: Slice 7 - Rule Builder (basic if/then automation rules)

Slice 4 Complete: Historical Charts (2025-11-26)

Fourth vertical slice of MVP is complete. Interactive historical power charts with time-series visualization.

Components delivered:
- Mock history data generator with Norwegian household power patterns
- History API endpoints (/api/v1/history/{site_id}/*) - 4 RESTful endpoints
- Chart.js interactive line chart component
- Time range selector (1h, 24h, 7d, 30d)
- Aggregation intervals (1m, 5m, 15m, 1h)
- Statistics display (total energy, avg/max/min power)
- CSV export functionality
- 513 tests passing (61 new history tests)
- 89.47% code coverage (100% for history API and schemas)

Next: Slice 5 - Device List (device inventory, status indicators)

Slice 3 Complete: Price Integration (2025-11-26)

Third vertical slice of MVP is complete. Nord Pool spot price integration with live pricing data.

Components delivered:
- Nord Pool API integration (live data from dataportal-api.nordpoolgroup.com)
- Price API endpoints (/api/v1/prices/*) - 5 RESTful endpoints
- Current spot price display by region (NO1-NO5)
- Cost per hour calculation
- Price trend indicator (rising/falling/stable)
- Day statistics (min/avg/max)
- Price widget component (HTMX + Alpine.js) with auto-refresh
- 452 tests passing (17 new pricing tests)

Next: Slice 4 - Historical Charts (time-series visualization, QuestDB queries)

Slice 2 Complete: Live Telemetry Display (2025-11-26)

Second vertical slice of MVP is complete. Real-time power monitoring with SSE streaming.

Components delivered:
- SSE endpoint for live power data (GET /api/v1/sites/{id}/live)
- Mock telemetry generator simulating Norwegian household patterns
- Live power gauge component (HTMX + SSE + Alpine.js)
- Connection status indicator with visual feedback
- 3-phase breakdown display (L1/L2/L3 voltage/current)
- 357 tests passing (21 new telemetry tests)

Next: Slice 3 - Price Integration (Nord Pool API, cost calculations)

Slice 1 Complete: Auth + Dashboard Shell (2025-11-26)

First vertical slice of MVP is complete. User can register, login, and see dashboard layout.

Components delivered:
- JWT authentication with PyJWT (access + refresh tokens)
- HTMX cookie-based auth for browser flows
- Token blacklisting via Redis for secure logout
- Security middleware (headers, request ID, rate limiting)
- Login/Register pages (Jinja2 + HTMX + DaisyUI)
- Dashboard shell with navigation and placeholder widgets
- 179 tests passing

Added

Internationalization (i18n) Infrastructure (2025-11-26)

  • JSON-based translation system with namespace pattern ({{ _('namespace.key') }})
  • Norwegian Bokmål (nb) as default locale, English (en) as secondary
  • Translation files: locales/{nb,en}/{auth,common,dashboard,nav,units}.json
  • Automatic locale detection (URL param → user preference → Accept-Language)
  • Jinja2 integration via app/i18n/ module
  • 52 comprehensive i18n unit tests validating translation completeness

E2E Testing Infrastructure - Page Object Model (2025-11-26)

  • Page Object Model pattern for all E2E tests (tests/e2e/pages/)
  • Base page with tid() helper for data-testid selectors
  • Implemented page objects: login_page.py, register_page.py, dashboard_page.py
  • Language-independent selectors enable i18n testing
  • Common utilities: navigation, waits, screenshots, assertions

UI Component Registry (2025-11-26)

  • Created component-registry.yaml linking designs → code → tests
  • Tracks test IDs, translation keys, templates, and styles
  • Enables validation that all components are properly tested
  • Prevents test ID collisions and orphaned entries

CI Validation Scripts (2025-11-26)

  • scripts/validate-translations.py - Validates translation completeness
  • scripts/validate-ui-registry.py - Validates UI component registry
  • Ensures all data-testid attributes are documented
  • Catches missing test IDs before deployment

Template Updates for Testing (2025-11-26)

  • Added data-testid attributes to login.html, register.html, dashboard/index.html
  • Standardized naming: {page}-{element}-{type} (e.g., "login-email-input")
  • Updated base.html with testable navigation elements
  • Enables reliable E2E testing across UI changes

Live Telemetry Streaming (2025-11-26)

  • SSE endpoint for real-time power data streaming (/api/v1/sites/{id}/live)
  • Current telemetry endpoint for single readings (/api/v1/sites/{id}/current)
  • Mock telemetry generator simulating Norwegian household power patterns
  • Time-of-day consumption patterns (morning rush, dinner peak, night minimal)
  • Random appliance events (water heater, washing machine, oven, etc.)
  • 3-phase power distribution (L1/L2/L3) with voltage ±10% variation
  • HTMX SSE extension integration for real-time dashboard updates
  • Alpine.js components for reactive UI state management
  • Connection status indicator (connected/reconnecting states)
  • 21 new telemetry tests (14 unit, 7 integration)

Fixed

E2E Test Suite & CSRF Token Synchronization (2025-11-26)

  • Fixed CSRF token synchronization between get_csrf_token() and middleware
  • Added HTMX 422 response handling for inline validation error display
  • Fixed E2E logout test to handle dropdown menu interaction
  • Fixed session persistence test with proper reload waiting
  • All 24 E2E tests now passing

Non-ASCII Character Cleanup (2025-11-26)

  • Removed all æ characters from technical identifiers (per naming convention)
  • Fixed Docker Compose: EMQX_NAME: emqx@ampæra.localEMQX_NODE__NAME: emqx@127.0.0.1
  • Fixed test Docker Compose: ampæra_testampaera_test for DB/user/network
  • Fixed health command: ampæra_userampaera_user
  • Prevents EMQX container failures and encoding issues

Added

  • Cookie-based authentication for browser/HTMX flows (complementing JWT API auth)
  • Secure httpOnly cookies with SameSite protection for XSS prevention
  • Automatic CSRF protection via cookie configuration
  • Dual auth strategy: JWT for API clients, cookies for browser clients

Playwright E2E Testing Infrastructure (2025-11-26)

  • Playwright integration for browser-based end-to-end testing
  • Auth flow E2E tests (login, logout, protected routes)
  • Graceful test skipping when server not running
  • Headless and headed test mode support

Changed

Skills Directory Reorganization (2025-11-26)

  • Refactored .claude/skills/ directory structure for clarity
  • Fixed naming conventions across all skill files
  • Improved organization by category

Fixed

Pre-Push Hook Fix (2025-11-26)

  • Fixed unbound variable in pre-push hook causing script failures

Auth API Test Fix (2025-11-26)

  • Fixed event loop mismatch in auth API tests (pytest-asyncio configuration)

Changed

Documentation Standardization

  • Added YAML frontmatter to all documentation files for agentic tracking and freshness detection
  • Established clear document hierarchy (ROADMAP -> project-status -> devlog -> CHANGELOG)
  • Updated documentation index (docs/INDEX.md) with missing references
  • Consolidated redundant documentation into comprehensive guides

CI/CD Improvements

  • Fixed pytest-asyncio session-scoped event loop configuration
  • Corrected session scope for auth_client fixture
  • Ensured database tables exist before auth API tests
  • Fixed CI PostgreSQL authentication issues
  • Reorganized scripts folder structure

Type Checking Migration

  • Migrated from mypy to pyright across documentation and CI
  • Updated all configuration files for pyright compatibility

Claude Code Agent Model Strategy (Opus 4.5 Era)

  • Updated agent model assignments following Anthropic's Opus 4.5 release (Nov 24, 2025)
  • Lead agents now default to Opus 4.5: project-manager (v2.2.0), devops-guardian (v1.4.0), stack-debugger (v1.3.0)
  • Sub-agents remain on Haiku with Opus escalation: test-guardian (v2.1.0), documentation-guardian (v1.4.0)
  • Updated guardian-coordination.md with new model strategy patterns
  • Added effort parameter guidance for cost optimization

Added

Codebase Health Analysis System

  • New scripts/code/ module for comprehensive codebase health detection:
  • Orphaned file detection with __init__.py re-export tracing (eliminates false positives)
  • Dead dependency detection with import name mapping
  • Empty directory detection
  • Circular dependency detection
  • Complexity hotspot analysis via radon
  • CLI commands: python -m scripts code health, orphans, empty-dirs, dead-deps
  • JSON output mode for CI integration
  • Added codebase health tools to dev dependencies: vulture, deptry, radon, pydeps

Enhanced Guardian Agents

  • test-guardian v2.2.0: Added test organization and structure management responsibilities
  • documentation-guardian v2.0.0: Added documentation generation capabilities
  • Guardian pattern now follows: Validate + Organize + Generate

Documentation Consistency System (ADR-006)

  • Implemented documentation consistency system with automated validation
  • Added documentation staleness checking with frontmatter metadata
  • Code reference validation for documentation files

Authentication System (Slice 1 Backend)

  • Complete JWT authentication with PyJWT (replaced abandoned python-jose)
  • Refresh token support (7-day expiry) with POST /v1/auth/refresh endpoint
  • Token blacklisting via Redis for secure logout
  • JTI (JSON Token Identifier) in all tokens for revocation tracking
  • POST /v1/auth/logout endpoint with token blacklisting

Security Middleware

  • Security headers middleware (X-Content-Type-Options, X-Frame-Options, CSP, HSTS)
  • Request ID middleware for distributed tracing (X-Request-ID header)
  • Rate limiting with slowapi (per-IP rate limits)

Error Handling

  • Structured error responses with machine-readable error codes
  • ErrorResponse model with error, code, details, and request_id fields
  • Centralized exception handlers for HTTP, validation, and token errors

Health Checks

  • Enhanced /v1/health endpoint with dependency verification (database, Redis)
  • Kubernetes liveness probe: GET /v1/health/live
  • Kubernetes readiness probe: GET /v1/health/ready
  • Latency metrics for each dependency check

Documentation

  • ADR-005: JWT Authentication Strategy
  • Comprehensive auth endpoint documentation (docs/api/auth-endpoint.md)
  • Updated health endpoint documentation
  • ADR guidance integrated into CLAUDE.md

Testing

  • 29 new unit tests for JWT token creation, verification, and blacklisting
  • Integration tests for refresh token and logout endpoints
  • 134 total tests passing

Development Infrastructure

  • Documentation validation scripts with comprehensive test coverage
  • scripts/check-doc-staleness.py - Monitors documentation freshness with YAML frontmatter
  • scripts/validate-code-refs.py - Validates code references in documentation
  • scripts/validate-doc-links.py - Checks for broken internal/external links
  • Test suite with 95%+ coverage for all validation scripts
  • Two-tier git hook architecture for optimal development workflow
  • pre-commit-quick.sh - Fast checks (Black, Ruff) in ~2-5 seconds
  • pre-pr-ci-check.sh - Comprehensive validation (Black, Ruff, Mypy, syntax) in ~10-30 seconds
  • Testing best practices guide (.claude/TESTING_BEST_PRACTICES.md, 382 lines)
  • Enhanced .gitignore with comprehensive patterns for entire tech stack
  • FastAPI, QuestDB, EMQX, Redis, PostgreSQL patterns
  • Type checking artifacts (.mypy_cache, .ruff_cache)
  • Testing artifacts (.pytest_cache, .benchmarks, coverage)
  • Security patterns (SSL certificates, secrets)
  • Database data directories

Documentation

  • Documentation index (docs/INDEX.md) for easy navigation
  • Test fixtures for documentation validation testing
  • Comprehensive hooks documentation in .claude/hooks/README.md

Changed

  • Updated all git hooks to use uv run for consistent tool execution
  • Enhanced pyproject.toml with ruff/mypy exceptions for development scripts
  • Fixed all linting and type checking issues across codebase

Removed

  • Removed unused dependencies: python-dotenv (env vars handled by pydantic-settings), aiohttp (using httpx)

Fixed

  • Cleaned up 74MB of cached artifacts (.mypy_cache, .pytest_cache, pycache)
  • Removed hardcoded tool paths from git hooks (PATH issues resolved)
  • Import issues in test files for validation scripts

0.1.0 - 2025-11-24

Added

Infrastructure

  • Docker Compose stack with EMQX, QuestDB, Redis, PostgreSQL, and FastAPI
  • Complete CI/CD pipelines with GitHub Actions
  • CI workflow with linting, type checking, and testing
  • Security workflow with vulnerability scanning and Bandit
  • Git hooks for pre-commit and pre-push validation
  • Pre-commit framework configuration with Black, Ruff, Mypy, and Bandit

Application

  • Basic FastAPI application structure with health endpoint
  • Root endpoint with HTMX 2.0 and DaisyUI integration
  • Test API endpoint for development validation
  • Static file serving support

Development Tools

  • Comprehensive Python project configuration (pyproject.toml)
  • Test suite with pytest, pytest-asyncio, and pytest-cov
  • Code quality tools: Black, Ruff, Mypy
  • Security scanning: Bandit, Safety, Trivy

Documentation

  • Project README with quick start guide
  • Architecture documentation
  • Requirements specification
  • Claude Code integration with agents, skills, and commands
  • MCP server configuration (Context7 and Playwright)

Agent System

  • 5 core agents (project-manager, devops-guardian, test-guardian, documentation-guardian, stack-debugger)
  • 36 specialized skills across 10 categories
  • 4 slash commands (/dev-start, /test, /agents, /health)
  • 4 active hooks for code quality and safety

Changed

  • Upgraded HTMX from 1.9.10 to 2.0.6
  • Updated DaisyUI to latest version (4.12.14)

Infrastructure Details

  • EMQX: v5.9 (MQTT broker with dashboard on port 18083)
  • QuestDB: Latest (time-series database with web console on port 9000)
  • Redis: v7.4-alpine (cache and pub/sub on port 6379)
  • PostgreSQL: v16-alpine (metadata database on port 5432)
  • FastAPI: v0.115.0 (Python 3.12+)

Security

  • Proprietary license added
  • .dockerignore for secure container builds
  • Git safety guards to prevent dangerous operations
  • Dependency vulnerability scanning in CI

Laget med kjarlighet for det norske energisamfunnet