mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Dynamic Device Selection/Configuration (#1164)
This commit is contained in:
@@ -83,7 +83,7 @@ void Hyperion::start()
|
||||
}
|
||||
|
||||
// handle hwLedCount
|
||||
_hwLedCount = qMax(getSetting(settings::DEVICE).object()["hardwareLedCount"].toInt(getLedCount()), getLedCount());
|
||||
_hwLedCount = getSetting(settings::DEVICE).object()["hardwareLedCount"].toInt(getLedCount());
|
||||
|
||||
// Initialize colororder vector
|
||||
for (const Led& led : _ledString.leds())
|
||||
@@ -217,7 +217,7 @@ void Hyperion::handleSettingsUpdate(settings::type type, const QJsonDocument& co
|
||||
}
|
||||
|
||||
// handle hwLedCount update
|
||||
_hwLedCount = qMax(getSetting(settings::DEVICE).object()["hardwareLedCount"].toInt(getLedCount()), getLedCount());
|
||||
_hwLedCount = getSetting(settings::DEVICE).object()["hardwareLedCount"].toInt(getLedCount());
|
||||
|
||||
// change in leds are also reflected in adjustment
|
||||
delete _raw2ledAdjustment;
|
||||
@@ -231,7 +231,7 @@ void Hyperion::handleSettingsUpdate(settings::type type, const QJsonDocument& co
|
||||
QJsonObject dev = config.object();
|
||||
|
||||
// handle hwLedCount update
|
||||
_hwLedCount = qMax(dev["hardwareLedCount"].toInt(getLedCount()), getLedCount());
|
||||
_hwLedCount = dev["hardwareLedCount"].toInt(getLedCount());
|
||||
|
||||
// force ledString update, if device ByteOrder changed
|
||||
if(_ledDeviceWrapper->getColorOrder() != dev["colorOrder"].toString("rgb"))
|
||||
|
@@ -4,6 +4,7 @@
|
||||
// util
|
||||
#include <utils/JsonUtils.h>
|
||||
#include <db/SettingsTable.h>
|
||||
#include "HyperionConfig.h"
|
||||
|
||||
// json schema process
|
||||
#include <utils/jsonschema/QJsonFactory.h>
|
||||
@@ -12,12 +13,23 @@
|
||||
// write config to filesystem
|
||||
#include <utils/JsonUtils.h>
|
||||
|
||||
#include <utils/version.hpp>
|
||||
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)
|
||||
: QObject(parent)
|
||||
, _log(Logger::getInstance("SETTINGSMGR"))
|
||||
, _instance(instance)
|
||||
, _sTable(new SettingsTable(instance, this))
|
||||
, _configVersion(DEFAULT_VERSION)
|
||||
, _previousVersion(DEFAULT_VERSION)
|
||||
, _readonlyMode(readonlyMode)
|
||||
{
|
||||
_sTable->setReadonlyMode(_readonlyMode);
|
||||
@@ -38,7 +50,9 @@ SettingsManager::SettingsManager(quint8 instance, QObject* parent, bool readonly
|
||||
// get default config
|
||||
QJsonObject defaultConfig;
|
||||
if(!JsonUtils::readFile(":/hyperion_default.config", defaultConfig, _log))
|
||||
{
|
||||
throw std::runtime_error("Failed to read default config");
|
||||
}
|
||||
|
||||
// transform json to string lists
|
||||
QStringList keyList = defaultConfig.keys();
|
||||
@@ -64,7 +78,7 @@ SettingsManager::SettingsManager(quint8 instance, QObject* parent, bool readonly
|
||||
_sTable->createSettingsRecord(key,val);
|
||||
}
|
||||
|
||||
// need to validate all data in database constuct the entire data object
|
||||
// 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)
|
||||
@@ -76,8 +90,49 @@ SettingsManager::SettingsManager(quint8 instance, QObject* parent, bool readonly
|
||||
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 ( _configVersion > BUILD_VERSION )
|
||||
{
|
||||
Error(_log, "Database version [%s] is greater that 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
|
||||
if(handleConfigUpgrade(dbConfig))
|
||||
bool migrated = handleConfigUpgrade(dbConfig);
|
||||
if ( isNewRelease || migrated )
|
||||
{
|
||||
saveSettings(dbConfig, true);
|
||||
}
|
||||
@@ -193,77 +248,156 @@ bool SettingsManager::saveSettings(QJsonObject config, bool correct)
|
||||
return rc;
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
else
|
||||
{
|
||||
_configVersion.setVersion(DEFAULT_VERSION);
|
||||
isValid = true;
|
||||
}
|
||||
|
||||
if ( !previousVersion.isEmpty() && isValid )
|
||||
{
|
||||
isValid = _previousVersion.setVersion(previousVersion.toStdString());
|
||||
}
|
||||
else
|
||||
{
|
||||
_previousVersion.setVersion(DEFAULT_VERSION);
|
||||
isValid = true;
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
}
|
||||
|
||||
bool SettingsManager::handleConfigUpgrade(QJsonObject& config)
|
||||
{
|
||||
bool migrated = false;
|
||||
|
||||
// LED LAYOUT UPGRADE
|
||||
// from { hscan: { minimum: 0.2, maximum: 0.3 }, vscan: { minimum: 0.2, maximumn: 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"))
|
||||
resolveConfigVersion(config);
|
||||
|
||||
//Do only migrate, if configuration is not up to date
|
||||
if (_previousVersion < _configVersion)
|
||||
{
|
||||
const QJsonArray ledarr = config["leds"].toArray();
|
||||
const QJsonObject led = ledarr[0].toObject();
|
||||
|
||||
if(led.contains("hscan") || led.contains("h"))
|
||||
//Migration steps for versions <= alpha 9
|
||||
semver::version targetVersion {"2.0.0-alpha.9"};
|
||||
if (_previousVersion <= targetVersion )
|
||||
{
|
||||
const bool whscan = led.contains("hscan");
|
||||
QJsonArray newLedarr;
|
||||
Info(_log, "Instance [%u]: Migrate LED Layout from current version [%s] to version [%s] or later", _instance, _previousVersion.getVersion().c_str(), targetVersion.getVersion().c_str());
|
||||
|
||||
for(const auto & entry : ledarr)
|
||||
// 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 QJsonObject led = entry.toObject();
|
||||
QJsonObject hscan;
|
||||
QJsonObject vscan;
|
||||
QJsonValue hmin;
|
||||
QJsonValue hmax;
|
||||
QJsonValue vmin;
|
||||
QJsonValue vmax;
|
||||
QJsonObject nL;
|
||||
const QJsonArray ledarr = config["leds"].toArray();
|
||||
const QJsonObject led = ledarr[0].toObject();
|
||||
|
||||
if(whscan)
|
||||
if(led.contains("hscan") || led.contains("h"))
|
||||
{
|
||||
hscan = led["hscan"].toObject();
|
||||
vscan = led["vscan"].toObject();
|
||||
hmin = hscan["minimum"];
|
||||
hmax = hscan["maximum"];
|
||||
vmin = vscan["minimum"];
|
||||
vmax = vscan["maximum"];
|
||||
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);
|
||||
}
|
||||
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;
|
||||
Debug(_log,"LED Layout migrated");
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("grabberV4L2"))
|
||||
{
|
||||
QJsonObject newGrabberV4L2Config = config["grabberV4L2"].toObject();
|
||||
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 );
|
||||
|
||||
if (newGrabberV4L2Config.contains("encoding_format"))
|
||||
{
|
||||
newGrabberV4L2Config.remove("encoding_format");
|
||||
config["grabberV4L2"] = newGrabberV4L2Config;
|
||||
migrated = true;
|
||||
Debug(_log, "GrabberV4L2 Layout migrated");
|
||||
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;
|
||||
|
||||
config["device"] = newDeviceConfig;
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return migrated;
|
||||
|
@@ -1,50 +1,45 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"title" : "edt_dev_general_heading_title",
|
||||
"required" : true,
|
||||
"defaultProperties": ["hardwareLedCount", "colorOrder"],
|
||||
"properties" :
|
||||
{
|
||||
"type" :
|
||||
{
|
||||
"type" : "string",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"hardwareLedCount" :
|
||||
{
|
||||
"type" : "integer",
|
||||
"title" : "edt_dev_general_hardwareLedCount_title",
|
||||
"minimum" : 1,
|
||||
"default" : 1,
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"colorOrder" :
|
||||
{
|
||||
"type" : "string",
|
||||
"title" : "edt_dev_general_colorOrder_title",
|
||||
"enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"],
|
||||
"default" : "rgb",
|
||||
"required" : true,
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_rgb", "edt_conf_enum_bgr", "edt_conf_enum_rbg", "edt_conf_enum_brg", "edt_conf_enum_gbr", "edt_conf_enum_grb" ]
|
||||
},
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
}
|
||||
},
|
||||
"dependencies" :
|
||||
{
|
||||
"rewriteTime" :
|
||||
{
|
||||
"properties" :
|
||||
{
|
||||
"type" :
|
||||
{
|
||||
"enum" : ["file", "apa102", "apa104", "ws2801", "lpd6803", "lpd8806", "p9813", "sk6812spi", "sk6822spi", "sk9822", "ws2812spi","ws281x", "piblaster", "adalight", "dmx", "atmo", "hyperionusbasp", "lightpack", "multilightpack", "paintpack", "rawhid", "sedu", "tpm2", "karate"]
|
||||
}
|
||||
},
|
||||
"additionalProperties" : true
|
||||
}
|
||||
},
|
||||
"additionalProperties" : true
|
||||
"type": "object",
|
||||
"title": " ",
|
||||
"defaultProperties": [ "hardwareLedCount", "colorOrder" ],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"hardwareLedCount": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_general_hardwareLedCount_title",
|
||||
"minimum": 1,
|
||||
"default": 1,
|
||||
"options": {
|
||||
"infoText": "edt_dev_general_hardwareLedCount_title_info"
|
||||
},
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"colorOrder": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_general_colorOrder_title",
|
||||
"enum": [ "rgb", "bgr", "rbg", "brg", "gbr", "grb" ],
|
||||
"default": "rgb",
|
||||
"required": true,
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_rgb", "edt_conf_enum_bgr", "edt_conf_enum_rbg", "edt_conf_enum_brg", "edt_conf_enum_gbr", "edt_conf_enum_grb" ],
|
||||
"infoText": "edt_dev_general_colorOrder_title_info"
|
||||
},
|
||||
"access": "expert",
|
||||
"propertyOrder": 3
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"rewriteTime": {
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [ "file", "apa102", "apa104", "ws2801", "lpd6803", "lpd8806", "p9813", "sk6812spi", "sk6822spi", "sk9822", "ws2812spi", "ws281x", "piblaster", "adalight", "dmx", "atmo", "hyperionusbasp", "lightpack", "multilightpack", "paintpack", "rawhid", "sedu", "tpm2", "karate" ]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -34,6 +34,25 @@
|
||||
"default" : true,
|
||||
"required" : true,
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"configVersion" :
|
||||
{
|
||||
"type" : "string",
|
||||
"title" : "edt_conf_gen_configVersion_title",
|
||||
"options" : {
|
||||
"hidden":true
|
||||
},
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"previousVersion" :
|
||||
{
|
||||
"type" : "string",
|
||||
"options" : {
|
||||
"hidden":true
|
||||
},
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
|
@@ -135,15 +135,45 @@
|
||||
},
|
||||
"cabling": {
|
||||
"type": "string",
|
||||
"enum": ["snake", "parallel"]
|
||||
"enum": [ "snake", "parallel" ]
|
||||
},
|
||||
"start": {
|
||||
"type": "string",
|
||||
"enum": ["top-left", "top-right", "bottom-left", "bottom-right"]
|
||||
"enum": [ "top-left", "top-right", "bottom-left", "bottom-right" ]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ledBlacklist": {
|
||||
"type": "array",
|
||||
"title": "conf_leds_layout_blacklist_rules_title",
|
||||
"minimum": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"title": "conf_leds_layout_blacklist_rule_title",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"start": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 0,
|
||||
"title": "conf_leds_layout_blacklist_start_title",
|
||||
"required": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"num": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"default": 1,
|
||||
"title": "conf_leds_layout_blacklist_num_title",
|
||||
"required": true,
|
||||
"propertyOrder": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"propertyOrder": 1
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -234,20 +234,25 @@ int LedDevice::rewriteLEDs()
|
||||
return retval;
|
||||
}
|
||||
|
||||
int LedDevice::writeBlack(int numberOfBlack)
|
||||
int LedDevice::writeBlack(int numberOfWrites)
|
||||
{
|
||||
return writeColor(ColorRgb::BLACK, numberOfWrites);
|
||||
}
|
||||
|
||||
int LedDevice::writeColor(const ColorRgb& color, int numberOfWrites)
|
||||
{
|
||||
int rc = -1;
|
||||
|
||||
for (int i = 0; i < numberOfBlack; i++)
|
||||
for (int i = 0; i < numberOfWrites; i++)
|
||||
{
|
||||
if ( _latchTime_ms > 0 )
|
||||
if (_latchTime_ms > 0)
|
||||
{
|
||||
// Wait latch time before writing black
|
||||
QEventLoop loop;
|
||||
QTimer::singleShot(_latchTime_ms, &loop, &QEventLoop::quit);
|
||||
loop.exec();
|
||||
}
|
||||
_lastLedValues = std::vector<ColorRgb>(static_cast<unsigned long>(_ledCount), ColorRgb::BLACK );
|
||||
_lastLedValues = std::vector<ColorRgb>(static_cast<unsigned long>(_ledCount),color);
|
||||
rc = write(_lastLedValues);
|
||||
}
|
||||
return rc;
|
||||
@@ -411,28 +416,33 @@ void LedDevice::setLatchTime( int latchTime_ms )
|
||||
void LedDevice::setRewriteTime( int rewriteTime_ms )
|
||||
{
|
||||
assert(rewriteTime_ms >= 0);
|
||||
_refreshTimerInterval_ms = rewriteTime_ms;
|
||||
|
||||
if ( _refreshTimerInterval_ms > 0 )
|
||||
//Check, if refresh timer was not initialised due to getProperties/identify sceanrios
|
||||
if (_refreshTimer != nullptr)
|
||||
{
|
||||
_refreshTimerInterval_ms = rewriteTime_ms;
|
||||
|
||||
_isRefreshEnabled = true;
|
||||
|
||||
if (_refreshTimerInterval_ms <= _latchTime_ms )
|
||||
if (_refreshTimerInterval_ms > 0)
|
||||
{
|
||||
int new_refresh_timer_interval = _latchTime_ms + 10;
|
||||
Warning(_log, "latchTime(%d) is bigger/equal rewriteTime(%d), set rewriteTime to %dms", _latchTime_ms, _refreshTimerInterval_ms, new_refresh_timer_interval);
|
||||
_refreshTimerInterval_ms = new_refresh_timer_interval;
|
||||
_refreshTimer->setInterval( _refreshTimerInterval_ms );
|
||||
|
||||
_isRefreshEnabled = true;
|
||||
|
||||
if (_refreshTimerInterval_ms <= _latchTime_ms)
|
||||
{
|
||||
int new_refresh_timer_interval = _latchTime_ms + 10;
|
||||
Warning(_log, "latchTime(%d) is bigger/equal rewriteTime(%d), set rewriteTime to %dms", _latchTime_ms, _refreshTimerInterval_ms, new_refresh_timer_interval);
|
||||
_refreshTimerInterval_ms = new_refresh_timer_interval;
|
||||
_refreshTimer->setInterval(_refreshTimerInterval_ms);
|
||||
}
|
||||
|
||||
Debug(_log, "Refresh interval = %dms", _refreshTimerInterval_ms);
|
||||
_refreshTimer->setInterval(_refreshTimerInterval_ms);
|
||||
|
||||
_lastWriteTime = QDateTime::currentDateTime();
|
||||
}
|
||||
|
||||
Debug(_log, "Refresh interval = %dms",_refreshTimerInterval_ms );
|
||||
_refreshTimer->setInterval( _refreshTimerInterval_ms );
|
||||
|
||||
_lastWriteTime = QDateTime::currentDateTime();
|
||||
Debug(_log, "RewriteTime updated to %dms", _refreshTimerInterval_ms);
|
||||
}
|
||||
|
||||
Debug(_log, "RewriteTime updated to %dms", _refreshTimerInterval_ms);
|
||||
}
|
||||
|
||||
void LedDevice::printLedValues(const std::vector<ColorRgb>& ledValues)
|
||||
|
@@ -15,6 +15,9 @@ const bool verbose = false;
|
||||
// Configuration settings
|
||||
const char CONFIG_ADDRESS[] = "host";
|
||||
const char CONFIG_RESTORE_STATE[] = "restoreOriginalState";
|
||||
const char CONFIG_BRIGHTNESS[] = "brightness";
|
||||
const char CONFIG_BRIGHTNESS_OVERWRITE[] = "overwriteBrightness";
|
||||
const char CONFIG_SYNC_OVERWRITE[] = "overwriteSync";
|
||||
|
||||
// UDP elements
|
||||
const quint16 STREAM_DEFAULT_PORT = 19446;
|
||||
@@ -32,7 +35,10 @@ const char STATE_VALUE_TRUE[] = "true";
|
||||
const char STATE_VALUE_FALSE[] = "false";
|
||||
const char STATE_LIVE[] = "live";
|
||||
|
||||
const bool DEFAULT_IS_RESTORE_STATE = false;
|
||||
const bool DEFAULT_IS_BRIGHTNESS_OVERWRITE = true;
|
||||
const int BRI_MAX = 255;
|
||||
const bool DEFAULT_IS_SYNC_OVERWRITE = true;
|
||||
|
||||
constexpr std::chrono::milliseconds DEFAULT_IDENTIFY_TIME{ 2000 };
|
||||
|
||||
@@ -42,6 +48,11 @@ LedDeviceWled::LedDeviceWled(const QJsonObject &deviceConfig)
|
||||
: ProviderUdp(deviceConfig)
|
||||
,_restApi(nullptr)
|
||||
,_apiPort(API_DEFAULT_PORT)
|
||||
,_isBrightnessOverwrite(DEFAULT_IS_BRIGHTNESS_OVERWRITE)
|
||||
,_brightness (BRI_MAX)
|
||||
,_isSyncOverwrite(DEFAULT_IS_SYNC_OVERWRITE)
|
||||
,_originalStateUdpnSend(false)
|
||||
,_originalStateUdpnRecv(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -70,8 +81,15 @@ bool LedDeviceWled::init(const QJsonObject &deviceConfig)
|
||||
Debug(_log, "ColorOrder : %s", QSTRING_CSTR( this->getColorOrder() ));
|
||||
Debug(_log, "LatchTime : %d", this->getLatchTime());
|
||||
|
||||
_isRestoreOrigState = _devConfig[CONFIG_RESTORE_STATE].toBool(false);
|
||||
_isRestoreOrigState = _devConfig[CONFIG_RESTORE_STATE].toBool(DEFAULT_IS_RESTORE_STATE);
|
||||
_isSyncOverwrite = _devConfig[CONFIG_SYNC_OVERWRITE].toBool(DEFAULT_IS_SYNC_OVERWRITE);
|
||||
_isBrightnessOverwrite = _devConfig[CONFIG_BRIGHTNESS_OVERWRITE].toBool(DEFAULT_IS_BRIGHTNESS_OVERWRITE);
|
||||
_brightness = _devConfig[CONFIG_BRIGHTNESS].toInt(BRI_MAX);
|
||||
|
||||
Debug(_log, "RestoreOrigState : %d", _isRestoreOrigState);
|
||||
Debug(_log, "Overwrite Sync. : %d", _isSyncOverwrite);
|
||||
Debug(_log, "Overwrite Brightn.: %d", _isBrightnessOverwrite);
|
||||
Debug(_log, "Set Brightness to : %d", _brightness);
|
||||
|
||||
//Set hostname as per configuration
|
||||
QString hostName = deviceConfig[ CONFIG_ADDRESS ].toString();
|
||||
@@ -145,6 +163,13 @@ QString LedDeviceWled::getLorRequest(int lor) const
|
||||
return QString( "\"lor\":%1" ).arg(lor);
|
||||
}
|
||||
|
||||
QString LedDeviceWled::getUdpnRequest(bool isSendOn, bool isRecvOn) const
|
||||
{
|
||||
QString send = isSendOn ? STATE_VALUE_TRUE : STATE_VALUE_FALSE;
|
||||
QString recv = isRecvOn ? STATE_VALUE_TRUE : STATE_VALUE_FALSE;
|
||||
return QString( "\"udpn\":{\"send\":%1,\"recv\":%2}" ).arg(send, recv);
|
||||
}
|
||||
|
||||
bool LedDeviceWled::sendStateUpdateRequest(const QString &request)
|
||||
{
|
||||
bool rc = true;
|
||||
@@ -166,7 +191,20 @@ bool LedDeviceWled::powerOn()
|
||||
//Power-on WLED device
|
||||
_restApi->setPath(API_PATH_STATE);
|
||||
|
||||
httpResponse response = _restApi->put(QString("{%1,%2}").arg(getOnOffRequest(true)).arg(getBrightnessRequest(BRI_MAX)));
|
||||
QString cmd = getOnOffRequest(true);
|
||||
|
||||
if ( _isBrightnessOverwrite)
|
||||
{
|
||||
cmd += "," + getBrightnessRequest(_brightness);
|
||||
}
|
||||
|
||||
if (_isSyncOverwrite)
|
||||
{
|
||||
Debug( _log, "Disable synchronisation with other WLED devices");
|
||||
cmd += "," + getUdpnRequest(false, false);
|
||||
}
|
||||
|
||||
httpResponse response = _restApi->put(QString("{%1}").arg(cmd));
|
||||
if ( response.error() )
|
||||
{
|
||||
QString errorReason = QString("Power-on request failed with error: '%1'").arg(response.getErrorReason());
|
||||
@@ -191,7 +229,16 @@ bool LedDeviceWled::powerOff()
|
||||
|
||||
//Power-off the WLED device physically
|
||||
_restApi->setPath(API_PATH_STATE);
|
||||
httpResponse response = _restApi->put(QString("{%1}").arg(getOnOffRequest(false)));
|
||||
|
||||
QString cmd = getOnOffRequest(false);
|
||||
|
||||
if (_isSyncOverwrite)
|
||||
{
|
||||
Debug( _log, "Restore synchronisation with other WLED devices");
|
||||
cmd += "," + getUdpnRequest(_originalStateUdpnSend, _originalStateUdpnRecv);
|
||||
}
|
||||
|
||||
httpResponse response = _restApi->put(QString("{%1}").arg(cmd));
|
||||
if ( response.error() )
|
||||
{
|
||||
QString errorReason = QString("Power-off request failed with error: '%1'").arg(response.getErrorReason());
|
||||
@@ -206,7 +253,7 @@ bool LedDeviceWled::storeState()
|
||||
{
|
||||
bool rc = true;
|
||||
|
||||
if ( _isRestoreOrigState )
|
||||
if ( _isRestoreOrigState || _isSyncOverwrite )
|
||||
{
|
||||
_restApi->setPath(API_PATH_STATE);
|
||||
|
||||
@@ -221,6 +268,13 @@ bool LedDeviceWled::storeState()
|
||||
{
|
||||
_originalStateProperties = response.getBody().object();
|
||||
DebugIf(verbose, _log, "state: [%s]", QString(QJsonDocument(_originalStateProperties).toJson(QJsonDocument::Compact)).toUtf8().constData() );
|
||||
|
||||
QJsonObject udpn = _originalStateProperties.value("udpn").toObject();
|
||||
if (!udpn.isEmpty())
|
||||
{
|
||||
_originalStateUdpnSend = udpn["send"].toBool(false);
|
||||
_originalStateUdpnRecv = udpn["recv"].toBool(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +287,6 @@ bool LedDeviceWled::restoreState()
|
||||
|
||||
if ( _isRestoreOrigState )
|
||||
{
|
||||
//powerOff();
|
||||
_restApi->setPath(API_PATH_STATE);
|
||||
|
||||
_originalStateProperties[STATE_LIVE] = false;
|
||||
|
@@ -140,9 +140,11 @@ private:
|
||||
/// @return Command to switch device on/off
|
||||
///
|
||||
QString getOnOffRequest (bool isOn ) const;
|
||||
|
||||
QString getBrightnessRequest (int bri ) const;
|
||||
QString getEffectRequest(int effect, int speed=128) const;
|
||||
QString getLorRequest(int lor) const;
|
||||
QString getUdpnRequest(bool send, bool recv) const;
|
||||
|
||||
bool sendStateUpdateRequest(const QString &request);
|
||||
|
||||
@@ -154,6 +156,12 @@ private:
|
||||
|
||||
QJsonObject _originalStateProperties;
|
||||
|
||||
bool _isBrightnessOverwrite;
|
||||
int _brightness;
|
||||
|
||||
bool _isSyncOverwrite;
|
||||
bool _originalStateUdpnSend;
|
||||
bool _originalStateUdpnRecv;
|
||||
};
|
||||
|
||||
#endif // LEDDEVICEWLED_H
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "LedDeviceYeelight.h"
|
||||
#include "LedDeviceYeelight.h"
|
||||
|
||||
#include <ssdp/SSDPDiscover.h>
|
||||
#include <utils/QStringUtils.h>
|
||||
@@ -1018,10 +1018,9 @@ bool LedDeviceYeelight::init(const QJsonObject &deviceConfig)
|
||||
|
||||
//Get device specific configuration
|
||||
|
||||
bool ok;
|
||||
if ( deviceConfig[ CONFIG_COLOR_MODEL ].isString() )
|
||||
{
|
||||
_outputColorModel = deviceConfig[ CONFIG_COLOR_MODEL ].toString().toInt(&ok,MODEL_RGB);
|
||||
_outputColorModel = deviceConfig[ CONFIG_COLOR_MODEL ].toString(QString(MODEL_RGB)).toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1030,7 +1029,7 @@ bool LedDeviceYeelight::init(const QJsonObject &deviceConfig)
|
||||
|
||||
if ( deviceConfig[ CONFIG_TRANS_EFFECT ].isString() )
|
||||
{
|
||||
_transitionEffect = static_cast<YeelightLight::API_EFFECT>( deviceConfig[ CONFIG_TRANS_EFFECT ].toString().toInt(&ok, YeelightLight::API_EFFECT_SMOOTH) );
|
||||
_transitionEffect = static_cast<YeelightLight::API_EFFECT>( deviceConfig[ CONFIG_TRANS_EFFECT ].toString(QString(YeelightLight::API_EFFECT_SMOOTH)).toInt() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1047,7 +1046,7 @@ bool LedDeviceYeelight::init(const QJsonObject &deviceConfig)
|
||||
|
||||
if ( deviceConfig[ CONFIG_DEBUGLEVEL ].isString() )
|
||||
{
|
||||
_debuglevel = deviceConfig[ CONFIG_DEBUGLEVEL ].toString().toInt();
|
||||
_debuglevel = deviceConfig[ CONFIG_DEBUGLEVEL ].toString(QString("0")).toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -4,11 +4,22 @@
|
||||
#include <csignal>
|
||||
|
||||
// QT includes
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
|
||||
// Local LedDevice includes
|
||||
#include "LedDevicePiBlaster.h"
|
||||
|
||||
// Constants
|
||||
namespace {
|
||||
const bool verbose = false;
|
||||
|
||||
// Pi-Blaster discovery service
|
||||
const char DISCOVERY_DIRECTORY[] = "/dev/";
|
||||
const char DISCOVERY_FILEPATTERN[] = "pi-blaster";
|
||||
|
||||
} //End of constants
|
||||
|
||||
LedDevicePiBlaster::LedDevicePiBlaster(const QJsonObject &deviceConfig)
|
||||
: LedDevice(deviceConfig)
|
||||
, _fid(nullptr)
|
||||
@@ -184,3 +195,31 @@ int LedDevicePiBlaster::write(const std::vector<ColorRgb> & ledValues)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QJsonObject LedDevicePiBlaster::discover(const QJsonObject& /*params*/)
|
||||
{
|
||||
QJsonObject devicesDiscovered;
|
||||
devicesDiscovered.insert("ledDeviceType", _activeDeviceType );
|
||||
|
||||
QJsonArray deviceList;
|
||||
|
||||
QDir deviceDirectory (DISCOVERY_DIRECTORY);
|
||||
QStringList deviceFilter(DISCOVERY_FILEPATTERN);
|
||||
deviceDirectory.setNameFilters(deviceFilter);
|
||||
deviceDirectory.setSorting(QDir::Name);
|
||||
QFileInfoList deviceFiles = deviceDirectory.entryInfoList(QDir::System);
|
||||
|
||||
QFileInfoList::const_iterator deviceFileIterator;
|
||||
for (deviceFileIterator = deviceFiles.constBegin(); deviceFileIterator != deviceFiles.constEnd(); ++deviceFileIterator)
|
||||
{
|
||||
QJsonObject deviceInfo;
|
||||
deviceInfo.insert("deviceName", (*deviceFileIterator).fileName());
|
||||
deviceInfo.insert("systemLocation", (*deviceFileIterator).absoluteFilePath());
|
||||
deviceList.append(deviceInfo);
|
||||
}
|
||||
devicesDiscovered.insert("devices", deviceList);
|
||||
|
||||
DebugIf(verbose,_log, "devicesDiscovered: [%s]", QString(QJsonDocument(devicesDiscovered).toJson(QJsonDocument::Compact)).toUtf8().constData());
|
||||
|
||||
return devicesDiscovered;
|
||||
}
|
||||
|
@@ -29,6 +29,12 @@ public:
|
||||
/// @return LedDevice constructed
|
||||
static LedDevice* construct(const QJsonObject &deviceConfig);
|
||||
|
||||
/// @param[in] params Parameters used to overwrite discovery default behaviour
|
||||
///
|
||||
/// @return A JSON structure holding a list of devices found
|
||||
///
|
||||
QJsonObject discover(const QJsonObject& params) override;
|
||||
|
||||
protected:
|
||||
|
||||
///
|
||||
|
@@ -2,6 +2,7 @@
|
||||
// LedDevice includes
|
||||
#include <leddevice/LedDevice.h>
|
||||
#include "ProviderRs232.h"
|
||||
#include <utils/WaitTime.h>
|
||||
|
||||
// qt includes
|
||||
#include <QSerialPortInfo>
|
||||
@@ -10,10 +11,16 @@
|
||||
#include <chrono>
|
||||
|
||||
// Constants
|
||||
constexpr std::chrono::milliseconds WRITE_TIMEOUT{1000}; // device write timeout in ms
|
||||
constexpr std::chrono::milliseconds OPEN_TIMEOUT{5000}; // device open timeout in ms
|
||||
const int MAX_WRITE_TIMEOUTS = 5; // Maximum number of allowed timeouts
|
||||
const int NUM_POWEROFF_WRITE_BLACK = 2; // Number of write "BLACK" during powering off
|
||||
namespace {
|
||||
const bool verbose = false;
|
||||
|
||||
constexpr std::chrono::milliseconds WRITE_TIMEOUT{ 1000 }; // device write timeout in ms
|
||||
constexpr std::chrono::milliseconds OPEN_TIMEOUT{ 5000 }; // device open timeout in ms
|
||||
const int MAX_WRITE_TIMEOUTS = 5; // Maximum number of allowed timeouts
|
||||
const int NUM_POWEROFF_WRITE_BLACK = 2; // Number of write "BLACK" during powering off
|
||||
|
||||
constexpr std::chrono::milliseconds DEFAULT_IDENTIFY_TIME{ 500 };
|
||||
} //End of constants
|
||||
|
||||
ProviderRs232::ProviderRs232(const QJsonObject &deviceConfig)
|
||||
: LedDevice(deviceConfig)
|
||||
@@ -278,7 +285,7 @@ QJsonObject ProviderRs232::discover(const QJsonObject& /*params*/)
|
||||
// Discover serial Devices
|
||||
for (auto &port : QSerialPortInfo::availablePorts() )
|
||||
{
|
||||
if ( !port.isNull() && !port.portName().startsWith("ttyS"))
|
||||
if ( !port.isNull() && port.vendorIdentifier() != 0)
|
||||
{
|
||||
QJsonObject portInfo;
|
||||
portInfo.insert("description", port.description());
|
||||
@@ -294,5 +301,39 @@ QJsonObject ProviderRs232::discover(const QJsonObject& /*params*/)
|
||||
}
|
||||
|
||||
devicesDiscovered.insert("devices", deviceList);
|
||||
DebugIf(verbose,_log, "devicesDiscovered: [%s]", QString(QJsonDocument(devicesDiscovered).toJson(QJsonDocument::Compact)).toUtf8().constData());
|
||||
|
||||
return devicesDiscovered;
|
||||
}
|
||||
|
||||
void ProviderRs232::identify(const QJsonObject& params)
|
||||
{
|
||||
DebugIf(verbose,_log, "params: [%s]", QString(QJsonDocument(params).toJson(QJsonDocument::Compact)).toUtf8().constData());
|
||||
|
||||
QString deviceName = params["output"].toString("");
|
||||
if (!deviceName.isEmpty())
|
||||
{
|
||||
_devConfig = params;
|
||||
init(_devConfig);
|
||||
{
|
||||
if ( open() == 0 )
|
||||
{
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (writeColor(ColorRgb::RED) == 0)
|
||||
{
|
||||
wait(DEFAULT_IDENTIFY_TIME);
|
||||
|
||||
writeColor(ColorRgb::BLACK);
|
||||
wait(DEFAULT_IDENTIFY_TIME);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,20 @@ public:
|
||||
///
|
||||
~ProviderRs232() override;
|
||||
|
||||
///
|
||||
/// @brief Send an update to the RS232 device to identify it.
|
||||
///
|
||||
/// Following parameters are required
|
||||
/// @code
|
||||
/// {
|
||||
/// "deviceConfig" :
|
||||
/// }
|
||||
///@endcode
|
||||
///
|
||||
/// @param[in] params Parameters to configure device
|
||||
///
|
||||
void identify(const QJsonObject& params) override;
|
||||
|
||||
protected:
|
||||
|
||||
///
|
||||
|
@@ -14,6 +14,19 @@
|
||||
#include "ProviderSpi.h"
|
||||
#include <utils/Logger.h>
|
||||
|
||||
// qt includes
|
||||
#include <QDir>
|
||||
|
||||
// Constants
|
||||
namespace {
|
||||
const bool verbose = false;
|
||||
|
||||
// SPI discovery service
|
||||
const char DISCOVERY_DIRECTORY[] = "/dev/";
|
||||
const char DISCOVERY_FILEPATTERN[] = "spidev*";
|
||||
|
||||
} //End of constants
|
||||
|
||||
ProviderSpi::ProviderSpi(const QJsonObject &deviceConfig)
|
||||
: LedDevice(deviceConfig)
|
||||
, _deviceName("/dev/spidev0.0")
|
||||
@@ -148,3 +161,31 @@ int ProviderSpi::writeBytes(unsigned size, const uint8_t * data)
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
QJsonObject ProviderSpi::discover(const QJsonObject& /*params*/)
|
||||
{
|
||||
QJsonObject devicesDiscovered;
|
||||
devicesDiscovered.insert("ledDeviceType", _activeDeviceType );
|
||||
|
||||
QJsonArray deviceList;
|
||||
|
||||
QDir deviceDirectory (DISCOVERY_DIRECTORY);
|
||||
QStringList deviceFilter(DISCOVERY_FILEPATTERN);
|
||||
deviceDirectory.setNameFilters(deviceFilter);
|
||||
deviceDirectory.setSorting(QDir::Name);
|
||||
QFileInfoList deviceFiles = deviceDirectory.entryInfoList(QDir::System);
|
||||
|
||||
QFileInfoList::const_iterator deviceFileIterator;
|
||||
for (deviceFileIterator = deviceFiles.constBegin(); deviceFileIterator != deviceFiles.constEnd(); ++deviceFileIterator)
|
||||
{
|
||||
QJsonObject deviceInfo;
|
||||
deviceInfo.insert("deviceName", (*deviceFileIterator).fileName().remove(0,6));
|
||||
deviceInfo.insert("systemLocation", (*deviceFileIterator).absoluteFilePath());
|
||||
deviceList.append(deviceInfo);
|
||||
}
|
||||
devicesDiscovered.insert("devices", deviceList);
|
||||
|
||||
DebugIf(verbose,_log, "devicesDiscovered: [%s]", QString(QJsonDocument(devicesDiscovered).toJson(QJsonDocument::Compact)).toUtf8().constData());
|
||||
|
||||
return devicesDiscovered;
|
||||
}
|
||||
|
@@ -36,6 +36,12 @@ public:
|
||||
///
|
||||
int open() override;
|
||||
|
||||
/// @param[in] params Parameters used to overwrite discovery default behaviour
|
||||
///
|
||||
/// @return A JSON structure holding a list of devices found
|
||||
///
|
||||
QJsonObject discover(const QJsonObject& params) override;
|
||||
|
||||
public slots:
|
||||
///
|
||||
/// Closes the output device.
|
||||
|
@@ -25,20 +25,24 @@
|
||||
},
|
||||
"lightberry_apa102_mode": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_LBap102Mode_title",
|
||||
"title": "edt_dev_spec_LBap102Mode_title",
|
||||
"default": false,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 4
|
||||
"required": true,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 4
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"title": "edt_dev_spec_latchtime_title",
|
||||
"default": 30,
|
||||
"append" : "edt_append_ms",
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
"access": "expert",
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_latchtime_title_info"
|
||||
},
|
||||
"propertyOrder": 5
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
|
@@ -5,8 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"default" : "/dev/spidev0.0",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -1,46 +1,47 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"orbIds": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_orbIds_title",
|
||||
"default": "",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"useOrbSmoothing": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_useOrbSmoothing_title",
|
||||
"default": true,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_multicastGroup_title",
|
||||
"default" : "239.255.255.250",
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_port_title",
|
||||
"minimum" : 0,
|
||||
"maximum" : 65535,
|
||||
"default": 49692,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 30,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"orbIds": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_orbIds_title",
|
||||
"minLength": 1,
|
||||
"default": "",
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"useOrbSmoothing": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_useOrbSmoothing_title",
|
||||
"default": true,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_multicastGroup_title",
|
||||
"default": "239.255.255.250",
|
||||
"access": "expert",
|
||||
"propertyOrder": 3
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_port_title",
|
||||
"minimum": 0,
|
||||
"maximum": 65535,
|
||||
"default": 49692,
|
||||
"access": "expert",
|
||||
"propertyOrder": 4
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_latchtime_title",
|
||||
"default": 30,
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access": "expert",
|
||||
"propertyOrder": 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -1,22 +1,40 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties": {
|
||||
"host" : {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_targetIpHost_title",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"hostList": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_devices_discovered_title",
|
||||
"enum": [ "NONE" ],
|
||||
"options": {
|
||||
"enum_titles": [ "edt_dev_spec_devices_discovery_inprogress" ],
|
||||
"infoText": "edt_dev_spec_devices_discovered_title_info"
|
||||
},
|
||||
"required": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_targetIpHost_title",
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_targetIpHost_title_info"
|
||||
},
|
||||
"required": true,
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_latchtime_title",
|
||||
"default": 0,
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access": "expert",
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_latchtime_title_info"
|
||||
},
|
||||
"propertyOrder": 3
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -1,58 +1,78 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"host": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_targetIpHost_title",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"token": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_auth_key_title",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"title": {
|
||||
"type" : "object",
|
||||
"title":"edt_dev_spec_panelorganisation_title",
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"panelOrderTopDown": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_order_top_down_title",
|
||||
"enum" : [0, 1],
|
||||
"default" : 0,
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_top_down", "edt_conf_enum_bottom_up"]
|
||||
},
|
||||
"minimum" : 0,
|
||||
"maximum" : 1,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"panelOrderLeftRight": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_order_left_right_title",
|
||||
"enum" : [0, 1],
|
||||
"default" : 0,
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_left_right", "edt_conf_enum_right_left"]
|
||||
},
|
||||
"minimum" : 0,
|
||||
"maximum" : 1,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 5
|
||||
},
|
||||
"panelStartPos": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_panel_start_position",
|
||||
"step": 1,
|
||||
"minimum" : 0,
|
||||
"default": 0,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 6
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"hostList": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_devices_discovered_title",
|
||||
"enum": [ "NONE" ],
|
||||
"options": {
|
||||
"enum_titles": [ "edt_dev_spec_devices_discovery_inprogress" ],
|
||||
"infoText": "edt_dev_spec_devices_discovered_title_info"
|
||||
},
|
||||
"required": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_targetIpHost_title",
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_targetIpHost_title_info"
|
||||
},
|
||||
"required": true,
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"token": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_auth_key_title",
|
||||
"options": {
|
||||
"infoText": "edt_dev_auth_key_title_info"
|
||||
},
|
||||
"propertyOrder": 4
|
||||
},
|
||||
"title": {
|
||||
"type": "object",
|
||||
"title": "edt_dev_spec_panelorganisation_title",
|
||||
"access": "advanced",
|
||||
"propertyOrder": 5
|
||||
},
|
||||
"panelOrderTopDown": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_order_top_down_title",
|
||||
"enum": [ 0, 1 ],
|
||||
"default": 0,
|
||||
"required": true,
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_top_down", "edt_conf_enum_bottom_up" ]
|
||||
},
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 6
|
||||
},
|
||||
"panelOrderLeftRight": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_order_left_right_title",
|
||||
"enum": [ 0, 1 ],
|
||||
"default": 0,
|
||||
"required": true,
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_left_right", "edt_conf_enum_right_left" ]
|
||||
},
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 7
|
||||
},
|
||||
"panelStartPos": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_panel_start_position",
|
||||
"step": 1,
|
||||
"minimum": 0,
|
||||
"default": 0,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 8
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -1,242 +1,243 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_targetIp_title",
|
||||
"default":"",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_username_title",
|
||||
"default": "",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"clientkey": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_clientKey_title",
|
||||
"default" : "",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"useEntertainmentAPI": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_useEntertainmentAPI_title",
|
||||
"default" : false,
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"transitiontime": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_transistionTime_title",
|
||||
"default" : 1,
|
||||
"append" : "x100ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": false
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 5
|
||||
},
|
||||
"switchOffOnBlack": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_switchOffOnBlack_title",
|
||||
"default" : false,
|
||||
"propertyOrder" : 6
|
||||
},
|
||||
"restoreOriginalState": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_restoreOriginalState_title",
|
||||
"default" : true,
|
||||
"propertyOrder" : 7
|
||||
},
|
||||
"lightIds": {
|
||||
"type": "array",
|
||||
"title":"edt_dev_spec_lightid_title",
|
||||
"minItems": 1,
|
||||
"uniqueItems" : true,
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"minimum" : 0,
|
||||
"title" : "edt_dev_spec_lightid_itemtitle"
|
||||
},
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": false
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 8
|
||||
},
|
||||
"groupId": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_groupId_title",
|
||||
"default" : 0,
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 9
|
||||
},
|
||||
"blackLightsTimeout": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_blackLightsTimeout_title",
|
||||
"default" : 15000,
|
||||
"step": 500,
|
||||
"minimum" : 10000,
|
||||
"maximum" : 60000,
|
||||
"access" : "advanced",
|
||||
"append" : "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 10
|
||||
},
|
||||
"brightnessThreshold": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_brightnessThreshold_title",
|
||||
"default" : 0,
|
||||
"step": 0.005,
|
||||
"minimum" : 0,
|
||||
"maximum" : 1.0,
|
||||
"access" : "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 11
|
||||
},
|
||||
"brightnessFactor": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_brightnessFactor_title",
|
||||
"default" : 1.0,
|
||||
"step": 0.25,
|
||||
"minimum" : 0.5,
|
||||
"maximum" : 10.0,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 12
|
||||
},
|
||||
"brightnessMin": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_brightnessMin_title",
|
||||
"default" : 0,
|
||||
"step": 0.05,
|
||||
"minimum" : 0,
|
||||
"maximum" : 1.0,
|
||||
"access" : "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 13
|
||||
},
|
||||
"brightnessMax": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_brightnessMax_title",
|
||||
"default" : 1.0,
|
||||
"step": 0.05,
|
||||
"minimum" : 0,
|
||||
"maximum" : 1.0,
|
||||
"access" : "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 14
|
||||
},
|
||||
"sslReadTimeout": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_sslReadTimeout_title",
|
||||
"default" : 0,
|
||||
"step": 100,
|
||||
"minimum" : 0,
|
||||
"maximum" : 30000,
|
||||
"access" : "expert",
|
||||
"append" : "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 15
|
||||
},
|
||||
"sslHSTimeoutMin": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_sslHSTimeoutMin_title",
|
||||
"default" : 400,
|
||||
"step": 100,
|
||||
"minimum" : 0,
|
||||
"maximum" : 30000,
|
||||
"access" : "expert",
|
||||
"append" : "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 16
|
||||
},
|
||||
"sslHSTimeoutMax": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_sslHSTimeoutMax_title",
|
||||
"default" : 1000,
|
||||
"step": 100,
|
||||
"minimum" : 0,
|
||||
"maximum" : 30000,
|
||||
"access" : "expert",
|
||||
"append" : "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 17
|
||||
},
|
||||
"verbose": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_verbose_title",
|
||||
"default" : false,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 18
|
||||
},
|
||||
"debugStreamer": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_debugStreamer_title",
|
||||
"default" : false,
|
||||
"access" : "expert",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 19
|
||||
},
|
||||
"debugLevel": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_debugLevel_title",
|
||||
"enum" : ["0", "1", "2", "3", "4"],
|
||||
"default" : "0",
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_dl_nodebug", "edt_conf_enum_dl_error", "edt_conf_enum_dl_statechange", "edt_conf_enum_dl_informational", "edt_conf_enum_dl_verbose"],
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"minimum" : 0,
|
||||
"maximum" : 4,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 20
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_targetIp_title",
|
||||
"default": "",
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_username_title",
|
||||
"default": "",
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"clientkey": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_clientKey_title",
|
||||
"default": "",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 3
|
||||
},
|
||||
"useEntertainmentAPI": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_useEntertainmentAPI_title",
|
||||
"default": false,
|
||||
"propertyOrder": 4
|
||||
},
|
||||
"transitiontime": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_transistionTime_title",
|
||||
"default": 1,
|
||||
"append": "x100ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": false
|
||||
}
|
||||
},
|
||||
"propertyOrder": 5
|
||||
},
|
||||
"switchOffOnBlack": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_switchOffOnBlack_title",
|
||||
"default": false,
|
||||
"propertyOrder": 6
|
||||
},
|
||||
"restoreOriginalState": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_restoreOriginalState_title",
|
||||
"default": true,
|
||||
"propertyOrder": 7
|
||||
},
|
||||
"lightIds": {
|
||||
"type": "array",
|
||||
"title": "edt_dev_spec_lightid_title",
|
||||
"minimum": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"required": true,
|
||||
"title": "edt_dev_spec_lightid_itemtitle"
|
||||
},
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": false
|
||||
}
|
||||
},
|
||||
"propertyOrder": 8
|
||||
},
|
||||
"groupId": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_groupId_title",
|
||||
"default": 0,
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 9
|
||||
},
|
||||
"blackLightsTimeout": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_blackLightsTimeout_title",
|
||||
"default": 15000,
|
||||
"step": 500,
|
||||
"minimum": 10000,
|
||||
"maximum": 60000,
|
||||
"access": "advanced",
|
||||
"append": "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 10
|
||||
},
|
||||
"brightnessThreshold": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_brightnessThreshold_title",
|
||||
"default": 0,
|
||||
"step": 0.005,
|
||||
"minimum": 0,
|
||||
"maximum": 1.0,
|
||||
"access": "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 11
|
||||
},
|
||||
"brightnessFactor": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_brightnessFactor_title",
|
||||
"default": 1.0,
|
||||
"step": 0.25,
|
||||
"minimum": 0.5,
|
||||
"maximum": 10.0,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 12
|
||||
},
|
||||
"brightnessMin": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_brightnessMin_title",
|
||||
"default": 0,
|
||||
"step": 0.05,
|
||||
"minimum": 0,
|
||||
"maximum": 1.0,
|
||||
"access": "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 13
|
||||
},
|
||||
"brightnessMax": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_brightnessMax_title",
|
||||
"default": 1.0,
|
||||
"step": 0.05,
|
||||
"minimum": 0,
|
||||
"maximum": 1.0,
|
||||
"access": "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 14
|
||||
},
|
||||
"sslReadTimeout": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_sslReadTimeout_title",
|
||||
"default": 0,
|
||||
"step": 100,
|
||||
"minimum": 0,
|
||||
"maximum": 30000,
|
||||
"access": "expert",
|
||||
"append": "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 15
|
||||
},
|
||||
"sslHSTimeoutMin": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_sslHSTimeoutMin_title",
|
||||
"default": 400,
|
||||
"step": 100,
|
||||
"minimum": 0,
|
||||
"maximum": 30000,
|
||||
"access": "expert",
|
||||
"append": "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 16
|
||||
},
|
||||
"sslHSTimeoutMax": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_sslHSTimeoutMax_title",
|
||||
"default": 1000,
|
||||
"step": 100,
|
||||
"minimum": 0,
|
||||
"maximum": 30000,
|
||||
"access": "expert",
|
||||
"append": "edt_append_ms",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 17
|
||||
},
|
||||
"verbose": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_verbose_title",
|
||||
"default": false,
|
||||
"access": "expert",
|
||||
"propertyOrder": 18
|
||||
},
|
||||
"debugStreamer": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_debugStreamer_title",
|
||||
"default": false,
|
||||
"access": "expert",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 19
|
||||
},
|
||||
"debugLevel": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_debugLevel_title",
|
||||
"enum": [ "0", "1", "2", "3", "4" ],
|
||||
"default": "0",
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_dl_nodebug", "edt_conf_enum_dl_error", "edt_conf_enum_dl_statechange", "edt_conf_enum_dl_informational", "edt_conf_enum_dl_verbose" ],
|
||||
"dependencies": {
|
||||
"useEntertainmentAPI": true
|
||||
}
|
||||
},
|
||||
"minimum": 0,
|
||||
"maximum": 4,
|
||||
"access": "expert",
|
||||
"propertyOrder": 20
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"default" : "/dev/spidev0.0",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
|
@@ -1,30 +1,84 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"host" : {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_targetIpHost_title",
|
||||
"required": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"restoreOriginalState": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_restoreOriginalState_title",
|
||||
"default": false,
|
||||
"required": true,
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"type": "object",
|
||||
"title": "",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"hostList": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_devices_discovered_title",
|
||||
"enum": [ "NONE" ],
|
||||
"options": {
|
||||
"enum_titles": [ "edt_dev_spec_devices_discovery_inprogress" ],
|
||||
"infoText": "edt_dev_spec_devices_discovered_title_info"
|
||||
},
|
||||
"required": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_targetIpHost_title",
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_targetIpHost_title_info"
|
||||
},
|
||||
"required": true,
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"restoreOriginalState": {
|
||||
"type": "boolean",
|
||||
"format": "checkbox",
|
||||
"title": "edt_dev_spec_restoreOriginalState_title",
|
||||
"default": false,
|
||||
"required": true,
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_restoreOriginalState_title_info"
|
||||
},
|
||||
"propertyOrder": 3
|
||||
},
|
||||
"overwriteSync": {
|
||||
"type": "boolean",
|
||||
"format": "checkbox",
|
||||
"title": "edt_dev_spec_syncOverwrite_title",
|
||||
"default": true,
|
||||
"required": true,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 4
|
||||
},
|
||||
"overwriteBrightness": {
|
||||
"type": "boolean",
|
||||
"format": "checkbox",
|
||||
"title": "edt_dev_spec_brightnessOverwrite_title",
|
||||
"default": true,
|
||||
"required": true,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 5
|
||||
},
|
||||
"brightness": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_brightness_title",
|
||||
"default": 255,
|
||||
"minimum": 1,
|
||||
"maximum": 255,
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"overwriteBrightness": true
|
||||
}
|
||||
},
|
||||
"access": "advanced",
|
||||
"propertyOrder": 6
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_latchtime_title",
|
||||
"default": 0,
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access": "expert",
|
||||
"options": {
|
||||
"infoText": "edt_dev_spec_latchtime_title_info"
|
||||
},
|
||||
"propertyOrder": 7
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1","/dev/spidev1.0","/dev/spidev1.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"output": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_spipath_title",
|
||||
"enum" : ["/dev/spidev0.0","/dev/spidev0.1"],
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rate": {
|
||||
|
@@ -1,180 +1,176 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"colorModel": {
|
||||
"type": "integer",
|
||||
"title":"Output Type",
|
||||
"enum" : [0, 1],
|
||||
"default" : 1,
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_hsv", "edt_conf_enum_rgb"]
|
||||
},
|
||||
"minimum" : 0,
|
||||
"maximum" : 1,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"transEffect": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_transeffect_title",
|
||||
"enum" : [0, 1],
|
||||
"default" : 0,
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_transeffect_smooth", "edt_conf_enum_transeffect_sudden" ]
|
||||
},
|
||||
"minimum" : 0,
|
||||
"maximum" : 1,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"transTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_transistionTime_title",
|
||||
"default": 40,
|
||||
"append" : "ms",
|
||||
"minimum": 30,
|
||||
"maximum": 5000,
|
||||
"access" : "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"transEffect": 0
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"extraTimeDarkness": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_transistionTimeExtra_title",
|
||||
"default" : 0,
|
||||
"step": 100,
|
||||
"minimum" : 0,
|
||||
"maximum" : 8000,
|
||||
"append" : "ms",
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"brightnessMin": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_brightnessMin_title",
|
||||
"default" : 1,
|
||||
"step": 1,
|
||||
"minimum" : 1,
|
||||
"maximum" : 99,
|
||||
"append" : "%",
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 5
|
||||
},
|
||||
"brightnessSwitchOffOnMinimum": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_switchOffOnbelowMinBrightness_title",
|
||||
"default" : true,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 6
|
||||
},
|
||||
"brightnessMax": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_brightnessMax_title",
|
||||
"default" : 100,
|
||||
"step": 1,
|
||||
"minimum" : 0,
|
||||
"maximum" : 100,
|
||||
"append" : "%",
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 7
|
||||
},
|
||||
"brightnessFactor": {
|
||||
"type": "number",
|
||||
"title":"edt_dev_spec_brightnessFactor_title",
|
||||
"default" : 1.0,
|
||||
"step": 0.25,
|
||||
"minimum" : 0.5,
|
||||
"maximum" : 10.0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 8
|
||||
},
|
||||
"restoreOriginalState": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_restoreOriginalState_title",
|
||||
"default" : false,
|
||||
"propertyOrder" : 9
|
||||
},
|
||||
"lights": {
|
||||
"type": "array",
|
||||
"title":"edt_dev_spec_lights_title",
|
||||
"propertyOrder" : 9,
|
||||
"minimum" : 1,
|
||||
"uniqueItems" : true,
|
||||
"items" : {
|
||||
"type" : "object",
|
||||
"title" : "edt_dev_spec_lights_itemtitle",
|
||||
"required" : true,
|
||||
"properties" :
|
||||
{
|
||||
"host" :
|
||||
{
|
||||
"type" : "string",
|
||||
"minimum" : 7,
|
||||
"title" : "edt_dev_spec_networkDeviceName_title",
|
||||
"required" : true,
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"port" :
|
||||
{
|
||||
"type" : "integer",
|
||||
"minimum" : 0,
|
||||
"maximum" : 65535,
|
||||
"default":55443,
|
||||
"title" : "edt_dev_spec_networkDevicePort_title",
|
||||
"required" : false,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"name" :
|
||||
{
|
||||
"type" : "string",
|
||||
"title" : "edt_dev_spec_lights_name",
|
||||
"minimum" : 0,
|
||||
"propertyOrder" : 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 10
|
||||
},
|
||||
"quotaWait": {
|
||||
"type": "integer",
|
||||
"title":"Wait time (quota)",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 10000,
|
||||
"step": 100,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 11
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 40,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 12
|
||||
},
|
||||
"debugLevel": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_debugLevel_title",
|
||||
"enum" : [0, 1, 2, 3],
|
||||
"default" : 0,
|
||||
"options" : {
|
||||
"enum_titles" : ["edt_conf_enum_dl_nodebug", "edt_conf_enum_dl_verbose1", "edt_conf_enum_dl_verbose2", "edt_conf_enum_dl_verbose3"]
|
||||
},
|
||||
"minimum" : 0,
|
||||
"maximum" : 3,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 13
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"colorModel": {
|
||||
"type": "string",
|
||||
"title": "Output Type",
|
||||
"enum": [ "0", "1" ],
|
||||
"default": "1",
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_hsv", "edt_conf_enum_rgb" ]
|
||||
},
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"transEffect": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_transeffect_title",
|
||||
"enum": [ "0", "1" ],
|
||||
"default": "0",
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_transeffect_smooth", "edt_conf_enum_transeffect_sudden" ]
|
||||
},
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"transTime": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_transistionTime_title",
|
||||
"default": 40,
|
||||
"append": "ms",
|
||||
"minimum": 30,
|
||||
"maximum": 5000,
|
||||
"access": "advanced",
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"transEffect": 0
|
||||
}
|
||||
},
|
||||
"propertyOrder": 3
|
||||
},
|
||||
"extraTimeDarkness": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_transistionTimeExtra_title",
|
||||
"default": 0,
|
||||
"step": 100,
|
||||
"minimum": 0,
|
||||
"maximum": 8000,
|
||||
"append": "ms",
|
||||
"access": "advanced",
|
||||
"propertyOrder": 4
|
||||
},
|
||||
"brightnessMin": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_brightnessMin_title",
|
||||
"default": 1,
|
||||
"step": 1,
|
||||
"minimum": 1,
|
||||
"maximum": 99,
|
||||
"append": "%",
|
||||
"access": "advanced",
|
||||
"propertyOrder": 5
|
||||
},
|
||||
"brightnessSwitchOffOnMinimum": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_switchOffOnbelowMinBrightness_title",
|
||||
"default": true,
|
||||
"access": "advanced",
|
||||
"propertyOrder": 6
|
||||
},
|
||||
"brightnessMax": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_brightnessMax_title",
|
||||
"default": 100,
|
||||
"step": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"append": "%",
|
||||
"access": "advanced",
|
||||
"propertyOrder": 7
|
||||
},
|
||||
"brightnessFactor": {
|
||||
"type": "number",
|
||||
"title": "edt_dev_spec_brightnessFactor_title",
|
||||
"default": 1.0,
|
||||
"step": 0.25,
|
||||
"minimum": 0.5,
|
||||
"maximum": 10.0,
|
||||
"access": "expert",
|
||||
"propertyOrder": 8
|
||||
},
|
||||
"restoreOriginalState": {
|
||||
"type": "boolean",
|
||||
"title": "edt_dev_spec_restoreOriginalState_title",
|
||||
"default": false,
|
||||
"propertyOrder": 9
|
||||
},
|
||||
"lights": {
|
||||
"type": "array",
|
||||
"title": "edt_dev_spec_lights_title",
|
||||
"propertyOrder": 9,
|
||||
"minimum": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"title": "edt_dev_spec_lights_itemtitle",
|
||||
"required": true,
|
||||
"properties": {
|
||||
"host": {
|
||||
"type": "string",
|
||||
"minLength": 7,
|
||||
"title": "edt_dev_spec_networkDeviceName_title",
|
||||
"required": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 65535,
|
||||
"default": 55443,
|
||||
"title": "edt_dev_spec_networkDevicePort_title",
|
||||
"required": false,
|
||||
"access": "expert",
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_lights_name",
|
||||
"minimum": 0,
|
||||
"propertyOrder": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"propertyOrder": 10
|
||||
},
|
||||
"quotaWait": {
|
||||
"type": "integer",
|
||||
"title": "Wait time (quota)",
|
||||
"default": 1000,
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 10000,
|
||||
"step": 100,
|
||||
"access": "expert",
|
||||
"propertyOrder": 11
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title": "edt_dev_spec_latchtime_title",
|
||||
"default": 40,
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access": "expert",
|
||||
"propertyOrder": 12
|
||||
},
|
||||
"debugLevel": {
|
||||
"type": "string",
|
||||
"title": "edt_dev_spec_debugLevel_title",
|
||||
"enum": [ "0", "1", "2", "3" ],
|
||||
"default": "0",
|
||||
"options": {
|
||||
"enum_titles": [ "edt_conf_enum_dl_nodebug", "edt_conf_enum_dl_verbose1", "edt_conf_enum_dl_verbose2", "edt_conf_enum_dl_verbose3" ]
|
||||
},
|
||||
"minimum": 0,
|
||||
"maximum": 3,
|
||||
"access": "expert",
|
||||
"propertyOrder": 13
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
Reference in New Issue
Block a user