Add Qt6 support
parent
de073f9b59
commit
f7cc492fd6
13
config.pri
13
config.pri
|
|
@ -7,4 +7,15 @@ gcc {
|
||||||
top_srcdir = $$PWD
|
top_srcdir = $$PWD
|
||||||
top_builddir = $$shadowed($$PWD)
|
top_builddir = $$shadowed($$PWD)
|
||||||
|
|
||||||
CONFIG += c++11
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ NYMEA_ENERGY_VERSION_STRING = "0.0.1"
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += nymea
|
PKGCONFIG += nymea
|
||||||
|
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
energylogs.h \
|
energylogs.h \
|
||||||
energymanager.h \
|
energymanager.h \
|
||||||
|
|
@ -37,4 +36,3 @@ QMAKE_PKGCONFIG_LIBDIR = $$target.path
|
||||||
QMAKE_PKGCONFIG_VERSION = $$NYMEA_ENERGY_VERSION_STRING
|
QMAKE_PKGCONFIG_VERSION = $$NYMEA_ENERGY_VERSION_STRING
|
||||||
QMAKE_PKGCONFIG_FILE = nymea-energy
|
QMAKE_PKGCONFIG_FILE = nymea-energy
|
||||||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#define ENERGYJSONHANDLER_H
|
#define ENERGYJSONHANDLER_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "jsonrpc/jsonhandler.h"
|
#include <jsonrpc/jsonhandler.h>
|
||||||
|
|
||||||
class EnergyManager;
|
class EnergyManager;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
@ -43,7 +43,8 @@
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcEnergyExperience)
|
Q_DECLARE_LOGGING_CATEGORY(dcEnergyExperience)
|
||||||
|
|
||||||
EnergyLogger::EnergyLogger(QObject *parent) : EnergyLogs(parent)
|
EnergyLogger::EnergyLogger(QObject *parent)
|
||||||
|
: EnergyLogs(parent)
|
||||||
{
|
{
|
||||||
if (!initDB()) {
|
if (!initDB()) {
|
||||||
qCCritical(dcEnergyExperience()) << "Unable to open energy log. Energy logs will not be available.";
|
qCCritical(dcEnergyExperience()) << "Unable to open energy log. Energy logs will not be available.";
|
||||||
|
|
@ -489,33 +490,46 @@ bool EnergyLogger::initDB()
|
||||||
{
|
{
|
||||||
m_db.close();
|
m_db.close();
|
||||||
|
|
||||||
m_db = QSqlDatabase::addDatabase("QSQLITE", "energylogs");
|
m_db = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE"), "energylogs");
|
||||||
QDir path = QDir(NymeaSettings::storagePath());
|
QDir path = QDir(NymeaSettings::storagePath());
|
||||||
if (!path.exists()) {
|
if (!path.exists())
|
||||||
path.mkpath(path.path());
|
path.mkpath(path.path());
|
||||||
}
|
|
||||||
m_db.setDatabaseName(path.filePath("energylogs.sqlite"));
|
m_db.setDatabaseName(path.filePath("energylogs.sqlite"));
|
||||||
|
|
||||||
bool opened = m_db.open();
|
if (!m_db.isValid()) {
|
||||||
if (!opened) {
|
qCWarning(dcEnergyExperience()) << "The energy database is not valid" << m_db.databaseName();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
qCDebug(dcEnergyExperience()) << "Opening energy database" << m_db.databaseName();
|
||||||
|
if (!m_db.open()) {
|
||||||
qCWarning(dcEnergyExperience()) << "Cannot open energy log DB at" << m_db.databaseName() << m_db.lastError();
|
qCWarning(dcEnergyExperience()) << "Cannot open energy log DB at" << m_db.databaseName() << m_db.lastError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_db.tables().contains("metadata")) {
|
if (!m_db.tables().contains("metadata")) {
|
||||||
qCDebug(dcEnergyExperience()) << "No \"metadata\" table in database. Creating it.";
|
qCDebug(dcEnergyExperience()) << "No \"metadata\" table in database. Creating it.";
|
||||||
m_db.exec("CREATE TABLE metadata (version INT);");
|
|
||||||
m_db.exec("INSERT INTO metadata (version) VALUES (1);");
|
|
||||||
|
|
||||||
if (m_db.lastError().isValid()) {
|
QString queryString = "CREATE TABLE IF NOT EXISTS metadata (version INT);";
|
||||||
qCWarning(dcEnergyExperience()) << "Error creating metadata table in energy log database. Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
QSqlQuery createTableMetadataVersionQuery(queryString, m_db);
|
||||||
|
|
||||||
|
if (!createTableMetadataVersionQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error creating metadata table in energy log database. Query:" << queryString << createTableMetadataVersionQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
queryString = "INSERT INTO metadata (version) VALUES (1);";
|
||||||
|
QSqlQuery writeVersionQuery(queryString, m_db);
|
||||||
|
if (!writeVersionQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error writing metadata table in energy log database. Query:" << queryString << writeVersionQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_db.tables().contains("powerBalance")) {
|
if (!m_db.tables().contains("powerBalance")) {
|
||||||
qCDebug(dcEnergyExperience()) << "No \"powerBalance\" table in database. Creating it.";
|
qCDebug(dcEnergyExperience()) << "No \"powerBalance\" table in database. Creating it.";
|
||||||
m_db.exec("CREATE TABLE powerBalance "
|
QString query("CREATE TABLE IF NOT EXISTS powerBalance "
|
||||||
"("
|
"("
|
||||||
"timestamp BIGINT,"
|
"timestamp BIGINT,"
|
||||||
"sampleRate INT,"
|
"sampleRate INT,"
|
||||||
|
|
@ -529,20 +543,23 @@ bool EnergyLogger::initDB()
|
||||||
"totalReturn FLOAT"
|
"totalReturn FLOAT"
|
||||||
");");
|
");");
|
||||||
|
|
||||||
if (m_db.lastError().isValid()) {
|
QSqlQuery createTableQuery(query, m_db);
|
||||||
qCWarning(dcEnergyExperience()) << "Error creating powerBalance table in energy log database. Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
if (!createTableQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error creating powerBalance table in energy log database." << query << createTableQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
m_db.exec("CREATE INDEX IF NOT EXISTS idx_powerBalance ON powerBalance(sampleRate, timestamp);");
|
|
||||||
if (m_db.lastError().isValid()) {
|
QSqlQuery createPowerBalanceIndexQuery("CREATE INDEX IF NOT EXISTS idx_powerBalance ON powerBalance(sampleRate, timestamp);", m_db);
|
||||||
qCWarning(dcEnergyExperience()) << "Error creating powerBalance table index in energy log database. Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
if (!createPowerBalanceIndexQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error creating powerBalance table index in energy log database. Query:" << createPowerBalanceIndexQuery.lastQuery() << createPowerBalanceIndexQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_db.tables().contains("thingPower")) {
|
if (!m_db.tables().contains("thingPower")) {
|
||||||
qCDebug(dcEnergyExperience()) << "No \"thingPower\" table in database. Creating it.";
|
qCDebug(dcEnergyExperience()) << "No \"thingPower\" table in database. Creating it.";
|
||||||
m_db.exec("CREATE TABLE thingPower "
|
QString query("CREATE TABLE IF NOT EXISTS thingPower "
|
||||||
"("
|
"("
|
||||||
"timestamp BIGINT,"
|
"timestamp BIGINT,"
|
||||||
"sampleRate INT,"
|
"sampleRate INT,"
|
||||||
|
|
@ -551,27 +568,32 @@ bool EnergyLogger::initDB()
|
||||||
"totalConsumption FLOAT,"
|
"totalConsumption FLOAT,"
|
||||||
"totalProduction FLOAT"
|
"totalProduction FLOAT"
|
||||||
");");
|
");");
|
||||||
if (m_db.lastError().isValid()) {
|
|
||||||
qCWarning(dcEnergyExperience()) << "Error creating thingPower table in energy log database. Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
QSqlQuery createThingPowerTableQuery(query, m_db);
|
||||||
|
if (!createThingPowerTableQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error creating thingPower table in energy log database. Query:" << query << createThingPowerTableQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_db.exec("CREATE INDEX IF NOT EXISTS idx_thingPower ON thingPower(thingId, sampleRate, timestamp);");
|
|
||||||
if (m_db.lastError().isValid()) {
|
QSqlQuery createThingPowerIndexQuery("CREATE INDEX IF NOT EXISTS idx_thingPower ON thingPower(thingId, sampleRate, timestamp);", m_db);
|
||||||
qCWarning(dcEnergyExperience()) << "Error creating thingPower table index in energy log database. Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
if (!createThingPowerIndexQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error creating thingPower table index in energy log database. Query:" << createThingPowerIndexQuery.lastQuery() << createThingPowerIndexQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_db.tables().contains("thingCache")) {
|
if (!m_db.tables().contains("thingCache")) {
|
||||||
qCDebug(dcEnergyExperience()) << "No \"thingCache\" table in database. Creating it.";
|
qCDebug(dcEnergyExperience()) << "No \"thingCache\" table in database. Creating it.";
|
||||||
m_db.exec("CREATE TABLE thingCache "
|
QString query("CREATE TABLE IF NOT EXISTS thingCache "
|
||||||
"("
|
"("
|
||||||
"thingId VARCHAR(38) PRIMARY KEY,"
|
"thingId VARCHAR(38) PRIMARY KEY,"
|
||||||
"totalEnergyConsumed FLOAT,"
|
"totalEnergyConsumed FLOAT,"
|
||||||
"totalEnergyProduced FLOAT"
|
"totalEnergyProduced FLOAT"
|
||||||
");");
|
");");
|
||||||
if (m_db.lastError().isValid()) {
|
|
||||||
qCWarning(dcEnergyExperience()) << "Error creating thingCache table in energy log database. Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
QSqlQuery createThingCacheTableQuery(query, m_db);
|
||||||
|
if (!createThingCacheTableQuery.exec()) {
|
||||||
|
qCWarning(dcEnergyExperience()) << "Error creating thingCache table in energy log database. Query:" << query << createThingCacheTableQuery.lastError().text() << "Driver error:" << m_db.lastError().driverText() << "Database error:" << m_db.lastError().databaseText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
@ -180,8 +180,8 @@ void EnergyManagerImpl::watchThing(Thing *thing)
|
||||||
m_powerBalanceTotalEnergyConsumedCache[thing] = stateEntry.totalConsumption();
|
m_powerBalanceTotalEnergyConsumedCache[thing] = stateEntry.totalConsumption();
|
||||||
m_powerBalanceTotalEnergyProducedCache[thing] = stateEntry.totalProduction();
|
m_powerBalanceTotalEnergyProducedCache[thing] = stateEntry.totalProduction();
|
||||||
|
|
||||||
m_thingsTotalEnergyConsumedCache[thing] = qMakePair<double, double>(stateEntry.totalConsumption(), entry.totalConsumption());
|
m_thingsTotalEnergyConsumedCache[thing] = QPair<double, double>(stateEntry.totalConsumption(), entry.totalConsumption());
|
||||||
m_thingsTotalEnergyProducedCache[thing] = qMakePair<double, double>(stateEntry.totalProduction(), entry.totalProduction());
|
m_thingsTotalEnergyProducedCache[thing] = QPair<double, double>(stateEntry.totalProduction(), entry.totalProduction());
|
||||||
qCDebug(dcEnergyExperience()) << "Loaded thing power totals for" << thing->name() << "Consumption:" << entry.totalConsumption() << "Production:" << entry.totalProduction() << "Last thing state consumption:" << stateEntry.totalConsumption() << "production:" << stateEntry.totalProduction();
|
qCDebug(dcEnergyExperience()) << "Loaded thing power totals for" << thing->name() << "Consumption:" << entry.totalConsumption() << "Production:" << entry.totalProduction() << "Last thing state consumption:" << stateEntry.totalConsumption() << "production:" << stateEntry.totalProduction();
|
||||||
|
|
||||||
updateThingPower(thing);
|
updateThingPower(thing);
|
||||||
|
|
@ -315,7 +315,7 @@ void EnergyManagerImpl::updateThingPower(Thing *thing)
|
||||||
}
|
}
|
||||||
double consumptionDiff = newThingConsumptionState - oldThingConsumptionState;
|
double consumptionDiff = newThingConsumptionState - oldThingConsumptionState;
|
||||||
double newThingConsumptionInternal = oldThingConsumptionInternal + consumptionDiff;
|
double newThingConsumptionInternal = oldThingConsumptionInternal + consumptionDiff;
|
||||||
m_thingsTotalEnergyConsumedCache[thing] = qMakePair<double, double>(newThingConsumptionState, newThingConsumptionInternal);
|
m_thingsTotalEnergyConsumedCache[thing] = QPair<double, double>(newThingConsumptionState, newThingConsumptionInternal);
|
||||||
|
|
||||||
|
|
||||||
// Production
|
// Production
|
||||||
|
|
@ -334,7 +334,7 @@ void EnergyManagerImpl::updateThingPower(Thing *thing)
|
||||||
}
|
}
|
||||||
double productionDiff = newThingProductionState - oldThingProductionState;
|
double productionDiff = newThingProductionState - oldThingProductionState;
|
||||||
double newThingProductionInternal = oldThingProductionInternal + productionDiff;
|
double newThingProductionInternal = oldThingProductionInternal + productionDiff;
|
||||||
m_thingsTotalEnergyProducedCache[thing] = qMakePair<double, double>(newThingProductionState, newThingProductionInternal);
|
m_thingsTotalEnergyProducedCache[thing] = QPair<double, double>(newThingProductionState, newThingProductionInternal);
|
||||||
|
|
||||||
|
|
||||||
// Write to log
|
// Write to log
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "integrations/thingmanager.h"
|
#include <integrations/thingmanager.h>
|
||||||
|
|
||||||
#include "energymanager.h"
|
#include "energymanager.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Copyright 2013 - 2024, nymea GmbH
|
* Copyright 2013 - 2025, nymea GmbH
|
||||||
* Contact: contact@nymea.io
|
* Contact: contact@nymea.io
|
||||||
*
|
*
|
||||||
* This file is part of nymea.
|
* This file is part of nymea.
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
TARGET = $$qtLibraryTarget(nymea_experiencepluginenergy)
|
TARGET = $$qtLibraryTarget(nymea_experiencepluginenergy)
|
||||||
|
|
||||||
CONFIG += plugin link_pkgconfig c++11
|
include(../config.pri)
|
||||||
|
|
||||||
|
CONFIG += plugin link_pkgconfig
|
||||||
PKGCONFIG += nymea
|
PKGCONFIG += nymea
|
||||||
|
|
||||||
QT -= gui
|
QT -= gui
|
||||||
QT += network sql
|
QT += network sql
|
||||||
|
|
||||||
include(../config.pri)
|
|
||||||
|
|
||||||
INCLUDEPATH += $$top_srcdir/libnymea-energy
|
INCLUDEPATH += $$top_srcdir/libnymea-energy
|
||||||
LIBS += -L$$top_builddir/libnymea-energy -lnymea-energy
|
LIBS += -L$$top_builddir/libnymea-energy -lnymea-energy
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue