Patrick Schurig
|
67836b7234
|
feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12)
Adds a thin adapter layer that maps installer-visible roles (EVCharger,
DHW, HeatPump, Battery, SolarMeter, GridMeter) to nymea Things and
applies Scheduler slot decisions to real hardware.
New files:
- energyplugin/types/loadrole.h — LoadRole enum + compat interface map
- energyplugin/adapters/iloadapter.h — abstract ILoadAdapter interface
- energyplugin/adapters/relayadapter.h/.cpp — binary on/off relay (DHW/HP)
- energyplugin/adapters/sgreadyadapter.h/.cpp — SG-Ready 2-relay HP (SG1–SG4)
- energyplugin/adapters/evchargeradapter.h/.cpp — EV charger W→A adapter
- energyplugin/adapters/batteryadapter.h/.cpp — battery charge/discharge/standby
- energyplugin/adapters/loadadapterregistry.h/.cpp — role→Thing→adapter registry
- energyplugin/adapters/adaptersettings.h/.cpp — persists to adapters.conf (INI)
Modified:
- SchedulerManager: optional LoadAdapterRegistry param; applyCurrentSlot()
now calls adapter->applyPower() for DHW/HP/Battery roles
- NymeaEnergyJsonHandler: 6 new v12 methods (GetSetupStatus,
GetCompatibleThings, AssignThingToRole, UnassignRole, SetRoleEnabled,
TestRoleConnection) + 3 push notifications
- energypluginnymea.cpp: wires AdapterSettings + LoadAdapterRegistry,
bumps JSON-RPC version to 12
- energyplugin.pri: adds 7 headers + 6 sources
- testscheduler: 4 new tests (detectAdapterType, AdapterSettings round-trip,
null-registry no-crash, LoadRole serialization) — 15/15 pass
- doc.md: section 12 Installer Setup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-02-24 09:15:06 +01:00 |
Patrick Schurig
|
0797f37c78
|
feat: ManualStrategy — community tier scheduling with full manual control
- Add ManualSlotConfig type with weekly repeating support and auto-expiry
- Add ManualStrategy (strategyId="manual"): applies user-defined allocations
exactly; expired slots logged and skipped; inflexible/critical loads always
applied as safety fallback; decisionReason never empty
- Extend SchedulerSettings with manualSlots persistence section (INI array)
- Extend SchedulerManager with setManualSlot/removeManualSlot/clearManualSlots
methods; hydrates ManualStrategy from settings on registerStrategy()
- Add JSON-RPC v11 methods: GetManualSlots, SetManualSlot, RemoveManualSlot,
ClearManualSlots + ManualSlotActivated push notification
- Register ManualStrategy in energypluginnymea.cpp::init() (no feature flag)
- Add 5 unit tests: basicSlot, noConfig_fallback, expiredSlot, repeatingSlot,
persistence (JSON round-trip)
- Update doc.md section 11
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-02-24 06:34:31 +01:00 |