|
|
||
|---|---|---|
| debian-qt5 | ||
| debian-qt6 | ||
| libnymea-energy | ||
| plugin | ||
| .gitignore | ||
| COPYING | ||
| COPYING.LESSER | ||
| LICENSE.GPL3 | ||
| LICENSE.LGPL3 | ||
| README.md | ||
| config.pri | ||
| debian | ||
| nymea-experience-plugin-energy.pro | ||
README.md
nymea-experience-plugin-energy
This repository contains the nymea experience plugin that exposes energy-related functionality to nymea. It provides the manager implementation, JSON-RPC APIs and helper utilities used by the nymea runtime to collect, log and expose energy data.
Alongside the plugin, the repository ships the reusable libnymea-energy
library that provides the abstract energy manager interfaces and helper
types for external plugins.
Contents
plugin/: the experience plugin (nymea_experiencepluginenergy) including JSON-RPC handler and energy manager implementationlibnymea-energy/: reusable library providing core interfaces/types (EnergyManager,EnergyLogs,EnergyPlugin) for external energy pluginsdebian-qt5/,debian-qt6/: Debian packaging (thedebiansymlink selects the active one)
Build
Build requirements:
- Qt 5 or Qt 6 (including
qmake/qmake6) - nymea development files (
pkg-config --cflags --libs nymea)
Out-of-tree builds are recommended:
mkdir -p build
cd build
qmake .. # Qt5
make -j
For Qt6:
mkdir -p build
cd build
qmake6 ..
make -j
Install
cd build
make install
This installs:
- the experience plugin to
QT_INSTALL_LIBS/nymea/experiences/ libnymea-energytoQT_INSTALL_LIBSand headers toQT_INSTALL_PREFIX/include/nymea-energy/
Depending on your prefix, installation may require elevated permissions.
Runtime notes
- Energy plugins are loaded at startup by scanning for shared objects named like
libnymea_energyplugin*.so. - Plugin discovery paths can be overridden using
NYMEA_ENERGY_PLUGINS_PATH(replace defaults) andNYMEA_ENERGY_PLUGINS_EXTRA_PATH(prepend extra search directories). Both accept a colon-separated list of paths. - Runtime state is persisted in
energy.confunderNymeaSettings::settingsPath(). - Logging uses the
EnergyExperiencecategory (e.g. enable debug logs viaQT_LOGGING_RULES="EnergyExperience.debug=true").
Translations
- Update
.tsfiles:make lupdate(from the build directory) - Build
.qmfiles:make lrelease
License
The nymea experience plugin sources are licensed under the terms of the
GNU General Public License version 3 or (at your option) any later
version. The shared libnymea-energy library is licensed under the GNU
Lesser General Public License version 3 or (at your option) any later
version. Refer to the included LICENSE.GPL3, LICENSE.LGPL3 and the
SPDX headers inside the source files for the complete text.