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>
94 lines
3.2 KiB
Plaintext
94 lines
3.2 KiB
Plaintext
# All files in energyplugin use relative includes (e.g. "types/foo.h").
|
|
# Consumers of this .pri must have the energyplugin root on their include path.
|
|
INCLUDEPATH += $$PWD
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 5) {
|
|
message("Building using Qt6 support")
|
|
CONFIG *= c++17
|
|
QMAKE_LFLAGS *= -std=c++17
|
|
QMAKE_CXXFLAGS *= -std=c++17
|
|
} else {
|
|
message("Building using Qt5 support")
|
|
CONFIG *= c++11
|
|
QMAKE_LFLAGS *= -std=c++11
|
|
QMAKE_CXXFLAGS *= -std=c++11
|
|
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00
|
|
}
|
|
|
|
coverage {
|
|
message(Building with code coverage enabled)
|
|
# --coverage option contains: -fprofile-arcs -ftest-coverage -lgcov
|
|
QMAKE_CXXFLAGS *= --coverage
|
|
QMAKE_LDFLAGS *= --coverage
|
|
LIBS += -lgcov
|
|
}
|
|
|
|
HEADERS += \
|
|
$$PWD/energymanagerconfiguration.h \
|
|
$$PWD/energysettings.h \
|
|
$$PWD/evcharger.h \
|
|
$$PWD/nymeaenergyjsonhandler.h \
|
|
$$PWD/rootmeter.h \
|
|
$$PWD/schedulermanager.h \
|
|
$$PWD/schedulersettings.h \
|
|
$$PWD/smartchargingmanager.h \
|
|
$$PWD/spotmarket/spotmarketdataprovider.h \
|
|
$$PWD/spotmarket/spotmarketdataproviderawattar.h \
|
|
$$PWD/spotmarket/spotmarketmanager.h \
|
|
$$PWD/schedulingstrategies/ischedulingstrategy.h \
|
|
$$PWD/schedulingstrategies/rulebasedstrategy.h \
|
|
$$PWD/schedulingstrategies/aistrategy.h \
|
|
$$PWD/schedulingstrategies/manualstrategy.h \
|
|
$$PWD/types/chargingaction.h \
|
|
$$PWD/types/charginginfo.h \
|
|
$$PWD/types/chargingprocessinfo.h \
|
|
$$PWD/types/chargingschedule.h \
|
|
$$PWD/types/energytimeslot.h \
|
|
$$PWD/types/flexibleload.h \
|
|
$$PWD/types/loadrole.h \
|
|
$$PWD/types/manualslotconfig.h \
|
|
$$PWD/types/schedulerconfig.h \
|
|
$$PWD/types/scoreentry.h \
|
|
$$PWD/types/smartchargingstate.h \
|
|
$$PWD/types/timeframe.h \
|
|
$$PWD/adapters/iloadapter.h \
|
|
$$PWD/adapters/relayadapter.h \
|
|
$$PWD/adapters/sgreadyadapter.h \
|
|
$$PWD/adapters/evchargeradapter.h \
|
|
$$PWD/adapters/batteryadapter.h \
|
|
$$PWD/adapters/loadadapterregistry.h \
|
|
$$PWD/adapters/adaptersettings.h \
|
|
|
|
SOURCES += \
|
|
$$PWD/energymanagerconfiguration.cpp \
|
|
$$PWD/energysettings.cpp \
|
|
$$PWD/evcharger.cpp \
|
|
$$PWD/nymeaenergyjsonhandler.cpp \
|
|
$$PWD/rootmeter.cpp \
|
|
$$PWD/schedulermanager.cpp \
|
|
$$PWD/schedulersettings.cpp \
|
|
$$PWD/smartchargingmanager.cpp \
|
|
$$PWD/spotmarket/spotmarketdataprovider.cpp \
|
|
$$PWD/spotmarket/spotmarketdataproviderawattar.cpp \
|
|
$$PWD/spotmarket/spotmarketmanager.cpp \
|
|
$$PWD/schedulingstrategies/rulebasedstrategy.cpp \
|
|
$$PWD/schedulingstrategies/aistrategy.cpp \
|
|
$$PWD/schedulingstrategies/manualstrategy.cpp \
|
|
$$PWD/types/chargingaction.cpp \
|
|
$$PWD/types/charginginfo.cpp \
|
|
$$PWD/types/chargingprocessinfo.cpp \
|
|
$$PWD/types/chargingschedule.cpp \
|
|
$$PWD/types/energytimeslot.cpp \
|
|
$$PWD/types/flexibleload.cpp \
|
|
$$PWD/types/manualslotconfig.cpp \
|
|
$$PWD/types/schedulerconfig.cpp \
|
|
$$PWD/types/scoreentry.cpp \
|
|
$$PWD/types/smartchargingstate.cpp \
|
|
$$PWD/types/timeframe.cpp \
|
|
$$PWD/adapters/relayadapter.cpp \
|
|
$$PWD/adapters/sgreadyadapter.cpp \
|
|
$$PWD/adapters/evchargeradapter.cpp \
|
|
$$PWD/adapters/batteryadapter.cpp \
|
|
$$PWD/adapters/loadadapterregistry.cpp \
|
|
$$PWD/adapters/adaptersettings.cpp \
|