mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor Settings DB and Handling (#1786)
* Refactor config API
* Corrections
* Test Qt 6.8
* Revert "Test Qt 6.8"
This reverts commit eceebec49e
.
* Corrections 2
* Update Changelog
* Add configFilter element for getconfig call
* Do not create errors for DB updates when in read-only mode
* Have configuration migration and validation before Hyperion starts
* Correct Tests
* Corrections
* Add migration items
* Correct windows build
* Ensure that first instance as default one exists
* Remove dependency between AuthManager and SSDPHandler
* Correct typos
* Address CodeQL findings
* Replace CamkeSettings by Presets and provide debug scenarios
This commit is contained in:
@@ -7,14 +7,15 @@
|
||||
// qt
|
||||
#include <QJsonObject>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QUuid>
|
||||
|
||||
AuthManager *AuthManager::manager = nullptr;
|
||||
|
||||
AuthManager::AuthManager(QObject *parent, bool readonlyMode)
|
||||
AuthManager::AuthManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
, _authTable(new AuthTable("", this, readonlyMode))
|
||||
, _metaTable(new MetaTable(this, readonlyMode))
|
||||
, _pendingRequests()
|
||||
, _authTable(new AuthTable(this))
|
||||
, _metaTable(new MetaTable(this))
|
||||
, _timer(new QTimer(this))
|
||||
, _authBlockTimer(new QTimer(this))
|
||||
{
|
||||
@@ -209,7 +210,7 @@ QVector<AuthManager::AuthDefinition> AuthManager::getPendingRequests() const
|
||||
|
||||
bool AuthManager::renameToken(const QString &id, const QString &comment)
|
||||
{
|
||||
if (_authTable->idExist(id))
|
||||
if (_authTable->identifierExist(id))
|
||||
{
|
||||
if (_authTable->renameToken(id, comment))
|
||||
{
|
||||
@@ -222,7 +223,7 @@ bool AuthManager::renameToken(const QString &id, const QString &comment)
|
||||
|
||||
bool AuthManager::deleteToken(const QString &id)
|
||||
{
|
||||
if (_authTable->idExist(id))
|
||||
if (_authTable->identifierExist(id))
|
||||
{
|
||||
if (_authTable->deleteToken(id))
|
||||
{
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QThread>
|
||||
#include <QVariantMap>
|
||||
|
||||
// hyperion include
|
||||
#include <hyperion/Hyperion.h>
|
||||
@@ -21,6 +22,7 @@
|
||||
#include <utils/hyperion.h>
|
||||
#include <utils/GlobalSignals.h>
|
||||
#include <utils/Logger.h>
|
||||
#include <utils/JsonUtils.h>
|
||||
|
||||
// LedDevice includes
|
||||
#include <leddevice/LedDeviceWrapper.h>
|
||||
@@ -47,10 +49,10 @@
|
||||
#include <boblightserver/BoblightServer.h>
|
||||
#endif
|
||||
|
||||
Hyperion::Hyperion(quint8 instance, bool readonlyMode)
|
||||
Hyperion::Hyperion(quint8 instance)
|
||||
: QObject()
|
||||
, _instIndex(instance)
|
||||
, _settingsManager(new SettingsManager(instance, this, readonlyMode))
|
||||
, _settingsManager(new SettingsManager(instance, this))
|
||||
, _componentRegister(nullptr)
|
||||
, _ledString(LedString::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object())))
|
||||
, _imageProcessor(nullptr)
|
||||
@@ -73,7 +75,6 @@ Hyperion::Hyperion(quint8 instance, bool readonlyMode)
|
||||
#if defined(ENABLE_BOBLIGHT_SERVER)
|
||||
, _boblightServer(nullptr)
|
||||
#endif
|
||||
, _readOnlyMode(readonlyMode)
|
||||
{
|
||||
qRegisterMetaType<ComponentList>("ComponentList");
|
||||
|
||||
@@ -320,14 +321,17 @@ QJsonDocument Hyperion::getSetting(settings::type type) const
|
||||
return _settingsManager->getSetting(type);
|
||||
}
|
||||
|
||||
bool Hyperion::saveSettings(const QJsonObject& config, bool correct)
|
||||
// TODO: Remove function, if UI is able to handle full configuration
|
||||
QJsonObject Hyperion::getQJsonConfig() const
|
||||
{
|
||||
return _settingsManager->saveSettings(config, correct);
|
||||
const QJsonObject instanceConfig = _settingsManager->getSettings();
|
||||
const QJsonObject globalConfig = _settingsManager->getSettings({},QStringList());
|
||||
return JsonUtils::mergeJsonObjects(instanceConfig, globalConfig);
|
||||
}
|
||||
|
||||
bool Hyperion::restoreSettings(const QJsonObject& config, bool correct)
|
||||
QPair<bool, QStringList> Hyperion::saveSettings(const QJsonObject& config)
|
||||
{
|
||||
return _settingsManager->restoreSettings(config, correct);
|
||||
return _settingsManager->saveSettings(config);
|
||||
}
|
||||
|
||||
int Hyperion::getLatchTime() const
|
||||
@@ -597,11 +601,6 @@ int Hyperion::setEffect(const QString &effectName, const QJsonObject &args, int
|
||||
}
|
||||
#endif
|
||||
|
||||
QJsonObject Hyperion::getQJsonConfig() const
|
||||
{
|
||||
return _settingsManager->getSettings();
|
||||
}
|
||||
|
||||
void Hyperion::setLedMappingType(int mappingType)
|
||||
{
|
||||
if(mappingType != _imageProcessor->getUserLedMappingType())
|
||||
|
@@ -9,15 +9,14 @@
|
||||
|
||||
HyperionIManager* HyperionIManager::HIMinstance;
|
||||
|
||||
HyperionIManager::HyperionIManager(const QString& rootPath, QObject* parent, bool readonlyMode)
|
||||
HyperionIManager::HyperionIManager(QObject* parent)
|
||||
: QObject(parent)
|
||||
, _log(Logger::getInstance("HYPERION-INSTMGR"))
|
||||
, _instanceTable( new InstanceTable(rootPath, this, readonlyMode) )
|
||||
, _rootPath( rootPath )
|
||||
, _readonlyMode(readonlyMode)
|
||||
, _instanceTable( new InstanceTable())
|
||||
{
|
||||
HIMinstance = this;
|
||||
qRegisterMetaType<InstanceState>("InstanceState");
|
||||
_instanceTable->createDefaultInstance();
|
||||
}
|
||||
|
||||
Hyperion* HyperionIManager::getHyperionInstance(quint8 instance)
|
||||
@@ -45,14 +44,32 @@ QVector<QVariantMap> HyperionIManager::getInstanceData() const
|
||||
return instances;
|
||||
}
|
||||
|
||||
QString HyperionIManager::getInstanceName(quint8 inst)
|
||||
{
|
||||
return _instanceTable->getNamebyIndex(inst);
|
||||
}
|
||||
|
||||
QList<quint8> HyperionIManager::getRunningInstanceIdx() const
|
||||
{
|
||||
return _runningInstances.keys();
|
||||
}
|
||||
|
||||
QList<quint8> HyperionIManager::getInstanceIds() const
|
||||
{
|
||||
return _instanceTable->getAllInstanceIDs();
|
||||
}
|
||||
|
||||
|
||||
void HyperionIManager::startAll()
|
||||
{
|
||||
for(const auto & entry : _instanceTable->getAllInstances(true))
|
||||
const QVector<QVariantMap> instances = _instanceTable->getAllInstances(true);
|
||||
if (instances.isEmpty())
|
||||
{
|
||||
Error(_log, "No enabled instances found to be started");
|
||||
return;
|
||||
}
|
||||
|
||||
for(const auto & entry : instances)
|
||||
{
|
||||
startInstance(entry["instance"].toInt());
|
||||
}
|
||||
@@ -62,7 +79,7 @@ void HyperionIManager::stopAll()
|
||||
{
|
||||
// copy the instances due to loop corruption, even with .erase() return next iter
|
||||
QMap<quint8, Hyperion*> instCopy = _runningInstances;
|
||||
for(const auto instance : instCopy)
|
||||
for(auto *const instance : instCopy)
|
||||
{
|
||||
instance->stop();
|
||||
}
|
||||
@@ -131,7 +148,7 @@ bool HyperionIManager::startInstance(quint8 inst, bool block, QObject* caller, i
|
||||
{
|
||||
QThread* hyperionThread = new QThread();
|
||||
hyperionThread->setObjectName("HyperionThread");
|
||||
Hyperion* hyperion = new Hyperion(inst, _readonlyMode);
|
||||
Hyperion* hyperion = new Hyperion(inst);
|
||||
hyperion->moveToThread(hyperionThread);
|
||||
// setup thread management
|
||||
connect(hyperionThread, &QThread::started, hyperion, &Hyperion::start);
|
||||
@@ -156,7 +173,7 @@ bool HyperionIManager::startInstance(quint8 inst, bool block, QObject* caller, i
|
||||
|
||||
if(block)
|
||||
{
|
||||
while(!hyperionThread->isRunning()){};
|
||||
while(!hyperionThread->isRunning()){}
|
||||
}
|
||||
|
||||
if (!_pendingRequests.contains(inst) && caller != nullptr)
|
||||
@@ -203,10 +220,10 @@ bool HyperionIManager::stopInstance(quint8 inst)
|
||||
|
||||
bool HyperionIManager::createInstance(const QString& name, bool start)
|
||||
{
|
||||
quint8 inst;
|
||||
quint8 inst = 0;
|
||||
if(_instanceTable->createInstance(name, inst))
|
||||
{
|
||||
Info(_log,"New Hyperion instance created with name '%s'",QSTRING_CSTR(name));
|
||||
Info(_log,"New Hyperion instance [%d] created with name '%s'", inst, QSTRING_CSTR(name));
|
||||
emit instanceStateChanged(InstanceState::H_CREATED, inst, name);
|
||||
emit change();
|
||||
|
||||
@@ -221,7 +238,9 @@ bool HyperionIManager::deleteInstance(quint8 inst)
|
||||
{
|
||||
// inst 0 can't be deleted
|
||||
if(!isInstAllowed(inst))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// stop it if required as blocking and wait
|
||||
stopInstance(inst);
|
||||
|
@@ -1,939 +1,59 @@
|
||||
// proj
|
||||
#include <hyperion/SettingsManager.h>
|
||||
|
||||
// util
|
||||
#include <utils/JsonUtils.h>
|
||||
#include <utils/QStringUtils.h>
|
||||
|
||||
#include <db/SettingsTable.h>
|
||||
#include "HyperionConfig.h"
|
||||
|
||||
// json schema process
|
||||
#include <utils/jsonschema/QJsonFactory.h>
|
||||
#include <utils/jsonschema/QJsonSchemaChecker.h>
|
||||
|
||||
// write config to filesystem
|
||||
#include <utils/JsonUtils.h>
|
||||
#include <utils/jsonschema/QJsonFactory.h>
|
||||
|
||||
#include <utils/version.hpp>
|
||||
#include <QPair>
|
||||
|
||||
using namespace semver;
|
||||
|
||||
// Constants
|
||||
namespace {
|
||||
const char DEFAULT_VERSION[] = "2.0.0-alpha.8";
|
||||
} //End of constants
|
||||
|
||||
QJsonObject SettingsManager::schemaJson;
|
||||
|
||||
SettingsManager::SettingsManager(quint8 instance, QObject* parent, bool readonlyMode)
|
||||
SettingsManager::SettingsManager(quint8 instance, QObject* parent)
|
||||
: QObject(parent)
|
||||
, _log(Logger::getInstance("SETTINGSMGR", "I" + QString::number(instance)))
|
||||
, _instance(instance)
|
||||
, _sTable(new SettingsTable(instance, this))
|
||||
, _configVersion(DEFAULT_VERSION)
|
||||
, _previousVersion(DEFAULT_VERSION)
|
||||
, _readonlyMode(readonlyMode)
|
||||
{
|
||||
_sTable->setReadonlyMode(_readonlyMode);
|
||||
// get schema
|
||||
if (schemaJson.isEmpty())
|
||||
{
|
||||
Q_INIT_RESOURCE(resource);
|
||||
try
|
||||
{
|
||||
schemaJson = QJsonFactory::readSchema(":/hyperion-schema");
|
||||
}
|
||||
catch (const std::runtime_error& error)
|
||||
{
|
||||
throw std::runtime_error(error.what());
|
||||
}
|
||||
}
|
||||
|
||||
// get default config
|
||||
QJsonObject defaultConfig;
|
||||
if (!JsonUtils::readFile(":/hyperion_default.config", defaultConfig, _log).first)
|
||||
{
|
||||
throw std::runtime_error("Failed to read default config");
|
||||
}
|
||||
|
||||
// transform json to string lists
|
||||
const QStringList keyList = defaultConfig.keys();
|
||||
QStringList defValueList;
|
||||
for (const auto& key : keyList)
|
||||
{
|
||||
if (defaultConfig[key].isObject())
|
||||
{
|
||||
defValueList << QString(QJsonDocument(defaultConfig[key].toObject()).toJson(QJsonDocument::Compact));
|
||||
}
|
||||
else if (defaultConfig[key].isArray())
|
||||
{
|
||||
defValueList << QString(QJsonDocument(defaultConfig[key].toArray()).toJson(QJsonDocument::Compact));
|
||||
}
|
||||
}
|
||||
|
||||
// fill database with default data if required
|
||||
for (const auto& key : keyList)
|
||||
{
|
||||
QString val = defValueList.takeFirst();
|
||||
// prevent overwrite
|
||||
if (!_sTable->recordExist(key))
|
||||
{
|
||||
_sTable->createSettingsRecord(key, val);
|
||||
}
|
||||
}
|
||||
|
||||
// need to validate all data in database construct the entire data object
|
||||
// TODO refactor schemaChecker to accept QJsonArray in validate(); QJsonDocument container? To validate them per entry...
|
||||
QJsonObject dbConfig;
|
||||
for (const auto& key : keyList)
|
||||
{
|
||||
QJsonDocument doc = _sTable->getSettingsRecord(key);
|
||||
if (doc.isArray())
|
||||
{
|
||||
dbConfig[key] = doc.array();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbConfig[key] = doc.object();
|
||||
}
|
||||
}
|
||||
|
||||
//Check, if database requires migration
|
||||
bool isNewRelease = false;
|
||||
// Use instance independent SettingsManager to track migration status
|
||||
if (_instance == GLOABL_INSTANCE_ID)
|
||||
{
|
||||
if (resolveConfigVersion(dbConfig))
|
||||
{
|
||||
QJsonObject newGeneralConfig = dbConfig["general"].toObject();
|
||||
|
||||
semver::version BUILD_VERSION(HYPERION_VERSION);
|
||||
|
||||
if (!BUILD_VERSION.isValid())
|
||||
{
|
||||
Error(_log, "Current Hyperion version [%s] is invalid. Exiting...", BUILD_VERSION.getVersion().c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (_configVersion > BUILD_VERSION)
|
||||
{
|
||||
Error(_log, "Database version [%s] is greater than current Hyperion version [%s]", _configVersion.getVersion().c_str(), BUILD_VERSION.getVersion().c_str());
|
||||
// TODO: Remove version checking and Settingsmanager from components' constructor to be able to stop hyperion.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_previousVersion < BUILD_VERSION)
|
||||
{
|
||||
if (_configVersion == BUILD_VERSION)
|
||||
{
|
||||
newGeneralConfig["previousVersion"] = BUILD_VERSION.getVersion().c_str();
|
||||
dbConfig["general"] = newGeneralConfig;
|
||||
isNewRelease = true;
|
||||
Info(_log, "Migration completed to version [%s]", BUILD_VERSION.getVersion().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
Info(_log, "Migration from current version [%s] to new version [%s] started", _previousVersion.getVersion().c_str(), BUILD_VERSION.getVersion().c_str());
|
||||
|
||||
newGeneralConfig["previousVersion"] = _configVersion.getVersion().c_str();
|
||||
newGeneralConfig["configVersion"] = BUILD_VERSION.getVersion().c_str();
|
||||
dbConfig["general"] = newGeneralConfig;
|
||||
isNewRelease = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// possible data upgrade steps to prevent data loss
|
||||
bool migrated = handleConfigUpgrade(dbConfig);
|
||||
if (isNewRelease || migrated)
|
||||
{
|
||||
saveSettings(dbConfig, true);
|
||||
}
|
||||
|
||||
// validate full dbconfig against schema, on error we need to rewrite entire table
|
||||
QJsonSchemaChecker schemaChecker;
|
||||
schemaChecker.setSchema(schemaJson);
|
||||
QPair<bool, bool> valid = schemaChecker.validate(dbConfig);
|
||||
// check if our main schema syntax is IO
|
||||
if (!valid.second)
|
||||
{
|
||||
for (auto& schemaError : schemaChecker.getMessages())
|
||||
{
|
||||
Error(_log, "Schema Syntax Error: %s", QSTRING_CSTR(schemaError));
|
||||
}
|
||||
throw std::runtime_error("The config schema has invalid syntax. This should never happen! Go fix it!");
|
||||
}
|
||||
if (!valid.first)
|
||||
{
|
||||
Info(_log, "Table upgrade required...");
|
||||
dbConfig = schemaChecker.getAutoCorrectedConfig(dbConfig);
|
||||
|
||||
for (auto& schemaError : schemaChecker.getMessages())
|
||||
{
|
||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||
}
|
||||
|
||||
saveSettings(dbConfig, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_qconfig = dbConfig;
|
||||
}
|
||||
|
||||
Debug(_log, "Settings database initialized");
|
||||
_sTable->addMissingDefaults();
|
||||
}
|
||||
|
||||
QJsonDocument SettingsManager::getSetting(settings::type type) const
|
||||
{
|
||||
return _sTable->getSettingsRecord(settings::typeToString(type));
|
||||
return getSetting(settings::typeToString(type));
|
||||
}
|
||||
|
||||
QJsonObject SettingsManager::getSettings() const
|
||||
QJsonDocument SettingsManager::getSetting(const QString& type) const
|
||||
{
|
||||
QJsonObject config;
|
||||
for (const auto& key : _qconfig.keys())
|
||||
{
|
||||
//Read all records from database to ensure that global settings are read across instances
|
||||
QJsonDocument doc = _sTable->getSettingsRecord(key);
|
||||
if (doc.isArray())
|
||||
{
|
||||
config.insert(key, doc.array());
|
||||
}
|
||||
else
|
||||
{
|
||||
config.insert(key, doc.object());
|
||||
}
|
||||
}
|
||||
return config;
|
||||
return _sTable->getSettingsRecord(type);
|
||||
}
|
||||
|
||||
bool SettingsManager::restoreSettings(QJsonObject config, bool correct)
|
||||
QJsonObject SettingsManager::getSettings(const QStringList& filteredTypes ) const
|
||||
{
|
||||
// optional data upgrades e.g. imported legacy/older configs
|
||||
handleConfigUpgrade(config);
|
||||
return saveSettings(config, correct);
|
||||
return _sTable->getSettings(filteredTypes);
|
||||
}
|
||||
|
||||
bool SettingsManager::saveSettings(QJsonObject config, bool correct)
|
||||
QJsonObject SettingsManager::getSettings(const QVariant& instance, const QStringList& filteredTypes ) const
|
||||
{
|
||||
// we need to validate data against schema
|
||||
QJsonSchemaChecker schemaChecker;
|
||||
schemaChecker.setSchema(schemaJson);
|
||||
if (!schemaChecker.validate(config).first)
|
||||
return _sTable->getSettings(instance, filteredTypes);
|
||||
}
|
||||
|
||||
QPair<bool, QStringList> SettingsManager::saveSettings(const QJsonObject& config)
|
||||
{
|
||||
QStringList errorList;
|
||||
for (auto &key : config.keys())
|
||||
{
|
||||
if (!correct)
|
||||
{
|
||||
Error(_log, "Failed to save configuration, errors during validation");
|
||||
return false;
|
||||
}
|
||||
Warning(_log, "Fixing json data!");
|
||||
config = schemaChecker.getAutoCorrectedConfig(config);
|
||||
|
||||
for (const auto& schemaError : schemaChecker.getMessages())
|
||||
{
|
||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||
}
|
||||
}
|
||||
|
||||
// store the new config
|
||||
_qconfig = config;
|
||||
|
||||
// extract keys and data
|
||||
const QStringList keyList = config.keys();
|
||||
QStringList newValueList;
|
||||
for (const auto& key : keyList)
|
||||
{
|
||||
if (config[key].isObject())
|
||||
{
|
||||
newValueList << QString(QJsonDocument(config[key].toObject()).toJson(QJsonDocument::Compact));
|
||||
}
|
||||
else if (config[key].isArray())
|
||||
{
|
||||
newValueList << QString(QJsonDocument(config[key].toArray()).toJson(QJsonDocument::Compact));
|
||||
}
|
||||
}
|
||||
|
||||
bool rc = true;
|
||||
// compare database data with new data to emit/save changes accordingly
|
||||
for (const auto& key : keyList)
|
||||
{
|
||||
QString data = newValueList.takeFirst();
|
||||
const QJsonValue configItem = config.value(key);
|
||||
const QString data = JsonUtils::jsonValueToQString(configItem);
|
||||
if (_sTable->getSettingsRecordString(key) != data)
|
||||
{
|
||||
if (!_sTable->createSettingsRecord(key, data))
|
||||
{
|
||||
rc = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QJsonParseError error;
|
||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(data.toUtf8(), &error);
|
||||
if (error.error != QJsonParseError::NoError) {
|
||||
Error(_log, "Error parsing JSON: %s", QSTRING_CSTR(error.errorString()));
|
||||
rc = false;
|
||||
}
|
||||
else {
|
||||
emit settingsChanged(settings::stringToType(key), jsonDocument);
|
||||
}
|
||||
errorList.append(QString("Failed to save configuration item: %1").arg(key));
|
||||
return qMakePair (false, errorList);
|
||||
}
|
||||
emit settingsChanged(settings::stringToType(key), QJsonDocument::fromVariant(configItem.toVariant()));
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
inline QString fixVersion(const QString& version)
|
||||
{
|
||||
QString newVersion;
|
||||
//Try fixing version number, remove dot separated pre-release identifiers not supported
|
||||
QRegularExpression regEx("(\\d+\\.\\d+\\.\\d+-?[a-zA-Z-\\d]*\\.?[\\d]*)", QRegularExpression::CaseInsensitiveOption | QRegularExpression::MultilineOption);
|
||||
QRegularExpressionMatch match;
|
||||
|
||||
match = regEx.match(version);
|
||||
if (match.hasMatch())
|
||||
{
|
||||
newVersion = match.captured(1);
|
||||
}
|
||||
return newVersion;
|
||||
}
|
||||
|
||||
bool SettingsManager::resolveConfigVersion(QJsonObject& config)
|
||||
{
|
||||
bool isValid = false;
|
||||
if (config.contains("general"))
|
||||
{
|
||||
QJsonObject generalConfig = config["general"].toObject();
|
||||
QString configVersion = generalConfig["configVersion"].toString();
|
||||
QString previousVersion = generalConfig["previousVersion"].toString();
|
||||
|
||||
if (!configVersion.isEmpty())
|
||||
{
|
||||
isValid = _configVersion.setVersion(configVersion.toStdString());
|
||||
if (!isValid)
|
||||
{
|
||||
isValid = _configVersion.setVersion(fixVersion(configVersion).toStdString());
|
||||
if (isValid)
|
||||
{
|
||||
Info(_log, "Invalid config version [%s] fixed. Updated to [%s]", QSTRING_CSTR(configVersion), _configVersion.getVersion().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isValid = true;
|
||||
}
|
||||
|
||||
if (!previousVersion.isEmpty() && isValid)
|
||||
{
|
||||
isValid = _previousVersion.setVersion(previousVersion.toStdString());
|
||||
if (!isValid)
|
||||
{
|
||||
isValid = _previousVersion.setVersion(fixVersion(previousVersion).toStdString());
|
||||
if (isValid)
|
||||
{
|
||||
Info(_log, "Invalid previous version [%s] fixed. Updated to [%s]", QSTRING_CSTR(previousVersion), _previousVersion.getVersion().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_previousVersion.setVersion(DEFAULT_VERSION);
|
||||
isValid = true;
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
}
|
||||
|
||||
bool SettingsManager::handleConfigUpgrade(QJsonObject& config)
|
||||
{
|
||||
bool migrated = false;
|
||||
|
||||
//Only migrate, if valid versions are available
|
||||
if (!resolveConfigVersion(config))
|
||||
{
|
||||
Warning(_log, "Invalid version information found in configuration. No database migration executed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
//Do only migrate, if configuration is not up to date
|
||||
if (_previousVersion < _configVersion)
|
||||
{
|
||||
//Migration steps for versions <= alpha 9
|
||||
semver::version targetVersion{ "2.0.0-alpha.9" };
|
||||
if (_previousVersion <= targetVersion)
|
||||
{
|
||||
Info(_log, "Instance [%u]: Migrate from version [%s] to version [%s] or later", _instance, _previousVersion.getVersion().c_str(), targetVersion.getVersion().c_str());
|
||||
|
||||
// LED LAYOUT UPGRADE
|
||||
// from { hscan: { minimum: 0.2, maximum: 0.3 }, vscan: { minimum: 0.2, maximum: 0.3 } }
|
||||
// from { h: { min: 0.2, max: 0.3 }, v: { min: 0.2, max: 0.3 } }
|
||||
// to { hmin: 0.2, hmax: 0.3, vmin: 0.2, vmax: 0.3}
|
||||
if (config.contains("leds"))
|
||||
{
|
||||
const QJsonArray ledarr = config["leds"].toArray();
|
||||
const QJsonObject led = ledarr[0].toObject();
|
||||
|
||||
if (led.contains("hscan") || led.contains("h"))
|
||||
{
|
||||
const bool whscan = led.contains("hscan");
|
||||
QJsonArray newLedarr;
|
||||
|
||||
for (const auto& entry : ledarr)
|
||||
{
|
||||
const QJsonObject led = entry.toObject();
|
||||
QJsonObject hscan;
|
||||
QJsonObject vscan;
|
||||
QJsonValue hmin;
|
||||
QJsonValue hmax;
|
||||
QJsonValue vmin;
|
||||
QJsonValue vmax;
|
||||
QJsonObject nL;
|
||||
|
||||
if (whscan)
|
||||
{
|
||||
hscan = led["hscan"].toObject();
|
||||
vscan = led["vscan"].toObject();
|
||||
hmin = hscan["minimum"];
|
||||
hmax = hscan["maximum"];
|
||||
vmin = vscan["minimum"];
|
||||
vmax = vscan["maximum"];
|
||||
}
|
||||
else
|
||||
{
|
||||
hscan = led["h"].toObject();
|
||||
vscan = led["v"].toObject();
|
||||
hmin = hscan["min"];
|
||||
hmax = hscan["max"];
|
||||
vmin = vscan["min"];
|
||||
vmax = vscan["max"];
|
||||
}
|
||||
// append to led object
|
||||
nL["hmin"] = hmin;
|
||||
nL["hmax"] = hmax;
|
||||
nL["vmin"] = vmin;
|
||||
nL["vmax"] = vmax;
|
||||
newLedarr.append(nL);
|
||||
}
|
||||
// replace
|
||||
config["leds"] = newLedarr;
|
||||
migrated = true;
|
||||
Info(_log, "Instance [%u]: LED Layout migrated", _instance);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("ledConfig"))
|
||||
{
|
||||
QJsonObject oldLedConfig = config["ledConfig"].toObject();
|
||||
if (!oldLedConfig.contains("classic"))
|
||||
{
|
||||
QJsonObject newLedConfig;
|
||||
newLedConfig.insert("classic", oldLedConfig);
|
||||
QJsonObject defaultMatrixConfig{ {"ledshoriz", 1}
|
||||
,{"ledsvert", 1}
|
||||
,{"cabling","snake"}
|
||||
,{"start","top-left"}
|
||||
};
|
||||
newLedConfig.insert("matrix", defaultMatrixConfig);
|
||||
|
||||
config["ledConfig"] = newLedConfig;
|
||||
migrated = true;
|
||||
Info(_log, "Instance [%u]: LED-Config migrated", _instance);
|
||||
}
|
||||
}
|
||||
|
||||
// LED Hardware count is leading for versions after alpha 9
|
||||
// Setting Hardware LED count to number of LEDs configured via layout, if layout number is greater than number of hardware LEDs
|
||||
if (config.contains("device"))
|
||||
{
|
||||
QJsonObject newDeviceConfig = config["device"].toObject();
|
||||
|
||||
if (newDeviceConfig.contains("hardwareLedCount"))
|
||||
{
|
||||
int hwLedcount = newDeviceConfig["hardwareLedCount"].toInt();
|
||||
if (config.contains("leds"))
|
||||
{
|
||||
const QJsonArray ledarr = config["leds"].toArray();
|
||||
int layoutLedCount = ledarr.size();
|
||||
|
||||
if (hwLedcount < layoutLedCount)
|
||||
{
|
||||
Warning(_log, "Instance [%u]: HwLedCount/Layout mismatch! Setting Hardware LED count to number of LEDs configured via layout", _instance);
|
||||
hwLedcount = layoutLedCount;
|
||||
newDeviceConfig["hardwareLedCount"] = hwLedcount;
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (newDeviceConfig.contains("type"))
|
||||
{
|
||||
QString type = newDeviceConfig["type"].toString();
|
||||
if (type == "atmoorb" || type == "fadecandy" || type == "philipshue")
|
||||
{
|
||||
if (newDeviceConfig.contains("output"))
|
||||
{
|
||||
newDeviceConfig["host"] = newDeviceConfig["output"].toString();
|
||||
newDeviceConfig.remove("output");
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("grabberV4L2"))
|
||||
{
|
||||
QJsonObject newGrabberV4L2Config = config["grabberV4L2"].toObject();
|
||||
|
||||
if (newGrabberV4L2Config.contains("encoding_format"))
|
||||
{
|
||||
newGrabberV4L2Config.remove("encoding_format");
|
||||
newGrabberV4L2Config["grabberV4L2"] = newGrabberV4L2Config;
|
||||
migrated = true;
|
||||
}
|
||||
|
||||
//Add new element enable
|
||||
if (!newGrabberV4L2Config.contains("enable"))
|
||||
{
|
||||
newGrabberV4L2Config["enable"] = false;
|
||||
migrated = true;
|
||||
}
|
||||
config["grabberV4L2"] = newGrabberV4L2Config;
|
||||
Debug(_log, "GrabberV4L2 records migrated");
|
||||
}
|
||||
|
||||
if (config.contains("grabberAudio"))
|
||||
{
|
||||
QJsonObject newGrabberAudioConfig = config["grabberAudio"].toObject();
|
||||
|
||||
//Add new element enable
|
||||
if (!newGrabberAudioConfig.contains("enable"))
|
||||
{
|
||||
newGrabberAudioConfig["enable"] = false;
|
||||
migrated = true;
|
||||
}
|
||||
config["grabberAudio"] = newGrabberAudioConfig;
|
||||
Debug(_log, "GrabberAudio records migrated");
|
||||
}
|
||||
|
||||
if (config.contains("framegrabber"))
|
||||
{
|
||||
QJsonObject newFramegrabberConfig = config["framegrabber"].toObject();
|
||||
|
||||
//Align element namings with grabberV4L2
|
||||
//Rename element type -> device
|
||||
if (newFramegrabberConfig.contains("type"))
|
||||
{
|
||||
newFramegrabberConfig["device"] = newFramegrabberConfig["type"].toString();
|
||||
newFramegrabberConfig.remove("type");
|
||||
migrated = true;
|
||||
}
|
||||
//Rename element frequency_Hz -> fps
|
||||
if (newFramegrabberConfig.contains("frequency_Hz"))
|
||||
{
|
||||
newFramegrabberConfig["fps"] = newFramegrabberConfig["frequency_Hz"].toInt(25);
|
||||
newFramegrabberConfig.remove("frequency_Hz");
|
||||
migrated = true;
|
||||
}
|
||||
|
||||
//Rename element display -> input
|
||||
if (newFramegrabberConfig.contains("display"))
|
||||
{
|
||||
newFramegrabberConfig["input"] = newFramegrabberConfig["display"];
|
||||
newFramegrabberConfig.remove("display");
|
||||
migrated = true;
|
||||
}
|
||||
|
||||
//Add new element enable
|
||||
if (!newFramegrabberConfig.contains("enable"))
|
||||
{
|
||||
newFramegrabberConfig["enable"] = false;
|
||||
migrated = true;
|
||||
}
|
||||
|
||||
config["framegrabber"] = newFramegrabberConfig;
|
||||
Debug(_log, "Framegrabber records migrated");
|
||||
}
|
||||
}
|
||||
|
||||
//Migration steps for versions <= 2.0.12
|
||||
_previousVersion = targetVersion;
|
||||
targetVersion.setVersion("2.0.12");
|
||||
if (_previousVersion <= targetVersion)
|
||||
{
|
||||
Info(_log, "Instance [%u]: Migrate from version [%s] to version [%s] or later", _instance, _previousVersion.getVersion().c_str(), targetVersion.getVersion().c_str());
|
||||
|
||||
// Have Hostname/IP-address separate from port for LED-Devices
|
||||
if (config.contains("device"))
|
||||
{
|
||||
QJsonObject newDeviceConfig = config["device"].toObject();
|
||||
|
||||
if (newDeviceConfig.contains("host"))
|
||||
{
|
||||
QString oldHost = newDeviceConfig["host"].toString();
|
||||
|
||||
// Resolve hostname and port
|
||||
QStringList addressparts = QStringUtils::split(oldHost, ":", QStringUtils::SplitBehavior::SkipEmptyParts);
|
||||
|
||||
newDeviceConfig["host"] = addressparts[0];
|
||||
|
||||
if (addressparts.size() > 1)
|
||||
{
|
||||
if (!newDeviceConfig.contains("port"))
|
||||
{
|
||||
newDeviceConfig["port"] = addressparts[1].toInt();
|
||||
}
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (newDeviceConfig.contains("type"))
|
||||
{
|
||||
QString type = newDeviceConfig["type"].toString();
|
||||
if (type == "apa102")
|
||||
{
|
||||
if (newDeviceConfig.contains("colorOrder"))
|
||||
{
|
||||
QString colorOrder = newDeviceConfig["colorOrder"].toString();
|
||||
if (colorOrder == "bgr")
|
||||
{
|
||||
newDeviceConfig["colorOrder"] = "rgb";
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
}
|
||||
}
|
||||
|
||||
// Have Hostname/IP-address separate from port for Forwarder
|
||||
if (config.contains("forwarder"))
|
||||
{
|
||||
QJsonObject newForwarderConfig = config["forwarder"].toObject();
|
||||
|
||||
QJsonArray json;
|
||||
if (newForwarderConfig.contains("json"))
|
||||
{
|
||||
const QJsonArray oldJson = newForwarderConfig["json"].toArray();
|
||||
QJsonObject newJsonConfig;
|
||||
|
||||
for (const QJsonValue& value : oldJson)
|
||||
{
|
||||
if (value.isString())
|
||||
{
|
||||
QString oldHost = value.toString();
|
||||
// Resolve hostname and port
|
||||
QStringList addressparts = QStringUtils::split(oldHost, ":", QStringUtils::SplitBehavior::SkipEmptyParts);
|
||||
QString host = addressparts[0];
|
||||
|
||||
if (host != "127.0.0.1")
|
||||
{
|
||||
newJsonConfig["host"] = host;
|
||||
|
||||
if (addressparts.size() > 1)
|
||||
{
|
||||
newJsonConfig["port"] = addressparts[1].toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
newJsonConfig["port"] = 19444;
|
||||
}
|
||||
newJsonConfig["name"] = host;
|
||||
|
||||
json.append(newJsonConfig);
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!json.isEmpty())
|
||||
{
|
||||
newForwarderConfig["jsonapi"] = json;
|
||||
}
|
||||
newForwarderConfig.remove("json");
|
||||
migrated = true;
|
||||
}
|
||||
|
||||
QJsonArray flatbuffer;
|
||||
if (newForwarderConfig.contains("flat"))
|
||||
{
|
||||
const QJsonArray oldFlatbuffer = newForwarderConfig["flat"].toArray();
|
||||
QJsonObject newFlattbufferConfig;
|
||||
|
||||
for (const QJsonValue& value : oldFlatbuffer)
|
||||
{
|
||||
if (value.isString())
|
||||
{
|
||||
QString oldHost = value.toString();
|
||||
// Resolve hostname and port
|
||||
QStringList addressparts = QStringUtils::split(oldHost, ":", QStringUtils::SplitBehavior::SkipEmptyParts);
|
||||
QString host = addressparts[0];
|
||||
|
||||
if (host != "127.0.0.1")
|
||||
{
|
||||
newFlattbufferConfig["host"] = host;
|
||||
|
||||
if (addressparts.size() > 1)
|
||||
{
|
||||
newFlattbufferConfig["port"] = addressparts[1].toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
newFlattbufferConfig["port"] = 19400;
|
||||
}
|
||||
newFlattbufferConfig["name"] = host;
|
||||
|
||||
flatbuffer.append(newFlattbufferConfig);
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!flatbuffer.isEmpty())
|
||||
{
|
||||
newForwarderConfig["flatbuffer"] = flatbuffer;
|
||||
}
|
||||
newForwarderConfig.remove("flat");
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (json.isEmpty() && flatbuffer.isEmpty())
|
||||
{
|
||||
newForwarderConfig["enable"] = false;
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["forwarder"] = newForwarderConfig;
|
||||
Debug(_log, "Forwarder records migrated");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Migration steps for versions <= 2.0.13
|
||||
_previousVersion = targetVersion;
|
||||
targetVersion.setVersion("2.0.13");
|
||||
if (_previousVersion <= targetVersion)
|
||||
{
|
||||
Info(_log, "Instance [%u]: Migrate from version [%s] to version [%s] or later", _instance, _previousVersion.getVersion().c_str(), targetVersion.getVersion().c_str());
|
||||
|
||||
|
||||
// Have Hostname/IP-address separate from port for LED-Devices
|
||||
if (config.contains("device"))
|
||||
{
|
||||
QJsonObject newDeviceConfig = config["device"].toObject();
|
||||
|
||||
if (newDeviceConfig.contains("type"))
|
||||
{
|
||||
QString type = newDeviceConfig["type"].toString();
|
||||
|
||||
const QStringList serialDevices{ "adalight", "dmx", "atmo", "sedu", "tpm2", "karate" };
|
||||
if (serialDevices.contains(type))
|
||||
{
|
||||
if (!newDeviceConfig.contains("rateList"))
|
||||
{
|
||||
newDeviceConfig["rateList"] = "CUSTOM";
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == "adalight")
|
||||
{
|
||||
if (newDeviceConfig.contains("lightberry_apa102_mode"))
|
||||
{
|
||||
bool lightberry_apa102_mode = newDeviceConfig["lightberry_apa102_mode"].toBool();
|
||||
if (lightberry_apa102_mode)
|
||||
{
|
||||
newDeviceConfig["streamProtocol"] = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
newDeviceConfig["streamProtocol"] = "0";
|
||||
}
|
||||
newDeviceConfig.remove("lightberry_apa102_mode");
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Migration steps for versions <= 2.0.16
|
||||
_previousVersion = targetVersion;
|
||||
targetVersion.setVersion("2.0.16");
|
||||
if (_previousVersion <= targetVersion)
|
||||
{
|
||||
Info(_log, "Instance [%u]: Migrate from version [%s] to version [%s] or later", _instance, _previousVersion.getVersion().c_str(), targetVersion.getVersion().c_str());
|
||||
|
||||
// Have Hostname/IP-address separate from port for LED-Devices
|
||||
if (config.contains("device"))
|
||||
{
|
||||
QJsonObject newDeviceConfig = config["device"].toObject();
|
||||
|
||||
if (newDeviceConfig.contains("type"))
|
||||
{
|
||||
QString type = newDeviceConfig["type"].toString();
|
||||
|
||||
if (type == "philipshue")
|
||||
{
|
||||
if (newDeviceConfig.contains("groupId"))
|
||||
{
|
||||
if (newDeviceConfig["groupId"].isDouble())
|
||||
{
|
||||
int groupID = newDeviceConfig["groupId"].toInt();
|
||||
newDeviceConfig["groupId"] = QString::number(groupID);
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (newDeviceConfig.contains("lightIds"))
|
||||
{
|
||||
QJsonArray lightIds = newDeviceConfig.value("lightIds").toArray();
|
||||
// Iterate through the JSON array and update integer values to strings
|
||||
for (int i = 0; i < lightIds.size(); ++i) {
|
||||
QJsonValue value = lightIds.at(i);
|
||||
if (value.isDouble())
|
||||
{
|
||||
int lightId = value.toInt();
|
||||
lightIds.replace(i, QString::number(lightId));
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
newDeviceConfig["lightIds"] = lightIds;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (type == "nanoleaf")
|
||||
{
|
||||
if (newDeviceConfig.contains("panelStartPos"))
|
||||
{
|
||||
newDeviceConfig.remove("panelStartPos");
|
||||
migrated = true;
|
||||
}
|
||||
|
||||
if (newDeviceConfig.contains("panelOrderTopDown"))
|
||||
{
|
||||
int panelOrderTopDown;
|
||||
if (newDeviceConfig["panelOrderTopDown"].isDouble())
|
||||
{
|
||||
panelOrderTopDown = newDeviceConfig["panelOrderTopDown"].toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
panelOrderTopDown = newDeviceConfig["panelOrderTopDown"].toString().toInt();
|
||||
}
|
||||
|
||||
newDeviceConfig.remove("panelOrderTopDown");
|
||||
if (panelOrderTopDown == 0)
|
||||
{
|
||||
newDeviceConfig["panelOrderTopDown"] = "top2down";
|
||||
migrated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (panelOrderTopDown == 1)
|
||||
{
|
||||
newDeviceConfig["panelOrderTopDown"] = "bottom2up";
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (newDeviceConfig.contains("panelOrderLeftRight"))
|
||||
{
|
||||
int panelOrderLeftRight;
|
||||
if (newDeviceConfig["panelOrderLeftRight"].isDouble())
|
||||
{
|
||||
panelOrderLeftRight = newDeviceConfig["panelOrderLeftRight"].toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
panelOrderLeftRight = newDeviceConfig["panelOrderLeftRight"].toString().toInt();
|
||||
}
|
||||
|
||||
newDeviceConfig.remove("panelOrderLeftRight");
|
||||
if (panelOrderLeftRight == 0)
|
||||
{
|
||||
newDeviceConfig["panelOrderLeftRight"] = "left2right";
|
||||
migrated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (panelOrderLeftRight == 1)
|
||||
{
|
||||
newDeviceConfig["panelOrderLeftRight"] = "right2left";
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("cecEvents"))
|
||||
{
|
||||
bool isCECEnabled {false};
|
||||
if (config.contains("grabberV4L2"))
|
||||
{
|
||||
QJsonObject newGrabberV4L2Config = config["grabberV4L2"].toObject();
|
||||
if (newGrabberV4L2Config.contains("cecDetection"))
|
||||
{
|
||||
isCECEnabled = newGrabberV4L2Config.value("cecDetection").toBool(false);
|
||||
newGrabberV4L2Config.remove("cecDetection");
|
||||
config["grabberV4L2"] = newGrabberV4L2Config;
|
||||
|
||||
QJsonObject newGCecEventsConfig = config["cecEvents"].toObject();
|
||||
newGCecEventsConfig["enable"] = isCECEnabled;
|
||||
if (!newGCecEventsConfig.contains("actions"))
|
||||
{
|
||||
QJsonObject action1
|
||||
{
|
||||
{"action", "Suspend"},
|
||||
{"event", "standby"}
|
||||
};
|
||||
QJsonObject action2
|
||||
{
|
||||
{"action", "Resume"},
|
||||
{"event", "set stream path"}
|
||||
};
|
||||
|
||||
QJsonArray actions { action1, action2 };
|
||||
newGCecEventsConfig.insert("actions",actions);
|
||||
}
|
||||
config["cecEvents"] = newGCecEventsConfig;
|
||||
|
||||
migrated = true;
|
||||
Debug(_log, "CEC configuration records migrated");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return migrated;
|
||||
return qMakePair (true, errorList );
|
||||
}
|
||||
|
@@ -1,108 +0,0 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"properties" :
|
||||
{
|
||||
"general" :
|
||||
{
|
||||
"$ref": "schema-general.json"
|
||||
},
|
||||
"logger" :
|
||||
{
|
||||
"$ref": "schema-logger.json"
|
||||
},
|
||||
"device" :
|
||||
{
|
||||
"$ref": "schema-device.json"
|
||||
},
|
||||
"color" :
|
||||
{
|
||||
"$ref": "schema-color.json"
|
||||
},
|
||||
"smoothing":
|
||||
{
|
||||
"$ref": "schema-smoothing.json"
|
||||
},
|
||||
"grabberV4L2" :
|
||||
{
|
||||
"$ref": "schema-grabberV4L2.json"
|
||||
},
|
||||
"grabberAudio" :
|
||||
{
|
||||
"$ref": "schema-grabberAudio.json"
|
||||
},
|
||||
"framegrabber" :
|
||||
{
|
||||
"$ref": "schema-framegrabber.json"
|
||||
},
|
||||
"blackborderdetector" :
|
||||
{
|
||||
"$ref": "schema-blackborderdetector.json"
|
||||
},
|
||||
"foregroundEffect" :
|
||||
{
|
||||
"$ref": "schema-foregroundEffect.json"
|
||||
},
|
||||
"backgroundEffect" :
|
||||
{
|
||||
"$ref": "schema-backgroundEffect.json"
|
||||
},
|
||||
"forwarder" :
|
||||
{
|
||||
"$ref": "schema-forwarder.json"
|
||||
},
|
||||
"jsonServer" :
|
||||
{
|
||||
"$ref": "schema-jsonServer.json"
|
||||
},
|
||||
"flatbufServer":
|
||||
{
|
||||
"$ref": "schema-flatbufServer.json"
|
||||
},
|
||||
"protoServer" :
|
||||
{
|
||||
"$ref": "schema-protoServer.json"
|
||||
},
|
||||
"boblightServer" :
|
||||
{
|
||||
"$ref": "schema-boblightServer.json"
|
||||
},
|
||||
"webConfig" :
|
||||
{
|
||||
"$ref": "schema-webConfig.json"
|
||||
},
|
||||
"effects" :
|
||||
{
|
||||
"$ref": "schema-effects.json"
|
||||
},
|
||||
"instCapture":
|
||||
{
|
||||
"$ref": "schema-instCapture.json"
|
||||
},
|
||||
"network":
|
||||
{
|
||||
"$ref": "schema-network.json"
|
||||
},
|
||||
"ledConfig":
|
||||
{
|
||||
"$ref": "schema-ledConfig.json"
|
||||
},
|
||||
"leds":
|
||||
{
|
||||
"$ref": "schema-leds.json"
|
||||
},
|
||||
"osEvents":
|
||||
{
|
||||
"$ref": "schema-osEvents.json"
|
||||
},
|
||||
"cecEvents":
|
||||
{
|
||||
"$ref": "schema-cecEvents.json"
|
||||
},
|
||||
"schedEvents":
|
||||
{
|
||||
"$ref": "schema-schedEvents.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
}
|
@@ -1,31 +1,39 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="hyperion-schema">hyperion.schema.json</file>
|
||||
<file alias="schema-general.json">schema/schema-general.json</file>
|
||||
<file alias="schema-logger.json">schema/schema-logger.json</file>
|
||||
<file alias="schema-device.json">schema/schema-device.json</file>
|
||||
<file alias="schema-color.json">schema/schema-color.json</file>
|
||||
<file alias="schema-smoothing.json">schema/schema-smoothing.json</file>
|
||||
<file alias="schema-grabberV4L2.json">schema/schema-grabberV4L2.json</file>
|
||||
<file alias="schema-grabberAudio.json">schema/schema-grabberAudio.json</file>
|
||||
<file alias="schema-framegrabber.json">schema/schema-framegrabber.json</file>
|
||||
<file alias="schema-blackborderdetector.json">schema/schema-blackborderdetector.json</file>
|
||||
<file alias="schema-foregroundEffect.json">schema/schema-foregroundEffect.json</file>
|
||||
<file alias="schema-backgroundEffect.json">schema/schema-backgroundEffect.json</file>
|
||||
<file alias="schema-forwarder.json">schema/schema-forwarder.json</file>
|
||||
<file alias="schema-jsonServer.json">schema/schema-jsonServer.json</file>
|
||||
<file alias="schema-flatbufServer.json">schema/schema-flatbufServer.json</file>
|
||||
<file alias="schema-protoServer.json">schema/schema-protoServer.json</file>
|
||||
<file alias="schema-blackborderdetector.json">schema/schema-blackborderdetector.json</file>
|
||||
<file alias="schema-boblightServer.json">schema/schema-boblightServer.json</file>
|
||||
<file alias="schema-webConfig.json">schema/schema-webConfig.json</file>
|
||||
<file alias="schema-cecEvents.json">schema/schema-cecEvents.json</file>
|
||||
<file alias="schema-color.json">schema/schema-color.json</file>
|
||||
<file alias="schema-device.json">schema/schema-device.json</file>
|
||||
<file alias="schema-effects.json">schema/schema-effects.json</file>
|
||||
<file alias="schema-eventActions.json">schema/schema-eventActions.json</file>
|
||||
<file alias="schema-flatbufServer.json">schema/schema-flatbufServer.json</file>
|
||||
<file alias="schema-forwarder.json">schema/schema-forwarder.json</file>
|
||||
<file alias="schema-framegrabber.json">schema/schema-framegrabber.json</file>
|
||||
<file alias="schema-foregroundEffect.json">schema/schema-foregroundEffect.json</file>
|
||||
<file alias="schema-general.json">schema/schema-general.json</file>
|
||||
<file alias="schema-grabberAudio.json">schema/schema-grabberAudio.json</file>
|
||||
<file alias="schema-grabberV4L2.json">schema/schema-grabberV4L2.json</file>
|
||||
<file alias="schema-instCapture.json">schema/schema-instCapture.json</file>
|
||||
<file alias="schema-jsonServer.json">schema/schema-jsonServer.json</file>
|
||||
<file alias="schema-ledConfig.json">schema/schema-ledConfig.json</file>
|
||||
<file alias="schema-leds.json">schema/schema-leds.json</file>
|
||||
<file alias="schema-instCapture.json">schema/schema-instCapture.json</file>
|
||||
<file alias="schema-logger.json">schema/schema-logger.json</file>
|
||||
<file alias="schema-network.json">schema/schema-network.json</file>
|
||||
<file alias="schema-eventActions.json">schema/schema-eventActions.json</file>
|
||||
<file alias="schema-schedEvents.json">schema/schema-schedEvents.json</file>
|
||||
<file alias="schema-osEvents.json">schema/schema-osEvents.json</file>
|
||||
<file alias="schema-cecEvents.json">schema/schema-cecEvents.json</file>
|
||||
<file alias="schema-protoServer.json">schema/schema-protoServer.json</file>
|
||||
<file alias="schema-schedEvents.json">schema/schema-schedEvents.json</file>
|
||||
<file alias="schema-smoothing.json">schema/schema-smoothing.json</file>
|
||||
<file alias="schema-webConfig.json">schema/schema-webConfig.json</file>
|
||||
|
||||
<file alias="schema-settings-default.json">schema/schema-settings-default.json</file>
|
||||
<file alias="schema-settings-full.json">schema/schema-settings-full.json</file>
|
||||
<file alias="schema-settings-full-relaxed.json">schema/schema-settings-full-relaxed.json</file>
|
||||
<file alias="schema-settings-global.json">schema/schema-settings-global.json</file>
|
||||
<file alias="schema-settings-global-relaxed.json">schema/schema-settings-global-relaxed.json</file>
|
||||
<file alias="schema-settings-instance.json">schema/schema-settings-instance.json</file>
|
||||
<file alias="schema-settings-instance-relaxed.json">schema/schema-settings-instance-relaxed.json</file>
|
||||
<file alias="schema-settings-ui.json">schema/schema-settings-ui.json</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"enable": {
|
||||
"type": "boolean",
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"type":"object",
|
||||
"title" : "edt_conf_color_heading_title",
|
||||
"required" : true,
|
||||
"properties":
|
||||
{
|
||||
"imageToLedMappingType" :
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_fbs_heading_title",
|
||||
"properties" :
|
||||
{
|
||||
|
@@ -7,6 +7,7 @@
|
||||
{
|
||||
"type" : "boolean",
|
||||
"title" : "edt_conf_general_enable_title",
|
||||
"required" : true,
|
||||
"default" : true,
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"type": "object",
|
||||
"title": "edt_conf_fw_heading_title",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"enable": {
|
||||
"type": "boolean",
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"title" : "edt_conf_gen_heading_title",
|
||||
"required" : true,
|
||||
"properties" :
|
||||
{
|
||||
"name" :
|
||||
@@ -44,15 +43,6 @@
|
||||
},
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"previousVersion" :
|
||||
{
|
||||
"type" : "string",
|
||||
"options" : {
|
||||
"hidden":true
|
||||
},
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"title": "edt_conf_audio_heading_title",
|
||||
"properties": {
|
||||
"enable": {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_v4l2_heading_title",
|
||||
"properties":
|
||||
{
|
||||
@@ -24,6 +23,7 @@
|
||||
"device": {
|
||||
"type": "string",
|
||||
"title": "edt_conf_enum_custom",
|
||||
"default": "none",
|
||||
"options": {
|
||||
"hidden": true
|
||||
},
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_instC_heading_title",
|
||||
"properties": {
|
||||
"systemEnable": {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_js_heading_title",
|
||||
"properties" :
|
||||
{
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type": "array",
|
||||
"required": true,
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
@@ -61,4 +60,4 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@
|
||||
"level" :
|
||||
{
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"enum" : ["silent", "warn", "verbose", "debug"],
|
||||
"title" : "edt_conf_log_level_title",
|
||||
"options" : {
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"title" : "edt_conf_net_heading_title",
|
||||
"required" : true,
|
||||
"properties" :
|
||||
{
|
||||
"internetAccessAPI" :
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_os_events_heading_title",
|
||||
"properties": {
|
||||
"suspendEnable": {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_pbs_heading_title",
|
||||
"properties" :
|
||||
{
|
||||
|
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"enable": {
|
||||
"type": "boolean",
|
||||
|
17
libsrc/hyperion/schema/schema-settings-default.json
Normal file
17
libsrc/hyperion/schema/schema-settings-default.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"global":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"$ref":"schema-settings-global.json"
|
||||
},
|
||||
"instance":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"$ref":"schema-settings-instance.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties":false
|
||||
}
|
59
libsrc/hyperion/schema/schema-settings-full-relaxed.json
Normal file
59
libsrc/hyperion/schema/schema-settings-full-relaxed.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"global":{
|
||||
"type":"object",
|
||||
"required":false,
|
||||
"properties":{
|
||||
"settings":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"$ref":"schema-settings-global-relaxed.json"
|
||||
},
|
||||
"uuid":{
|
||||
"type":"string",
|
||||
"format":"uuid",
|
||||
"required":false
|
||||
}
|
||||
},
|
||||
"additionalProperties":false
|
||||
},
|
||||
"instanceIds":{
|
||||
"type":"array",
|
||||
"required":false,
|
||||
"items":{
|
||||
"type":"integer"
|
||||
},
|
||||
"minItems":1
|
||||
},
|
||||
"instances":{
|
||||
"type":"array",
|
||||
"required":false,
|
||||
"items":{
|
||||
"type":"object",
|
||||
"properties":{
|
||||
"enabled":{
|
||||
"type":"boolean"
|
||||
},
|
||||
"id":{
|
||||
"type":"integer",
|
||||
"minimum":0,
|
||||
"maximum":255
|
||||
},
|
||||
"name":{
|
||||
"type":"string",
|
||||
"minLength":5
|
||||
},
|
||||
"settings":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"$ref":"schema-settings-instance-relaxed.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties":true
|
||||
},
|
||||
"additionalProperties":false
|
||||
}
|
59
libsrc/hyperion/schema/schema-settings-full.json
Normal file
59
libsrc/hyperion/schema/schema-settings-full.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"global":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"settings":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"$ref":"schema-settings-global.json"
|
||||
},
|
||||
"uuid":{
|
||||
"type":"string",
|
||||
"format":"uuid",
|
||||
"required":false
|
||||
}
|
||||
},
|
||||
"additionalProperties":true
|
||||
},
|
||||
"instanceIds":{
|
||||
"type":"array",
|
||||
"required":false,
|
||||
"items":{
|
||||
"type":"integer"
|
||||
},
|
||||
"minItems":1
|
||||
},
|
||||
"instances":{
|
||||
"type":"array",
|
||||
"required":true,
|
||||
"items":{
|
||||
"type":"object",
|
||||
"properties":{
|
||||
"enabled":{
|
||||
"type":"boolean"
|
||||
},
|
||||
"id":{
|
||||
"type":"integer",
|
||||
"minimum":0,
|
||||
"maximum":255
|
||||
},
|
||||
"name":{
|
||||
"type":"string",
|
||||
"minLength":5
|
||||
},
|
||||
"settings":{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"$ref":"schema-settings-instance.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties":true
|
||||
},
|
||||
"additionalProperties":false
|
||||
}
|
62
libsrc/hyperion/schema/schema-settings-global-relaxed.json
Normal file
62
libsrc/hyperion/schema/schema-settings-global-relaxed.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"type":"object",
|
||||
"properties":{
|
||||
"cecEvents":{
|
||||
"required":false,
|
||||
"$ref":"schema-cecEvents.json"
|
||||
},
|
||||
"flatbufServer":{
|
||||
"required":false,
|
||||
"$ref":"schema-flatbufServer.json"
|
||||
},
|
||||
"forwarder":{
|
||||
"required":false,
|
||||
"$ref":"schema-forwarder.json"
|
||||
},
|
||||
"framegrabber":{
|
||||
"required":false,
|
||||
"$ref":"schema-framegrabber.json"
|
||||
},
|
||||
"general":{
|
||||
"required":false,
|
||||
"$ref":"schema-general.json"
|
||||
},
|
||||
"grabberAudio":{
|
||||
"required":false,
|
||||
"$ref":"schema-grabberAudio.json"
|
||||
},
|
||||
"grabberV4L2":{
|
||||
"required":false,
|
||||
"$ref":"schema-grabberV4L2.json"
|
||||
},
|
||||
"jsonServer":{
|
||||
"required":false,
|
||||
"$ref":"schema-jsonServer.json"
|
||||
},
|
||||
"logger":{
|
||||
"required":false,
|
||||
"$ref":"schema-logger.json"
|
||||
},
|
||||
"network":{
|
||||
"required":false,
|
||||
"$ref":"schema-network.json"
|
||||
},
|
||||
"osEvents":{
|
||||
"required":false,
|
||||
"$ref":"schema-osEvents.json"
|
||||
},
|
||||
"protoServer":{
|
||||
"required":false,
|
||||
"$ref":"schema-protoServer.json"
|
||||
},
|
||||
"schedEvents":{
|
||||
"required":false,
|
||||
"$ref":"schema-schedEvents.json"
|
||||
},
|
||||
"webConfig":{
|
||||
"required":false,
|
||||
"$ref":"schema-webConfig.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties":false
|
||||
}
|
62
libsrc/hyperion/schema/schema-settings-global.json
Normal file
62
libsrc/hyperion/schema/schema-settings-global.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"type":"object",
|
||||
"properties":{
|
||||
"cecEvents":{
|
||||
"required":true,
|
||||
"$ref":"schema-cecEvents.json"
|
||||
},
|
||||
"flatbufServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-flatbufServer.json"
|
||||
},
|
||||
"forwarder":{
|
||||
"required":true,
|
||||
"$ref":"schema-forwarder.json"
|
||||
},
|
||||
"framegrabber":{
|
||||
"required":true,
|
||||
"$ref":"schema-framegrabber.json"
|
||||
},
|
||||
"general":{
|
||||
"required":true,
|
||||
"$ref":"schema-general.json"
|
||||
},
|
||||
"grabberAudio":{
|
||||
"required":true,
|
||||
"$ref":"schema-grabberAudio.json"
|
||||
},
|
||||
"grabberV4L2":{
|
||||
"required":true,
|
||||
"$ref":"schema-grabberV4L2.json"
|
||||
},
|
||||
"jsonServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-jsonServer.json"
|
||||
},
|
||||
"logger":{
|
||||
"required":true,
|
||||
"$ref":"schema-logger.json"
|
||||
},
|
||||
"network":{
|
||||
"required":true,
|
||||
"$ref":"schema-network.json"
|
||||
},
|
||||
"osEvents":{
|
||||
"required":true,
|
||||
"$ref":"schema-osEvents.json"
|
||||
},
|
||||
"protoServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-protoServer.json"
|
||||
},
|
||||
"schedEvents":{
|
||||
"required":true,
|
||||
"$ref":"schema-schedEvents.json"
|
||||
},
|
||||
"webConfig":{
|
||||
"required":true,
|
||||
"$ref":"schema-webConfig.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties":true
|
||||
}
|
50
libsrc/hyperion/schema/schema-settings-instance-relaxed.json
Normal file
50
libsrc/hyperion/schema/schema-settings-instance-relaxed.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"type":"object",
|
||||
"properties":{
|
||||
"backgroundEffect":{
|
||||
"required":false,
|
||||
"$ref":"schema-backgroundEffect.json"
|
||||
},
|
||||
"blackborderdetector":{
|
||||
"required":false,
|
||||
"$ref":"schema-blackborderdetector.json"
|
||||
},
|
||||
"boblightServer":{
|
||||
"required":false,
|
||||
"$ref":"schema-boblightServer.json"
|
||||
},
|
||||
"color":{
|
||||
"required":false,
|
||||
"$ref":"schema-color.json"
|
||||
},
|
||||
"device":{
|
||||
"required":false,
|
||||
"$ref":"schema-device.json"
|
||||
},
|
||||
"effects":{
|
||||
"required":false,
|
||||
"$ref":"schema-effects.json"
|
||||
},
|
||||
"foregroundEffect":{
|
||||
"required":false,
|
||||
"$ref":"schema-foregroundEffect.json"
|
||||
},
|
||||
"instCapture":{
|
||||
"required":false,
|
||||
"$ref":"schema-instCapture.json"
|
||||
},
|
||||
"ledConfig":{
|
||||
"required":false,
|
||||
"$ref":"schema-ledConfig.json"
|
||||
},
|
||||
"leds":{
|
||||
"required":false,
|
||||
"$ref":"schema-leds.json"
|
||||
},
|
||||
"smoothing":{
|
||||
"required":false,
|
||||
"$ref":"schema-smoothing.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties":false
|
||||
}
|
50
libsrc/hyperion/schema/schema-settings-instance.json
Normal file
50
libsrc/hyperion/schema/schema-settings-instance.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"type":"object",
|
||||
"properties":{
|
||||
"backgroundEffect":{
|
||||
"required":true,
|
||||
"$ref":"schema-backgroundEffect.json"
|
||||
},
|
||||
"blackborderdetector":{
|
||||
"required":true,
|
||||
"$ref":"schema-blackborderdetector.json"
|
||||
},
|
||||
"boblightServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-boblightServer.json"
|
||||
},
|
||||
"color":{
|
||||
"required":true,
|
||||
"$ref":"schema-color.json"
|
||||
},
|
||||
"device":{
|
||||
"required":true,
|
||||
"$ref":"schema-device.json"
|
||||
},
|
||||
"effects":{
|
||||
"required":true,
|
||||
"$ref":"schema-effects.json"
|
||||
},
|
||||
"foregroundEffect":{
|
||||
"required":true,
|
||||
"$ref":"schema-foregroundEffect.json"
|
||||
},
|
||||
"instCapture":{
|
||||
"required":true,
|
||||
"$ref":"schema-instCapture.json"
|
||||
},
|
||||
"ledConfig":{
|
||||
"required":true,
|
||||
"$ref":"schema-ledConfig.json"
|
||||
},
|
||||
"leds":{
|
||||
"required":true,
|
||||
"$ref":"schema-leds.json"
|
||||
},
|
||||
"smoothing":{
|
||||
"required":true,
|
||||
"$ref":"schema-smoothing.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties":true
|
||||
}
|
107
libsrc/hyperion/schema/schema-settings-ui.json
Normal file
107
libsrc/hyperion/schema/schema-settings-ui.json
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"cecEvents":{
|
||||
"required":true,
|
||||
"$ref":"schema-cecEvents.json"
|
||||
},
|
||||
"flatbufServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-flatbufServer.json"
|
||||
},
|
||||
"forwarder":{
|
||||
"required":true,
|
||||
"$ref":"schema-forwarder.json"
|
||||
},
|
||||
"framegrabber":{
|
||||
"required":true,
|
||||
"$ref":"schema-framegrabber.json"
|
||||
},
|
||||
"general":{
|
||||
"required":true,
|
||||
"$ref":"schema-general.json"
|
||||
},
|
||||
"grabberAudio":{
|
||||
"required":true,
|
||||
"$ref":"schema-grabberAudio.json"
|
||||
},
|
||||
"grabberV4L2":{
|
||||
"required":true,
|
||||
"$ref":"schema-grabberV4L2.json"
|
||||
},
|
||||
"jsonServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-jsonServer.json"
|
||||
},
|
||||
"logger":{
|
||||
"required":true,
|
||||
"$ref":"schema-logger.json"
|
||||
},
|
||||
"network":{
|
||||
"required":true,
|
||||
"$ref":"schema-network.json"
|
||||
},
|
||||
"osEvents":{
|
||||
"required":true,
|
||||
"$ref":"schema-osEvents.json"
|
||||
},
|
||||
"protoServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-protoServer.json"
|
||||
},
|
||||
"schedEvents":{
|
||||
"required":true,
|
||||
"$ref":"schema-schedEvents.json"
|
||||
},
|
||||
"webConfig":{
|
||||
"required":true,
|
||||
"$ref":"schema-webConfig.json"
|
||||
},
|
||||
"backgroundEffect":{
|
||||
"required":true,
|
||||
"$ref":"schema-backgroundEffect.json"
|
||||
},
|
||||
"blackborderdetector":{
|
||||
"required":true,
|
||||
"$ref":"schema-blackborderdetector.json"
|
||||
},
|
||||
"boblightServer":{
|
||||
"required":true,
|
||||
"$ref":"schema-boblightServer.json"
|
||||
},
|
||||
"color":{
|
||||
"required":true,
|
||||
"$ref":"schema-color.json"
|
||||
},
|
||||
"device":{
|
||||
"required":true,
|
||||
"$ref":"schema-device.json"
|
||||
},
|
||||
"effects":{
|
||||
"required":true,
|
||||
"$ref":"schema-effects.json"
|
||||
},
|
||||
"foregroundEffect":{
|
||||
"required":true,
|
||||
"$ref":"schema-foregroundEffect.json"
|
||||
},
|
||||
"instCapture":{
|
||||
"required":true,
|
||||
"$ref":"schema-instCapture.json"
|
||||
},
|
||||
"ledConfig":{
|
||||
"required":true,
|
||||
"$ref":"schema-ledConfig.json"
|
||||
},
|
||||
"leds":{
|
||||
"required":true,
|
||||
"$ref":"schema-leds.json"
|
||||
},
|
||||
"smoothing":{
|
||||
"required":true,
|
||||
"$ref":"schema-smoothing.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties":false
|
||||
}
|
Reference in New Issue
Block a user