Commit Graph

50 Commits

Author SHA1 Message Date
gitea_admin 1152462765 Add PowerMonitor power limit enforcement service
Introduce IPowerLimitEnforcementService and its implementation: turn off configured high-power switches and pause/restore entities when the limit is exceeded, notify via persistent_notification, and restore control after the recovery window once power drops below the limit. Includes cooldown handling and manual TriggerLimitBreach/ResetLimitBreach hooks, with FakeTimeProvider-based tests covering enforcement, recovery, cooldown and debug paths.

Add opencode.json wiring the HomeAssistant MCP server, the .junie MCP config files, and the implementation plan in PLAN.md.
2026-11-29 13:58:28 +02:00
gitea_admin f0bbd4f10b Enable PowerMonitor limit enforcement and prune unused boiler/replay code
PowerMonitor now ships enabled with power-limit enforcement settings: watt limit, recovery and cooldown windows, and switch-off plus pause/restore entity lists.

Remove the unused BoilerRunTimeTracker, its DI registration and tests, the StatusCleanedUp constant, and the boiler replay runner; simplify BoilerConfigReader, control-service logging and entity parsing. Switch CostAccumulator to System.Threading.Lock, update the Shower exhaust fan service and tests, drop the legacy HistoryReplay/McpServer sources and reporting tooling, and expand AGENTS.md with the current project wiring and DI notes.
2026-11-29 13:58:08 +02:00
gitea_admin f176a1b8fc Add manual MQTT recreation and NordPool price fetch buttons 2026-07-08 16:56:32 +03:00
gitea_admin 2706a6b188 Refactor services to use DI for IHaContext and TimeProvider 2026-07-03 12:15:44 +03:00
gitea_admin 7f280bea7b Fix bugs 2026-06-28 14:22:13 +03:00
gitea_admin e6bf8258bb Update 2026-06-28 13:58:35 +03:00
gitea_admin 8f45028715 Init 2026-06-28 13:57:47 +03:00
Marius 6e4d684359 feat: add BatteryMonitor implementation with discovery, notification, and scheduling services 2026-04-01 10:55:33 +03:00
Marius 11c2574235 feat: migrate boiler control implementation to BoilerMonitor namespace and add budget handling logic 2026-03-24 15:29:59 +02:00
Marius c4015277a3 Add implementation plan for boiler anti-cycling and debug entity
Made-with: Cursor
2026-03-21 12:52:31 +02:00
Marius c9bf646f81 Add design doc for boiler anti-cycling and debug diagnostic entity
Made-with: Cursor
2026-03-21 12:50:32 +02:00
Marius a14fb65be3 fix: reset current price state to empty string instead of "0" 2026-03-19 16:46:21 +02:00
Marius 4a8eb30304 fix: handle Local and Unspecified DateTimeKind in CompactNordPoolDayPrice conversion
Made-with: Cursor
2026-03-19 16:38:10 +02:00
Marius 4c6b6938e8 feat: add PowerMonitor service registration and default configuration tests 2026-03-19 16:32:47 +02:00
Marius cd5f9d0352 fix: derive test constants from NordPoolConsts to prevent stale values
Made-with: Cursor
2026-03-19 16:32:32 +02:00
Marius 411611215a test: add compact format verification and size limit tests for NordPool entity attributes
Made-with: Cursor
2026-03-19 16:27:37 +02:00
Marius 86f8f2dfbe feat: switch NordPool entity attributes to compact array serialization format
Made-with: Cursor
2026-03-19 16:24:40 +02:00
Marius 0f146150f7 feat: add MaxExpectedPriceEntries constant for oversized payload warning
Made-with: Cursor
2026-03-19 16:22:37 +02:00
Marius 638c1ef6d1 test: add size regression guard for compact NordPool price serialization
Made-with: Cursor
2026-03-19 16:21:49 +02:00
Marius b926a8325e fix: replace magic numbers with NordPoolConsts.MinutesPerInterval in compact price tests
Made-with: Cursor
2026-03-19 16:17:47 +02:00
Marius 3e5afa42c6 feat: add ToCompact extension for NordPoolDayPrice collections
Made-with: Cursor
2026-03-19 16:15:39 +02:00
Marius b4e465573f fix: add input validation and error-path tests for CompactNordPoolDayPrice
Made-with: Cursor
2026-03-19 14:38:41 +02:00
Marius 5a4a4ed001 feat: add CompactNordPoolDayPrice with array-format JSON serialization
Made-with: Cursor
2026-03-19 13:09:49 +02:00
Marius e64836a7b1 Add implementation plan for NordPool compact price attributes
Made-with: Cursor
2026-03-19 12:10:21 +02:00
Marius b07cb97046 Add design doc for NordPool compact price attributes
Made-with: Cursor
2026-03-19 12:08:06 +02:00
Marius 89ce8b46ea fix: read NordPool price from HA entity instead of scoped service to fix cross-app price isolation
Made-with: Cursor
2026-03-17 13:53:10 +02:00
Marius 1909eedc6b fix: change PowerSensorDiscoveryService to scoped lifetime to resolve IHaContext DI error
Made-with: Cursor
2026-03-17 13:05:42 +02:00
Marius ba31ed6a45 feat: wire up PowerMonitor DI registration and complete integration
Made-with: Cursor
2026-03-17 13:01:37 +02:00
Marius 42e8db4999 feat: add PowerMonitorInit orchestrator with polling and re-discovery button
Made-with: Cursor
2026-03-17 12:59:44 +02:00
Marius 33d915f7b4 feat: add PowerMonitorEntityService with system and per-device MQTT entities
Made-with: Cursor
2026-03-17 12:57:45 +02:00
Marius 7f0ebcf826 feat: add PowerCostCalculationService with per-device cost accumulators
Made-with: Cursor
2026-03-17 12:55:25 +02:00
Marius b0fd790ba6 feat: add PowerSensorDiscoveryService with auto-discovery and exclusion patterns
Made-with: Cursor
2026-03-17 12:53:31 +02:00
Marius c77f854682 feat: add OtherPowerCalculationService with EMA smoothing and TDD tests
Made-with: Cursor
2026-03-17 12:50:16 +02:00
Marius ec722ee80a test: add CostAccumulator unit tests for all window boundaries and thread safety
Made-with: Cursor
2026-03-17 12:49:04 +02:00
Marius 47cccbfb81 feat: add PowerMonitor shared models, CostAccumulator, and entity types
Made-with: Cursor
2026-03-17 12:46:34 +02:00
Marius 6fd1af7e21 feat: add PowerMonitor configuration model and constants
Made-with: Cursor
2026-03-17 12:45:38 +02:00
Marius a3417d0e97 feat: scaffold PowerMonitor projects and add to solution
Made-with: Cursor
2026-03-17 12:44:42 +02:00
Marius 9d4f0b36c3 feat: add detailed implementation plan for PowerMonitor feature
Made-with: Cursor
2026-03-17 12:41:30 +02:00
Marius fa27faddcf Add power monitor design document for other power usage and cost tracking
Made-with: Cursor
2026-03-17 12:37:56 +02:00
Marius 28eddc5dc0 Add cancellation token support across NordPool services and update constants for reuse
- Introduced `CancellationToken` to service methods for improved task cancellation handling.
- Centralized reusable constants (`MinutesPerInterval`, `WaterReadyPowerThresholdWatts`) in `NordPoolConsts`.
- Refactored `ConfigureAwait` usage and improved logging within `NordPoolEntityService`.
- Adjusted tests to accommodate cancellation token changes.
2026-03-16 12:13:19 +02:00
Marius 17a2e67078 Refactor boiler control and price logic: Introduce PriceConsts, improve BoilerAction handling with switch, and update namespaces for better structure. 2026-03-16 12:08:14 +02:00
Marius 42b1fe3b18 Refactor UpdateCheapestIntervals logic to return a result object and improve code readability. Introduce CheapestIntervalsUpdateResult model for encapsulating update details and simplify inline tuples. 2026-03-16 12:00:23 +02:00
Marius 53eb53539a Add input_boolean for water heater preparation logic
Refreshed logic to allow users to toggle hot water preparation. Introduced new `input_boolean.boiler_prepare_hot_water` and updated config, services, and tests to ensure water readiness only when required.
2026-03-16 11:42:49 +02:00
Marius 5cc0ab29a6 Remove HaDbMigration.Tests project from solution 2026-03-12 14:38:22 +02:00
Marius 952e2d28a6 Update Dockerfile for multi-project restore and add HaDbMigration.Tests to solution 2026-03-12 14:38:05 +02:00
Marius 7dcdac6933 Remove HaDbMigration project and all related files 2026-03-12 13:08:53 +02:00
Marius b262d10ea4 Added migration tool 2026-03-12 09:47:49 +02:00
Marius 27648ae57c Remove PowerMonitor.Manager project and its dependencies 2026-03-10 12:27:06 +02:00
Marius 41991e78b5 Add VS Code workspace configuration 2026-03-08 19:35:43 +02:00
Marius 861c344832 Init 2026-03-08 19:10:16 +02:00