powersync-energy-plugin-etm/energyplugin
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
..
adapters feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
schedulingstrategies feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
spotmarket initial commit 2026-01-11 11:09:23 +01:00
translations initial commit 2026-01-11 11:09:23 +01:00
types feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
energymanagerconfiguration.cpp initial commit 2026-01-11 11:09:23 +01:00
energymanagerconfiguration.h initial commit 2026-01-11 11:09:23 +01:00
energyplugin.pri feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
energyplugin.pro initial commit 2026-01-11 11:09:23 +01:00
energypluginnymea.cpp feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
energypluginnymea.h initial commit 2026-01-11 11:09:23 +01:00
energysettings.cpp initial commit 2026-01-11 11:09:23 +01:00
energysettings.h initial commit 2026-01-11 11:09:23 +01:00
evcharger.cpp initial commit 2026-01-11 11:09:23 +01:00
evcharger.h initial commit 2026-01-11 11:09:23 +01:00
nymeaenergyjsonhandler.cpp feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
nymeaenergyjsonhandler.h feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
plugininfo.h initial commit 2026-01-11 11:09:23 +01:00
rootmeter.cpp initial commit 2026-01-11 11:09:23 +01:00
rootmeter.h initial commit 2026-01-11 11:09:23 +01:00
schedulermanager.cpp feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
schedulermanager.h feat: Installer Setup — LoadAdapterRegistry + adapter layer (v12) 2026-02-24 09:15:06 +01:00
schedulersettings.cpp feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
schedulersettings.h feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
smartchargingmanager.cpp initial commit 2026-01-11 11:09:23 +01:00
smartchargingmanager.h initial commit 2026-01-11 11:09:23 +01:00