diff --git a/assets/webconfig/content/general.html b/assets/webconfig/content/general.html
new file mode 100644
index 00000000..e752ef65
--- /dev/null
+++ b/assets/webconfig/content/general.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
Save Settings
+
+
+
+
+
diff --git a/assets/webconfig/i18n/de.json b/assets/webconfig/i18n/de.json
index b44f4ee9..66face1a 100644
--- a/assets/webconfig/i18n/de.json
+++ b/assets/webconfig/i18n/de.json
@@ -47,6 +47,7 @@
"dashboard_alert_message_confedit" : "Deine Hyperion Konfiguration wurde verändert. Um die Änderungen anzuwenden, starte Hyperion neu.",
"main_menu_dashboard_token" : "Dashboard",
"main_menu_configuration_token" : "Konfiguration",
+ "main_menu_general_conf_token" : "Allgemein",
"main_menu_leds_conf_token" : "LED Hardware",
"main_menu_grabber_conf_token" : "Aufnahme Hardware",
"main_menu_effect_conf_token" : "Effekte",
@@ -60,7 +61,9 @@
"main_menu_system_token" : "System",
"main_menu_input_selection_token" : "Eingabeauswahl",
"main_menu_logging_token" : "Protokoll",
- "main_menu_webconfig_token" : "Webkonfiguration",
+ "main_menu_webconfig_token" : "Web konfiguration",
+ "conf_general_label_title" : "All Einstellungen",
+ "conf_general_label_intro" : " ",
"conf_helptable_option" : "Option",
"conf_helptable_expl" : "Erklärung",
"conf_effects_label_intro" : "Stelle einen Effekt oder Farbe ein, der beim Starten sichtbar sein soll. Stelle einen Hintergrundeffekt/Farbe ein der erst sichtbar wird, wenn alle Bildquellen abgeschaltet sind (Das gilt ebenfalls für temporäres abschalten mithilfe der Kodi Überwachung).",
@@ -206,11 +209,12 @@
"InfoDialog_lang_text" : "Sollte dir die Vorauswahl der automatischen Spracherkennung nicht gefallen, kannst du die Sprache hier manuell festlegen.",
"InfoDialog_access_title" : "Zugriffsstufe",
"InfoDialog_access_text" : "Abhängig von der Stufe hast du Zugriff auf mehr oder weniger Einstellungen. Empfohlen ist 'Standard'.",
+ "edt_general_heading_title" : "Allgemeine Einstellungen",
+ "edt_general_name_title" : "Name der Konfiguration",
"InfoDialog_nowrite_title" : "Fehler beim Schreibzugriff!",
"InfoDialog_nowrite_text" : "Hyperion hat keinen Schreibzugriff auf die aktuell geladene Konfiguration. Bitte korrigiere die Dateizugriffsrechte um fortzufahren.",
"InfoDialog_nowrite_foottext" : "Die Webkonfiguration wird automatisch wieder freigegeben, sobald das Problem behoben wurde!",
"edt_dev_general_heading_title" : "Allgemeine Einstellungen",
- "edt_dev_general_name_title" : "Name der Konfiguration",
"edt_dev_general_ledCount_title" : "Anzahl Hardware LEDs",
"edt_dev_general_colorOrder_title" : "RGB Byte Reihenfolge",
"edt_dev_general_rewriteTime_title" : "Aktualisierungszeit",
diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json
index 31365e5d..a8bbd8ad 100644
--- a/assets/webconfig/i18n/en.json
+++ b/assets/webconfig/i18n/en.json
@@ -47,6 +47,7 @@
"dashboard_alert_message_confedit" : "Your Hyperion configuration has been modified. To apply it, restart Hyperion.",
"main_menu_dashboard_token" : "Dashboard",
"main_menu_configuration_token" : "Configuration",
+ "main_menu_general_conf_token" : "General",
"main_menu_leds_conf_token" : "LED Hardware",
"main_menu_grabber_conf_token" : "Capturing Hardware",
"main_menu_effect_conf_token" : "Effects",
@@ -58,9 +59,11 @@
"main_menu_support_token" : "Support",
"main_menu_update_token" : "Update",
"main_menu_system_token" : "System",
- "main_menu_input_selection_token" : "Eingabeauswahl",
+ "main_menu_input_selection_token" : "Input Selection",
"main_menu_logging_token" : "Log",
- "main_menu_webconfig_token" : "Webconfiguration",
+ "main_menu_webconfig_token" : "Web configuration",
+ "conf_general_label_title" : "General setings",
+ "conf_general_label_intro" : " ",
"conf_helptable_option" : "Option",
"conf_helptable_expl" : "Explanation",
"conf_effects_label_intro" : "Setting up a booteffect/color that is visible after Hyperion startup. Configure a background effect/color which is active, when all capture sources are disabled (also temporarily via Kodi Watch)",
@@ -206,6 +209,8 @@
"InfoDialog_lang_text" : "If you don't like the result of the automatic language detection you could overwrite it here.",
"InfoDialog_access_title" : "Level setting",
"InfoDialog_access_text" : "Depending on settings level you could change more or less settings. Recommended is the default level.",
+ "edt_general_heading_title" : "General Settings",
+ "edt_general_name_title" : "Configuration name",
"InfoDialog_nowrite_title" : "write permission error!",
"InfoDialog_nowrite_text" : "Hyperion can't write to your current loaded configuration file. Please repair the file permissions to proceed.",
"InfoDialog_nowrite_foottext" : "The WebUI will be unlocked automatically after you solved the problem!",
diff --git a/assets/webconfig/index.html b/assets/webconfig/index.html
index 9c8a38b9..c1975827 100644
--- a/assets/webconfig/index.html
+++ b/assets/webconfig/index.html
@@ -185,6 +185,7 @@
Configuration
+ General
LED Hardware
Capturing Hardware
Effects
diff --git a/assets/webconfig/js/content_general.js b/assets/webconfig/js/content_general.js
new file mode 100644
index 00000000..b0e4ab48
--- /dev/null
+++ b/assets/webconfig/js/content_general.js
@@ -0,0 +1,21 @@
+
+var conf_editor = null;
+$(hyperion).one("cmd-config-getschema", function(event) {
+ schema = parsedConfSchemaJSON.properties;
+ conf_editor = createJsonEditor('editor_container', {
+ general: schema.general
+ }, true);
+
+ $('#editor_container h3').remove();
+
+ $('#btn_submit').off().on('click',function() {
+ requestWriteConfig(conf_editor.getValue());
+ });
+});
+
+
+$(document).ready( function() {
+ performTranslation();
+ requestServerConfigSchema();
+});
+
diff --git a/assets/webconfig/js/content_index.js b/assets/webconfig/js/content_index.js
index 19d63eb6..4fb59914 100644
--- a/assets/webconfig/js/content_index.js
+++ b/assets/webconfig/js/content_index.js
@@ -9,9 +9,10 @@ $(document).ready( function() {
bindNavToContent("#load_remote","remote",false);
bindNavToContent("#load_huebridge","huebridge",false);
bindNavToContent("#load_support","support",false);
- bindNavToContent("#load_confKodi","kodiconf",false);
bindNavToContent("#load_update","update",false);
+ bindNavToContent("#load_confGeneral","general",false);
bindNavToContent("#load_confEffects","effects",false);
+ bindNavToContent("#load_confKodi","kodiconf",false);
bindNavToContent("#load_confLeds","leds",false);
bindNavToContent("#load_confGrabber","grabber",false);
bindNavToContent("#load_confColors","colors",false);
diff --git a/config/hyperion.config.json.commented b/config/hyperion.config.json.commented
index c8677afe..3ac6713d 100644
--- a/config/hyperion.config.json.commented
+++ b/config/hyperion.config.json.commented
@@ -4,6 +4,14 @@
{
+ /// geenral Settings
+ /// * 'name' : The user friendly name of the hyperion instance (used for network things)
+ /// * 'configVersion' : don't touch it's an internal value regarding which validation schema for this config is used
+ "general" :
+ {
+ "name" : "MyHyperionConfig",
+ "configVersion" : 2
+ },
/// set log level: silent warn verbose debug
"logger" :
{
@@ -19,7 +27,6 @@
/// * 'rewriteTime': in ms. Data is resend to leds, if no new data is available in thistime. 0 means no refresh
"device" :
{
- "name" : "MyHyperionConfig",
"type" : "file",
"output" : "/dev/null",
"rate" : 1000000,
diff --git a/config/hyperion.config.json.default b/config/hyperion.config.json.default
index 46a8e459..b4e1e02f 100644
--- a/config/hyperion.config.json.default
+++ b/config/hyperion.config.json.default
@@ -1,4 +1,9 @@
{
+ "general" :
+ {
+ "name" : "MyHyperionConfig",
+ "configVersion" : 2
+ },
"logger" :
{
"level" : "warn"
diff --git a/include/hyperion/Hyperion.h b/include/hyperion/Hyperion.h
index 5481de5d..0885d199 100644
--- a/include/hyperion/Hyperion.h
+++ b/include/hyperion/Hyperion.h
@@ -185,6 +185,8 @@ public:
/// gets the methode how image is maped to leds
int getLedMappingType() { return _ledMAppingType; };
+
+ int getConfigVersionId() { return _configVersionId; };
public slots:
///
@@ -411,4 +413,6 @@ private:
QSize _ledGridSize;
int _ledMAppingType;
+
+ int _configVersionId;
};
diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp
index 7145b69c..b722b678 100644
--- a/libsrc/hyperion/Hyperion.cpp
+++ b/libsrc/hyperion/Hyperion.cpp
@@ -587,6 +587,9 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
// initialize hash of current config
configModified();
+ const QJsonObject & generalConfig = qjsonConfig["general"].toObject();
+ _configVersionId = generalConfig["configVersion"].toInt(-1);
+
// initialize the leds
update();
}
diff --git a/libsrc/hyperion/hyperion.schema.json b/libsrc/hyperion/hyperion.schema.json
index dcd40a1d..97358106 100644
--- a/libsrc/hyperion/hyperion.schema.json
+++ b/libsrc/hyperion/hyperion.schema.json
@@ -3,1247 +3,12 @@
"required" : true,
"properties" :
{
- "logger" :
- {
- "type" : "object",
- "title" : "edt_conf_log_heading_title",
- "properties" :
- {
- "level" :
- {
- "type" : "string",
- "enum" : ["silent", "warn", "verbose", "debug"],
- "title" : "edt_conf_log_level_title",
- "default" : "warn"
- }
- },
- "additionalProperties" : false
- },
- "device" :
- {
- "type" : "object",
- "title" : "edt_dev_general_heading_title",
- "required" : true,
- "defaultProperties": ["name","ledCount","colorOrder","rewriteTime"],
- "properties" :
- {
- "name" :
- {
- "type" : "string",
- "title" : "edt_dev_general_name_title",
- "required" : true,
- "propertyOrder" : 1
- },
- "type" :
- {
- "type" : "string",
- "required" : true
- },
- "ledCount" :
- {
- "type" : "integer",
- "minimum" : 0,
- "title" : "edt_dev_general_ledCount_title",
- "propertyOrder" : 2
- },
- "colorOrder" :
- {
- "type" : "string",
- "title" : "edt_dev_general_colorOrder_title",
- "enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"],
- "default" : "rgb",
- "propertyOrder" : 3
- },
- "rewriteTime": {
- "type": "integer",
- "title":"edt_dev_general_rewriteTime_title",
- "default": 5000,
- "append" : "edt_append_ms",
- "minimum": 0,
- "access" : "expert",
- "propertOrder" : 4
- }
- },
- "additionalProperties" : true
- },
- "color" :
- {
- "type":"object",
- "title" : "edt_conf_color_heading_title",
- "required" : true,
- "defaultProperties": ["imageToLedMappingType","channelAdjustment_enable","channelAdjustment","transform_enable","transform"],
- "properties":
- {
- "imageToLedMappingType" :
- {
- "type" : "string",
- "enum" : ["multicolor_mean", "unicolor_mean"],
- "default" : "multicolor_mean",
- "propertyOrder" : 1
- },
- "channelAdjustment_enable" :
- {
- "type" : "boolean",
- "default" : true,
- "propertyOrder" : 2
- },
- "channelAdjustment_v4l_only" :
- {
- "type" : "boolean",
- "default" : false,
- "propertyOrder" : 3
- },
- "channelAdjustment" :
- {
- "type" : "array",
- "required" : true,
- "propertyOrder" : 4,
- "items" :
- {
- "type" : "object",
- "required" : true,
- "properties" :
- {
- "id" :
- {
- "type" : "string",
- "required" : true
- },
- "leds" :
- {
- "type" : "string",
- "required" : true
- },
- "pureRed" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "redChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- },
- "greenChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- },
- "blueChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- }
- },
- "additionalProperties" : false
- },
- "pureGreen" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "redChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- },
- "greenChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- },
- "blueChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- }
- },
- "additionalProperties" : false
- },
- "pureBlue" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "redChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- },
- "greenChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- },
- "blueChannel" :
- {
- "type": "integer",
- "required" : true,
- "minimum": 0,
- "maximum": 255
- }
- },
- "additionalProperties" : false
- }
- },
- "additionalProperties" : false
- }
- },
- "transform_enable" :
- {
- "type" : "boolean",
- "default" : true,
- "propertyOrder" : 5
- },
- "transform_v4l_only" :
- {
- "type" : "boolean",
- "default" : false,
- "propertyOrder" : 6
- },
- "transform" :
- {
- "type" : "array",
- "required" : true,
- "propertyOrder" : 7,
- "items" :
- {
- "type" : "object",
- "required" : true,
- "properties" :
- {
- "id" :
- {
- "type" : "string",
- "required" : true
- },
- "leds" :
- {
- "type" : "string",
- "required" : true
- },
- "hsv" : {
- "type" : "object",
- "required" : false,
- "properties" : {
- "saturationGain" : {
- "type" : "number",
- "required" : false,
- "minimum" : 0.0
- },
- "valueGain" : {
- "type" : "number",
- "required" : false,
- "minimum" : 0.0
- }
- },
- "additionalProperties" : false
- },
- "hsl" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "saturationGain" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0
- },
- "luminanceGain" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0
- },
- "luminanceMinimum" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0
- }
- },
- "additionalProperties" : false
- },
- "red" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "threshold" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0,
- "maximum": 1.0
- },
- "gamma" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0,
- "maximum": 100.0
- }
- },
- "additionalProperties" : false
- },
- "green" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "threshold" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0,
- "maximum": 1.0
- },
- "gamma" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0,
- "maximum": 100.0
- }
- },
- "additionalProperties" : false
- },
- "blue" :
- {
- "type":"object",
- "required" : true,
- "properties":
- {
- "threshold" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0,
- "maximum": 1.0
- },
- "gamma" :
- {
- "type" : "number",
- "required" : true,
- "minimum" : 0.0,
- "maximum": 100.0
- }
- },
- "additionalProperties" : false
- }
- },
- "additionalProperties" : false
- }
- }
- },
- "additionalProperties" : false
- },
- "smoothing":
- {
- "type" : "object",
- "title" : "edt_conf_smooth_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : true,
- "propertyOrder" : 1
- },
- "type" :
- {
- "type" : "string",
- "title" : "edt_conf_smooth_type_title",
- "enum" : ["linear"],
- "default" : "linear",
- "propertyOrder" : 2
- },
- "time_ms" :
- {
- "type" : "integer",
- "title" : "edt_conf_smooth_time_ms_title",
- "minimum" : 25,
- "maximum": 600,
- "default" : 200,
- "append" : "edt_append_ms",
- "propertyOrder" : 3
- },
- "updateFrequency" :
- {
- "type" : "number",
- "title" : "edt_conf_smooth_updateFrequency_title",
- "minimum" : 1.0,
- "maximum" : 100.0,
- "default" : 25.0,
- "append" : "edt_append_hz",
- "propertyOrder" : 4
- },
- "updateDelay" :
- {
- "type" : "integer",
- "title" : "edt_conf_smooth_updateDelay_title",
- "minimum" : 0,
- "maximum": 2048,
- "default" : 0,
- "append" : "edt_append_ms",
- "propertyOrder" : 5
- },
- "continuousOutput" :
- {
- "type" : "boolean",
- "title" : "edt_conf_smooth_continuousOutput_title",
- "default" : true,
- "propertyOrder" : 6
- }
- },
- "additionalProperties" : false
- },
- "grabberV4L2" :
- {
- "type":"array",
- "title" : "edt_conf_v4l2_heading_title",
- "minItems": 1,
- "maxItems": 2,
- "items":
- {
- "type" : "object",
- "title" : "edt_conf_v4l2_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : false,
- "propertyOrder" : 1
- },
- "device" :
- {
- "type" : "string",
- "title" : "edt_conf_v4l2_device_title",
- "default" : "auto",
- "propertyOrder" : 2
- },
- "input" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_input_title",
- "minimum" : 0,
- "default" : 0,
- "propertyOrder" : 3
- },
- "standard" :
- {
- "type" : "string",
- "title" : "edt_conf_v4l2_standard_title",
- "enum" : ["PAL","NTSC"],
- "default" : "PAL",
- "propertyOrder" : 4
- },
- "width" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_width_title",
- "minimum" : -1,
- "default" : -1,
- "append" : "edt_append_pixel",
- "propertyOrder" : 5
- },
- "height" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_height_title",
- "minimum" : -1,
- "default" : -1,
- "append" : "edt_append_pixel",
- "propertyOrder" : 6
- },
- "frameDecimation" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_frameDecimation_title",
- "minimum" : 0,
- "default" : 2,
- "propertyOrder" : 7
- },
- "sizeDecimation" :
- {
- "type" : "integer",
- "title" : "Size decimation",
- "minimum" : 0,
- "default" : 6,
- "propertyOrder" : 8
- },
- "priority" :
- {
- "type" : "integer",
- "minimum" : 100,
- "maximum" : 2000000000,
- "title" : "edt_conf_general_priority_title",
- "default" : 900,
- "propertyOrder" : 9
- },
- "mode" :
- {
- "type" : "string",
- "title" : "edt_conf_v4l2_mode_title",
- "enum" : ["2D","3DSBS","3DTAB"],
- "default" : "2D",
- "propertyOrder" : 10
- },
- "useKodiChecker" :
- {
- "type" : "boolean",
- "title" : "edt_conf_v4l2_useKodiChecker_title",
- "default" : false,
- "propertyOrder" : 11
- },
- "cropLeft" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropLeft_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel",
- "propertyOrder" : 12
- },
- "cropRight" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropRight_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel",
- "propertyOrder" : 13
- },
- "cropTop" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropTop_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel",
- "propertyOrder" : 14
- },
- "cropBottom" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropBottom_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel",
- "propertyOrder" : 15
- },
- "redSignalThreshold" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_redSignalThreshold_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.005,
- "append" : "edt_append_percent",
- "propertyOrder" : 16
- },
- "greenSignalThreshold" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_greenSignalThreshold_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.025,
- "append" : "edt_append_percent",
- "propertyOrder" : 17
- },
- "blueSignalThreshold" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_blueSignalThreshold_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.005,
- "append" : "edt_append_percent",
- "propertyOrder" : 18
- },
- "signalDetectionVerticalOffsetMin" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_signalDetectionVerticalOffsetMin_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.005,
- "append" : "edt_append_percent",
- "propertyOrder" : 19
- },
- "signalDetectionVerticalOffsetMax" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_signalDetectionVerticalOffsetMax_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.005,
- "append" : "edt_append_percent",
- "propertyOrder" : 20
- },
- "signalDetectionHorizontalOffsetMin" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_signalDetectionHorizontalOffsetMin_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.005,
- "append" : "edt_append_percent",
- "propertyOrder" : 21
- },
- "signalDetectionHorizontalOffsetMax" :
- {
- "type" : "number",
- "title" : "edt_conf_v4l2_signalDetectionHorizontalOffsetMax_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.1,
- "step" : 0.005,
- "append" : "edt_append_percent",
- "propertyOrder" : 22
- }
- },
- "additionalProperties" : false
- }
- },
- "framegrabber" :
- {
- "type" : "object",
- "title" : "edt_conf_fg_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : true,
- "propertyOrder" : 1
- },
- "type" :
- {
- "type" : "string",
- "title" : "edt_conf_fg_type_title",
- "enum" : ["auto","dispmanx","amlogic","x11","framebuffer"],
- "default" : "auto"
- },
- "width" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_width_title",
- "minimum" : 10,
- "default" : 80,
- "append" : "edt_append_pixel"
- },
- "height" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_height_title",
- "minimum" : 10,
- "default" : 45,
- "append" : "edt_append_pixel"
- },
- "frequency_Hz" :
- {
- "type" : "integer",
- "title" : "edt_conf_fg_frequency_Hz_title",
- "minimum" : 1,
- "default" : 10,
- "append" : "edt_append_hz"
- },
- "priority" :
- {
- "type" : "integer",
- "title" : "edt_conf_general_priority_title",
- "minimum" : 100,
- "maximum" : 2000000000,
- "default" : 890
- },
- "cropLeft" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropLeft_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel"
- },
- "cropRight" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropRight_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel"
- },
- "cropTop" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropTop_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel"
- },
- "cropBottom" :
- {
- "type" : "integer",
- "title" : "edt_conf_v4l2_cropBottom_title",
- "minimum" : 0,
- "default" : 0,
- "append" : "edt_append_pixel"
- },
- "useXGetImage" :
- {
- "type" : "boolean",
- "title" : "edt_conf_fg_useXGetImage_title",
- "default" : false
- },
- "horizontalPixelDecimation" :
- {
- "type" : "integer",
- "title" : "edt_conf_fg_horizontalPixelDecimation_title",
- "minimum" : 0,
- "default" : 8
- },
- "verticalPixelDecimation" :
- {
- "type" : "integer",
- "title" : "edt_conf_fg_verticalPixelDecimation_title",
- "minimum" : 0,
- "default" : 8
- },
- "device" :
- {
- "type" : "string",
- "title" : "edt_conf_fg_device_title",
- "default" : "/dev/fb0"
- },
- "display" :
- {
- "type" : "integer",
- "title" : "edt_conf_fg_display_title",
- "minimum" : 0
- }
- },
- "additionalProperties" : false
- },
- "blackborderdetector" :
- {
- "type" : "object",
- "title" : "edt_conf_bb_heading_title",
- "defaultProperties": ["enable","mode","threshold"],
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : true,
- "propertyOrder" : 1
- },
- "threshold" :
- {
- "type" : "number",
- "title" : "edt_conf_bb_threshold_title",
- "minimum" : 0.0,
- "maximum" : 1.0,
- "default" : 0.05,
- "step" : 0.01,
- "append" : "edt_append_percent",
- "propertyOrder" : 2
- },
- "unknownFrameCnt" :
- {
- "type" : "integer",
- "title" : "edt_conf_bb_unknownFrameCnt_title",
- "minimum" : 0,
- "default" : 600,
- "propertyOrder" : 3
- },
- "borderFrameCnt" :
- {
- "type" : "integer",
- "title" : "edt_conf_bb_borderFrameCnt_title",
- "minimum" : 0,
- "default" : 50,
- "propertyOrder" : 4
- },
- "maxInconsistentCnt" :
- {
- "type" : "integer",
- "title" : "edt_conf_bb_maxInconsistentCnt_title",
- "minimum" : 0,
- "default" : 10,
- "propertyOrder" : 5
- },
- "blurRemoveCnt" :
- {
- "type" : "integer",
- "title" : "edt_conf_bb_blurRemoveCnt_title",
- "minimum" : 0,
- "default" : 1,
- "propertyOrder" : 6
- },
- "mode" :
- {
- "type" : "string",
- "title": "edt_conf_bb_mode_title",
- "enum" : ["default", "classic", "osd"],
- "default" : "default",
- "propertyOrder" : 7
- }
- },
- "additionalProperties" : false
- },
- "kodiVideoChecker" :
- {
- "type" : "object",
- "title" : "edt_conf_kodic_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : false,
- "propertyOrder" : 1
- },
- "kodiAddress" :
- {
- "type" : "string",
- "title" : "edt_conf_kodic_kodiAddress_title",
- "default" : "127.0.0.1",
- "propertyOrder" : 2
- },
- "kodiTcpPort" :
- {
- "type" : "integer",
- "title" : "edt_conf_kodic_kodiTcpPort_title",
- "minimum" : 0,
- "maximum" : 65535,
- "default" : 9090,
- "propertyOrder" : 3
- },
- "grabVideo" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_grabVideo_title",
- "default" : true,
- "propertyOrder" : 4
- },
- "grabPictures" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_grabPictures_title",
- "default" : true,
- "propertyOrder" : 5
- },
- "grabAudio" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_grabAudio_title",
- "default" : true,
- "propertyOrder" : 6
- },
- "grabMenu" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_grabMenu_title",
- "default" : false,
- "propertyOrder" : 7
- },
- "grabPause" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_grabPause_title",
- "default" : false,
- "propertyOrder" : 8
- },
- "grabScreensaver" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_grabScreensaver_title",
- "default" : false,
- "propertyOrder" : 9
- },
- "enable3DDetection" :
- {
- "type" : "boolean",
- "title" : "edt_conf_kodic_enable3DDetection_title",
- "default" : false,
- "propertyOrder" : 10
- }
- },
- "additionalProperties" : false
- },
- "initialEffect" :
- {
- "type" : "object",
- "title" : "Initial Effect",
- "defaultProperties": ["background-effect","foreground-effect","foreground-duration_ms"],
- "properties" :
- {
- "background-effect" :
- {
- "type" : "array",
- "title" : "Background effect",
- "propertyOrder" : 3
- },
- "background-effect-args" :
- {
- "type" : "object",
- "title" : "Background effect arguments"
- },
- "foreground-effect" :
- {
- "type" : "array",
- "title" : "Boot effect",
- "propertyOrder" : 1
- },
- "foreground-effect-args" :
- {
- "type" : "object",
- "title" : "Boot effect arguments"
- },
- "foreground-duration_ms" :
- {
- "type" : "integer",
- "title" : "Boot effect duration",
- "propertyOrder" : 2
- }
- },
- "additionalProperties" : false
- },
- "forwarder" :
- {
- "type" : "object",
- "title" : "edt_conf_fw_heading_title",
- "required" : true,
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "propertyOrder" : 1
- },
- "json" :
- {
- "type" : "array",
- "title" : "edt_conf_fw_json_title",
- "items" : {
- "type": "string",
- "title" : "edt_conf_fw_json_itemtitle"
- },
- "propertyOrder" : 2
- },
- "proto" :
- {
- "type" : "array",
- "title" : "edt_conf_fw_proto_title",
- "items" : {
- "type": "string",
- "title" : "edt_conf_fw_proto_itemtitle"
- },
- "propertyOrder" : 3
- }
- },
- "additionalProperties" : false
- },
- "jsonServer" :
+ "general" :
{
"type" : "object",
"required" : true,
- "title" : "edt_conf_js_heading_title",
- "properties" :
- {
- "port" :
- {
- "type" : "integer",
- "required" : true,
- "title" : "edt_conf_general_port_title",
- "minimum" : 0,
- "maximum" : 65535,
- "default" : 19444
- }
- },
- "additionalProperties" : false
- },
- "protoServer" :
- {
- "type" : "object",
- "required" : true,
- "title" : "edt_conf_ps_heading_title",
- "properties" :
- {
- "port" :
- {
- "type" : "integer",
- "required" : true,
- "title" : "edt_conf_general_port_title",
- "minimum" : 0,
- "maximum" : 65535,
- "default" : 19445
- }
- },
- "additionalProperties" : false
- },
- "boblightServer" :
- {
- "type" : "object",
- "title" : "edt_conf_bobls_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : false,
- "propertyOrder" : 1
- },
- "port" :
- {
- "type" : "integer",
- "required" : true,
- "title" : "edt_conf_general_port_title",
- "minimum" : 0,
- "maximum" : 65535,
- "propertyOrder" : 2
- },
- "priority" :
- {
- "type" : "integer",
- "title" : "edt_conf_general_priority_title",
- "minimum" : 100,
- "maximum" : 2000000000,
- "default" : 800,
- "propertyOrder" : 3
- }
- },
- "additionalProperties" : false
- },
- "udpListener" :
- {
- "type" : "object",
- "title" : "edt_conf_udpl_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : false,
- "propertyOrder" : 1
- },
- "address" :
- {
- "type" : "string",
- "title" : "edt_conf_udpl_address_title",
- "default" : "239.255.28.01",
- "propertyOrder" : 2
- },
- "port" :
- {
- "type" : "integer",
- "title" : "edt_conf_general_port_title",
- "minimum" : 0,
- "maximum" : 65535,
- "default" : 2801,
- "propertyOrder" : 3
- },
- "priority" :
- {
- "type" : "integer",
- "title" : "edt_conf_general_priority_title",
- "minimum" : 100,
- "maximum" : 2000000000,
- "default" : 800,
- "propertyOrder" : 4
- },
- "timeout" :
- {
- "type" : "integer",
- "title" : "edt_conf_udpl_timeout_title",
- "minimum" : 1000,
- "default" : 10000,
- "append" : "edt_append_ms",
- "propertyOrder" : 5
- },
- "shared" :
- {
- "type" : "boolean",
- "title" : "edt_conf_udpl_shared_title",
- "default" : false,
- "propertyOrder" : 6
- }
- },
- "additionalProperties" : false
- },
- "webConfig" :
- {
- "type" : "object",
- "title" : "edt_conf_webc_heading_title",
- "properties" :
- {
- "enable" :
- {
- "type" : "boolean",
- "title" : "edt_conf_general_enable_title",
- "default" : true,
- "access" : "expert",
- "propertyOrder" : 1
- },
- "document_root" :
- {
- "type" : "string",
- "title" : "edt_conf_webc_docroot_title",
- "access" : "expert",
- "propertyOrder" : 2
- },
- "port" :
- {
- "type" : "integer",
- "title" : "edt_conf_general_port_title",
- "minimum" : 0,
- "maximum" : 65535,
- "default" : 8099,
- "access" : "expert",
- "propertyOrder" : 3
- }
- },
- "additionalProperties" : false
- },
- "effects" :
- {
- "type" : "object",
- "properties" :
- {
- "paths" :
- {
- "type" : "array",
- "title" : "edt_conf_effp_paths_title",
- "default" : ["../custom-effects"],
- "items" : {
- "type": "string",
- "title" : "edt_conf_effp_paths_itemtitle"
- },
- "propertyOrder" : 1
- },
- "disable" :
- {
- "type" : "array",
- "title" : "edt_conf_effp_disable_title",
- "items" : {
- "type": "string",
- "title" : "edt_conf_effp_disable_itemtitle"
- },
- "propertyOrder" : 2
- }
- },
- "additionalProperties" : false
- },
- "leds":
- {
- "type":"array",
- "required":true,
- "items":
- {
- "type":"object",
- "properties":
- {
- "index":
- {
- "type":"integer",
- "required":true
- },
- "clone":
- {
- "type":"integer"
- },
- "hscan":
- {
- "type":"object",
- "properties":
- {
- "minimum":
- {
- "type":"number",
- "minimum" : 0,
- "maximum" : 1,
- "required":true
- },
- "maximum":
- {
- "type":"number",
- "minimum" : 0,
- "maximum" : 1,
- "required":true
- }
- },
- "additionalProperties" : false
- },
- "vscan":
- {
- "type":"object",
- "properties":
- {
- "minimum":
- {
- "type":"number",
- "minimum" : 0,
- "maximum" : 1,
- "required":true
- },
- "maximum":
- {
- "type":"number",
- "minimum" : 0,
- "maximum" : 1,
- "required":true
- }
- },
- "additionalProperties" : false
- },
- "colorOrder":
- {
- "type": "string",
- "enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"]
- }
- },
- "additionalProperties" : false
- }
+ "required" : true
}
},
- "additionalProperties" : false
+ "additionalProperties" : true
}
diff --git a/libsrc/hyperion/resource.qrc b/libsrc/hyperion/resource.qrc
index efc3930b..cfd09a60 100644
--- a/libsrc/hyperion/resource.qrc
+++ b/libsrc/hyperion/resource.qrc
@@ -1,6 +1,8 @@
hyperion.schema.json
+ schemas/hyperion.schema-1.json
+ schemas/hyperion.schema-2.json
../../config/hyperion.config.json.default
diff --git a/libsrc/hyperion/schemas/hyperion.schema-1.json b/libsrc/hyperion/schemas/hyperion.schema-1.json
new file mode 100644
index 00000000..c36b9558
--- /dev/null
+++ b/libsrc/hyperion/schemas/hyperion.schema-1.json
@@ -0,0 +1,386 @@
+{
+ "type" : "object",
+ "required" : true,
+ "properties" : {
+ "device" : {
+ "type" : "object",
+ "required" : true,
+ "properties" : {
+ "name" : {
+ "type" : "string",
+ "required" : true
+ },
+ "type" : {
+ "type" : "string",
+ "required" : true
+ },
+ "output" : {
+ "type" : "string",
+ "required" : true
+ },
+ "rate" : {
+ "type" : "integer",
+ "required" : true,
+ "minimum" : 0
+ },
+ "colorOrder" : {
+ "type" : "string",
+ "required" : false
+ },
+ "bgr-output" : {
+ "type" : "boolean",
+ "required" : false
+ }
+ },
+ "additionalProperties" : false
+ },
+ "color": {
+ "type":"object",
+ "required":false,
+ "properties": {
+ "hsv" : {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "saturationGain" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ },
+ "valueGain" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "hsl" : {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "saturationGain" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ },
+ "luminanceGain" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ },
+ "luminanceMinimum" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "red": {
+ "type":"object",
+ "required":false,
+ "properties":{
+ "gamma": {
+ "type":"number",
+ "required":false
+ },
+ "blacklevel": {
+ "type":"number",
+ "required":false
+ },
+ "whitelevel": {
+ "type":"number",
+ "required":false
+ },
+ "threshold": {
+ "type":"number",
+ "required":false,
+ "minimum" : 0.0,
+ "maximum" : 1.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "green": {
+ "type":"object",
+ "required":false,
+ "properties":{
+ "gamma": {
+ "type":"number",
+ "required":false
+ },
+ "blacklevel": {
+ "type":"number",
+ "required":false
+ },
+ "whitelevel": {
+ "type":"number",
+ "required":false
+ },
+ "threshold": {
+ "type":"number",
+ "required":false,
+ "minimum" : 0.0,
+ "maximum" : 1.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "blue": {
+ "type":"object",
+ "required":false,
+ "properties":{
+ "gamma": {
+ "type":"number",
+ "required":false
+ },
+ "whitelevel": {
+ "type":"number",
+ "required":false
+ },
+ "blacklevel": {
+ "type":"number",
+ "required":false
+ },
+ "threshold": {
+ "type":"number",
+ "required":false,
+ "minimum" : 0.0,
+ "maximum" : 1.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "smoothing" : {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "type" : {
+ "type" : "enum",
+ "required" : true,
+ "values" : ["none", "linear"]
+ },
+ "time_ms" : {
+ "type" : "integer",
+ "required" : false,
+ "minimum" : 10
+ },
+ "updateFrequency" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.001
+ }
+ },
+ "additionalProperties" : false
+ }
+
+ },
+ "additionalProperties" : false
+ },
+ "leds": {
+ "type":"array",
+ "required":true,
+ "items": {
+ "type":"object",
+ "properties": {
+ "index": {
+ "type":"integer",
+ "required":true
+ },
+ "hscan": {
+ "type":"object",
+ "required":true,
+ "properties": {
+ "minimum": {
+ "type":"number",
+ "required":true
+ },
+ "maximum": {
+ "type":"number",
+ "required":true
+ }
+ },
+ "additionalProperties" : false
+ },
+ "vscan": {
+ "type":"object",
+ "required":true,
+ "properties": {
+ "minimum": {
+ "type":"number",
+ "required":true
+ },
+ "maximum": {
+ "type":"number",
+ "required":true
+ }
+ },
+ "additionalProperties" : false
+ },
+ "colorOrder" : {
+ "type" : "string",
+ "required" : false
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "effects" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "paths" : {
+ "type" : "array",
+ "required" : false,
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
+ "additionalProperties" : false
+ },
+ "blackborderdetector" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "enable" : {
+ "type" : "boolean",
+ "required" : true
+ },
+ "threshold" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0,
+ "maximum" : 1.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "xbmcVideoChecker" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "xbmcAddress" : {
+ "type" : "string",
+ "required" : true
+ },
+ "xbmcTcpPort" : {
+ "type" : "integer",
+ "required" : true
+ },
+ "grabVideo" : {
+ "type" : "boolean",
+ "required" : true
+ },
+ "grabPictures" : {
+ "type" : "boolean",
+ "required" : true
+ },
+ "grabAudio" : {
+ "type" : "boolean",
+ "required" : true
+ },
+ "grabMenu" : {
+ "type" : "boolean",
+ "required" : true
+ },
+ "grabPause" : {
+ "type" : "boolean",
+ "required" : false
+ },
+ "grabScreensaver" : {
+ "type" : "boolean",
+ "required" : false
+ },
+ "enable3DDetection" : {
+ "type" : "boolean",
+ "required" : false
+ }
+ },
+ "additionalProperties" : false
+ },
+ "bootsequence" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "path" : {
+ "type" : "string",
+ "required" : true
+ },
+ "effect" : {
+ "type" : "string",
+ "required" : true
+ }
+ },
+ "additionalProperties" : false
+ },
+ "framegrabber" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "width" : {
+ "type" : "integer",
+ "required" : true
+ },
+ "height" : {
+ "type" : "integer",
+ "required" : true
+ },
+ "frequency_Hz" : {
+ "type" : "integer",
+ "required" : true
+ }
+ },
+ "additionalProperties" : false
+ },
+ "jsonServer" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "port" : {
+ "type" : "integer",
+ "required" : true,
+ "minimum" : 0,
+ "maximum" : 65535
+ }
+ },
+ "additionalProperties" : false
+ },
+ "protoServer" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "port" : {
+ "type" : "integer",
+ "required" : true,
+ "minimum" : 0,
+ "maximum" : 65535
+ }
+ },
+ "additionalProperties" : false
+ },
+ "boblightServer" :
+ {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "port" : {
+ "type" : "integer",
+ "required" : true,
+ "minimum" : 0,
+ "maximum" : 65535
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "additionalProperties" : false
+}
diff --git a/libsrc/hyperion/schemas/hyperion.schema-2.json b/libsrc/hyperion/schemas/hyperion.schema-2.json
new file mode 100644
index 00000000..b08e0af5
--- /dev/null
+++ b/libsrc/hyperion/schemas/hyperion.schema-2.json
@@ -0,0 +1,1266 @@
+{
+ "type" : "object",
+ "required" : true,
+ "properties" :
+ {
+ "general" :
+ {
+ "type" : "object",
+ "title" : "edt_general_heading_title",
+ "required" : true,
+ "defaultProperties": ["name"],
+ "properties" :
+ {
+ "name" :
+ {
+ "type" : "string",
+ "title" : "edt_general_name_title",
+ "required" : true,
+ "propertyOrder" : 1
+ },
+ "configVersion" :
+ {
+ "type" : "integer",
+ "minimum" : 1,
+ "access" : "system",
+ "required" : true
+ }
+ }
+ },
+ "logger" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_log_heading_title",
+ "properties" :
+ {
+ "level" :
+ {
+ "type" : "string",
+ "enum" : ["silent", "warn", "verbose", "debug"],
+ "title" : "edt_conf_log_level_title",
+ "default" : "warn"
+ }
+ },
+ "additionalProperties" : false
+ },
+ "device" :
+ {
+ "type" : "object",
+ "title" : "edt_dev_general_heading_title",
+ "required" : true,
+ "defaultProperties": ["ledCount","colorOrder","rewriteTime"],
+ "properties" :
+ {
+ "type" :
+ {
+ "type" : "string",
+ "required" : true
+ },
+ "ledCount" :
+ {
+ "type" : "integer",
+ "minimum" : 0,
+ "title" : "edt_dev_general_ledCount_title",
+ "propertyOrder" : 2
+ },
+ "colorOrder" :
+ {
+ "type" : "string",
+ "title" : "edt_dev_general_colorOrder_title",
+ "enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"],
+ "default" : "rgb",
+ "propertyOrder" : 3
+ },
+ "rewriteTime": {
+ "type": "integer",
+ "title":"edt_dev_general_rewriteTime_title",
+ "default": 5000,
+ "append" : "edt_append_ms",
+ "minimum": 0,
+ "access" : "expert",
+ "propertOrder" : 4
+ }
+ },
+ "additionalProperties" : true
+ },
+ "color" :
+ {
+ "type":"object",
+ "title" : "edt_conf_color_heading_title",
+ "required" : true,
+ "defaultProperties": ["imageToLedMappingType","channelAdjustment_enable","channelAdjustment","transform_enable","transform"],
+ "properties":
+ {
+ "imageToLedMappingType" :
+ {
+ "type" : "string",
+ "enum" : ["multicolor_mean", "unicolor_mean"],
+ "default" : "multicolor_mean",
+ "propertyOrder" : 1
+ },
+ "channelAdjustment_enable" :
+ {
+ "type" : "boolean",
+ "default" : true,
+ "propertyOrder" : 2
+ },
+ "channelAdjustment_v4l_only" :
+ {
+ "type" : "boolean",
+ "default" : false,
+ "propertyOrder" : 3
+ },
+ "channelAdjustment" :
+ {
+ "type" : "array",
+ "required" : true,
+ "propertyOrder" : 4,
+ "items" :
+ {
+ "type" : "object",
+ "required" : true,
+ "properties" :
+ {
+ "id" :
+ {
+ "type" : "string",
+ "required" : true
+ },
+ "leds" :
+ {
+ "type" : "string",
+ "required" : true
+ },
+ "pureRed" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "redChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ },
+ "greenChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ },
+ "blueChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ }
+ },
+ "additionalProperties" : false
+ },
+ "pureGreen" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "redChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ },
+ "greenChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ },
+ "blueChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ }
+ },
+ "additionalProperties" : false
+ },
+ "pureBlue" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "redChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ },
+ "greenChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ },
+ "blueChannel" :
+ {
+ "type": "integer",
+ "required" : true,
+ "minimum": 0,
+ "maximum": 255
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "transform_enable" :
+ {
+ "type" : "boolean",
+ "default" : true,
+ "propertyOrder" : 5
+ },
+ "transform_v4l_only" :
+ {
+ "type" : "boolean",
+ "default" : false,
+ "propertyOrder" : 6
+ },
+ "transform" :
+ {
+ "type" : "array",
+ "required" : true,
+ "propertyOrder" : 7,
+ "items" :
+ {
+ "type" : "object",
+ "required" : true,
+ "properties" :
+ {
+ "id" :
+ {
+ "type" : "string",
+ "required" : true
+ },
+ "leds" :
+ {
+ "type" : "string",
+ "required" : true
+ },
+ "hsv" : {
+ "type" : "object",
+ "required" : false,
+ "properties" : {
+ "saturationGain" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ },
+ "valueGain" : {
+ "type" : "number",
+ "required" : false,
+ "minimum" : 0.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "hsl" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "saturationGain" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0
+ },
+ "luminanceGain" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0
+ },
+ "luminanceMinimum" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "red" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "threshold" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0,
+ "maximum": 1.0
+ },
+ "gamma" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0,
+ "maximum": 100.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "green" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "threshold" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0,
+ "maximum": 1.0
+ },
+ "gamma" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0,
+ "maximum": 100.0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "blue" :
+ {
+ "type":"object",
+ "required" : true,
+ "properties":
+ {
+ "threshold" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0,
+ "maximum": 1.0
+ },
+ "gamma" :
+ {
+ "type" : "number",
+ "required" : true,
+ "minimum" : 0.0,
+ "maximum": 100.0
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "additionalProperties" : false
+ }
+ }
+ },
+ "additionalProperties" : false
+ },
+ "smoothing":
+ {
+ "type" : "object",
+ "title" : "edt_conf_smooth_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : true,
+ "propertyOrder" : 1
+ },
+ "type" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_smooth_type_title",
+ "enum" : ["linear"],
+ "default" : "linear",
+ "propertyOrder" : 2
+ },
+ "time_ms" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_smooth_time_ms_title",
+ "minimum" : 25,
+ "maximum": 600,
+ "default" : 200,
+ "append" : "edt_append_ms",
+ "propertyOrder" : 3
+ },
+ "updateFrequency" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_smooth_updateFrequency_title",
+ "minimum" : 1.0,
+ "maximum" : 100.0,
+ "default" : 25.0,
+ "append" : "edt_append_hz",
+ "propertyOrder" : 4
+ },
+ "updateDelay" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_smooth_updateDelay_title",
+ "minimum" : 0,
+ "maximum": 2048,
+ "default" : 0,
+ "append" : "edt_append_ms",
+ "propertyOrder" : 5
+ },
+ "continuousOutput" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_smooth_continuousOutput_title",
+ "default" : true,
+ "propertyOrder" : 6
+ }
+ },
+ "additionalProperties" : false
+ },
+ "grabberV4L2" :
+ {
+ "type":"array",
+ "title" : "edt_conf_v4l2_heading_title",
+ "minItems": 1,
+ "maxItems": 2,
+ "items":
+ {
+ "type" : "object",
+ "title" : "edt_conf_v4l2_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : false,
+ "propertyOrder" : 1
+ },
+ "device" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_v4l2_device_title",
+ "default" : "auto",
+ "propertyOrder" : 2
+ },
+ "input" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_input_title",
+ "minimum" : 0,
+ "default" : 0,
+ "propertyOrder" : 3
+ },
+ "standard" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_v4l2_standard_title",
+ "enum" : ["PAL","NTSC"],
+ "default" : "PAL",
+ "propertyOrder" : 4
+ },
+ "width" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_width_title",
+ "minimum" : -1,
+ "default" : -1,
+ "append" : "edt_append_pixel",
+ "propertyOrder" : 5
+ },
+ "height" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_height_title",
+ "minimum" : -1,
+ "default" : -1,
+ "append" : "edt_append_pixel",
+ "propertyOrder" : 6
+ },
+ "frameDecimation" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_frameDecimation_title",
+ "minimum" : 0,
+ "default" : 2,
+ "propertyOrder" : 7
+ },
+ "sizeDecimation" :
+ {
+ "type" : "integer",
+ "title" : "Size decimation",
+ "minimum" : 0,
+ "default" : 6,
+ "propertyOrder" : 8
+ },
+ "priority" :
+ {
+ "type" : "integer",
+ "minimum" : 100,
+ "maximum" : 2000000000,
+ "title" : "edt_conf_general_priority_title",
+ "default" : 900,
+ "propertyOrder" : 9
+ },
+ "mode" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_v4l2_mode_title",
+ "enum" : ["2D","3DSBS","3DTAB"],
+ "default" : "2D",
+ "propertyOrder" : 10
+ },
+ "useKodiChecker" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_v4l2_useKodiChecker_title",
+ "default" : false,
+ "propertyOrder" : 11
+ },
+ "cropLeft" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropLeft_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel",
+ "propertyOrder" : 12
+ },
+ "cropRight" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropRight_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel",
+ "propertyOrder" : 13
+ },
+ "cropTop" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropTop_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel",
+ "propertyOrder" : 14
+ },
+ "cropBottom" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropBottom_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel",
+ "propertyOrder" : 15
+ },
+ "redSignalThreshold" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_redSignalThreshold_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.005,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 16
+ },
+ "greenSignalThreshold" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_greenSignalThreshold_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.025,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 17
+ },
+ "blueSignalThreshold" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_blueSignalThreshold_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.005,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 18
+ },
+ "signalDetectionVerticalOffsetMin" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_signalDetectionVerticalOffsetMin_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.005,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 19
+ },
+ "signalDetectionVerticalOffsetMax" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_signalDetectionVerticalOffsetMax_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.005,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 20
+ },
+ "signalDetectionHorizontalOffsetMin" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_signalDetectionHorizontalOffsetMin_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.005,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 21
+ },
+ "signalDetectionHorizontalOffsetMax" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_v4l2_signalDetectionHorizontalOffsetMax_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.1,
+ "step" : 0.005,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 22
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "framegrabber" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_fg_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : true,
+ "propertyOrder" : 1
+ },
+ "type" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_fg_type_title",
+ "enum" : ["auto","dispmanx","amlogic","x11","framebuffer"],
+ "default" : "auto"
+ },
+ "width" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_width_title",
+ "minimum" : 10,
+ "default" : 80,
+ "append" : "edt_append_pixel"
+ },
+ "height" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_height_title",
+ "minimum" : 10,
+ "default" : 45,
+ "append" : "edt_append_pixel"
+ },
+ "frequency_Hz" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_fg_frequency_Hz_title",
+ "minimum" : 1,
+ "default" : 10,
+ "append" : "edt_append_hz"
+ },
+ "priority" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_general_priority_title",
+ "minimum" : 100,
+ "maximum" : 2000000000,
+ "default" : 890
+ },
+ "cropLeft" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropLeft_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel"
+ },
+ "cropRight" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropRight_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel"
+ },
+ "cropTop" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropTop_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel"
+ },
+ "cropBottom" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_v4l2_cropBottom_title",
+ "minimum" : 0,
+ "default" : 0,
+ "append" : "edt_append_pixel"
+ },
+ "useXGetImage" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_fg_useXGetImage_title",
+ "default" : false
+ },
+ "horizontalPixelDecimation" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_fg_horizontalPixelDecimation_title",
+ "minimum" : 0,
+ "default" : 8
+ },
+ "verticalPixelDecimation" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_fg_verticalPixelDecimation_title",
+ "minimum" : 0,
+ "default" : 8
+ },
+ "device" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_fg_device_title",
+ "default" : "/dev/fb0"
+ },
+ "display" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_fg_display_title",
+ "minimum" : 0
+ }
+ },
+ "additionalProperties" : false
+ },
+ "blackborderdetector" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_bb_heading_title",
+ "defaultProperties": ["enable","mode","threshold"],
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : true,
+ "propertyOrder" : 1
+ },
+ "threshold" :
+ {
+ "type" : "number",
+ "title" : "edt_conf_bb_threshold_title",
+ "minimum" : 0.0,
+ "maximum" : 1.0,
+ "default" : 0.05,
+ "step" : 0.01,
+ "append" : "edt_append_percent",
+ "propertyOrder" : 2
+ },
+ "unknownFrameCnt" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_bb_unknownFrameCnt_title",
+ "minimum" : 0,
+ "default" : 600,
+ "propertyOrder" : 3
+ },
+ "borderFrameCnt" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_bb_borderFrameCnt_title",
+ "minimum" : 0,
+ "default" : 50,
+ "propertyOrder" : 4
+ },
+ "maxInconsistentCnt" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_bb_maxInconsistentCnt_title",
+ "minimum" : 0,
+ "default" : 10,
+ "propertyOrder" : 5
+ },
+ "blurRemoveCnt" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_bb_blurRemoveCnt_title",
+ "minimum" : 0,
+ "default" : 1,
+ "propertyOrder" : 6
+ },
+ "mode" :
+ {
+ "type" : "string",
+ "title": "edt_conf_bb_mode_title",
+ "enum" : ["default", "classic", "osd"],
+ "default" : "default",
+ "propertyOrder" : 7
+ }
+ },
+ "additionalProperties" : false
+ },
+ "kodiVideoChecker" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_kodic_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : false,
+ "propertyOrder" : 1
+ },
+ "kodiAddress" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_kodic_kodiAddress_title",
+ "default" : "127.0.0.1",
+ "propertyOrder" : 2
+ },
+ "kodiTcpPort" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_kodic_kodiTcpPort_title",
+ "minimum" : 0,
+ "maximum" : 65535,
+ "default" : 9090,
+ "propertyOrder" : 3
+ },
+ "grabVideo" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_grabVideo_title",
+ "default" : true,
+ "propertyOrder" : 4
+ },
+ "grabPictures" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_grabPictures_title",
+ "default" : true,
+ "propertyOrder" : 5
+ },
+ "grabAudio" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_grabAudio_title",
+ "default" : true,
+ "propertyOrder" : 6
+ },
+ "grabMenu" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_grabMenu_title",
+ "default" : false,
+ "propertyOrder" : 7
+ },
+ "grabPause" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_grabPause_title",
+ "default" : false,
+ "propertyOrder" : 8
+ },
+ "grabScreensaver" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_grabScreensaver_title",
+ "default" : false,
+ "propertyOrder" : 9
+ },
+ "enable3DDetection" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_kodic_enable3DDetection_title",
+ "default" : false,
+ "propertyOrder" : 10
+ }
+ },
+ "additionalProperties" : false
+ },
+ "initialEffect" :
+ {
+ "type" : "object",
+ "title" : "Initial Effect",
+ "defaultProperties": ["background-effect","foreground-effect","foreground-duration_ms"],
+ "properties" :
+ {
+ "background-effect" :
+ {
+ "type" : "array",
+ "title" : "Background effect",
+ "propertyOrder" : 3
+ },
+ "background-effect-args" :
+ {
+ "type" : "object",
+ "title" : "Background effect arguments"
+ },
+ "foreground-effect" :
+ {
+ "type" : "array",
+ "title" : "Boot effect",
+ "propertyOrder" : 1
+ },
+ "foreground-effect-args" :
+ {
+ "type" : "object",
+ "title" : "Boot effect arguments"
+ },
+ "foreground-duration_ms" :
+ {
+ "type" : "integer",
+ "title" : "Boot effect duration",
+ "propertyOrder" : 2
+ }
+ },
+ "additionalProperties" : false
+ },
+ "forwarder" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_fw_heading_title",
+ "required" : true,
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "propertyOrder" : 1
+ },
+ "json" :
+ {
+ "type" : "array",
+ "title" : "edt_conf_fw_json_title",
+ "items" : {
+ "type": "string",
+ "title" : "edt_conf_fw_json_itemtitle"
+ },
+ "propertyOrder" : 2
+ },
+ "proto" :
+ {
+ "type" : "array",
+ "title" : "edt_conf_fw_proto_title",
+ "items" : {
+ "type": "string",
+ "title" : "edt_conf_fw_proto_itemtitle"
+ },
+ "propertyOrder" : 3
+ }
+ },
+ "additionalProperties" : false
+ },
+ "jsonServer" :
+ {
+ "type" : "object",
+ "required" : true,
+ "title" : "edt_conf_js_heading_title",
+ "properties" :
+ {
+ "port" :
+ {
+ "type" : "integer",
+ "required" : true,
+ "title" : "edt_conf_general_port_title",
+ "minimum" : 0,
+ "maximum" : 65535,
+ "default" : 19444
+ }
+ },
+ "additionalProperties" : false
+ },
+ "protoServer" :
+ {
+ "type" : "object",
+ "required" : true,
+ "title" : "edt_conf_ps_heading_title",
+ "properties" :
+ {
+ "port" :
+ {
+ "type" : "integer",
+ "required" : true,
+ "title" : "edt_conf_general_port_title",
+ "minimum" : 0,
+ "maximum" : 65535,
+ "default" : 19445
+ }
+ },
+ "additionalProperties" : false
+ },
+ "boblightServer" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_bobls_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : false,
+ "propertyOrder" : 1
+ },
+ "port" :
+ {
+ "type" : "integer",
+ "required" : true,
+ "title" : "edt_conf_general_port_title",
+ "minimum" : 0,
+ "maximum" : 65535,
+ "propertyOrder" : 2
+ },
+ "priority" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_general_priority_title",
+ "minimum" : 100,
+ "maximum" : 2000000000,
+ "default" : 800,
+ "propertyOrder" : 3
+ }
+ },
+ "additionalProperties" : false
+ },
+ "udpListener" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_udpl_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : false,
+ "propertyOrder" : 1
+ },
+ "address" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_udpl_address_title",
+ "default" : "239.255.28.01",
+ "propertyOrder" : 2
+ },
+ "port" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_general_port_title",
+ "minimum" : 0,
+ "maximum" : 65535,
+ "default" : 2801,
+ "propertyOrder" : 3
+ },
+ "priority" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_general_priority_title",
+ "minimum" : 100,
+ "maximum" : 2000000000,
+ "default" : 800,
+ "propertyOrder" : 4
+ },
+ "timeout" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_udpl_timeout_title",
+ "minimum" : 1000,
+ "default" : 10000,
+ "append" : "edt_append_ms",
+ "propertyOrder" : 5
+ },
+ "shared" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_udpl_shared_title",
+ "default" : false,
+ "propertyOrder" : 6
+ }
+ },
+ "additionalProperties" : false
+ },
+ "webConfig" :
+ {
+ "type" : "object",
+ "title" : "edt_conf_webc_heading_title",
+ "properties" :
+ {
+ "enable" :
+ {
+ "type" : "boolean",
+ "title" : "edt_conf_general_enable_title",
+ "default" : true,
+ "access" : "expert",
+ "propertyOrder" : 1
+ },
+ "document_root" :
+ {
+ "type" : "string",
+ "title" : "edt_conf_webc_docroot_title",
+ "access" : "expert",
+ "propertyOrder" : 2
+ },
+ "port" :
+ {
+ "type" : "integer",
+ "title" : "edt_conf_general_port_title",
+ "minimum" : 0,
+ "maximum" : 65535,
+ "default" : 8099,
+ "access" : "expert",
+ "propertyOrder" : 3
+ }
+ },
+ "additionalProperties" : false
+ },
+ "effects" :
+ {
+ "type" : "object",
+ "properties" :
+ {
+ "paths" :
+ {
+ "type" : "array",
+ "title" : "edt_conf_effp_paths_title",
+ "default" : ["../custom-effects"],
+ "items" : {
+ "type": "string",
+ "title" : "edt_conf_effp_paths_itemtitle"
+ },
+ "propertyOrder" : 1
+ },
+ "disable" :
+ {
+ "type" : "array",
+ "title" : "edt_conf_effp_disable_title",
+ "items" : {
+ "type": "string",
+ "title" : "edt_conf_effp_disable_itemtitle"
+ },
+ "propertyOrder" : 2
+ }
+ },
+ "additionalProperties" : false
+ },
+ "leds":
+ {
+ "type":"array",
+ "required":true,
+ "items":
+ {
+ "type":"object",
+ "properties":
+ {
+ "index":
+ {
+ "type":"integer",
+ "required":true
+ },
+ "clone":
+ {
+ "type":"integer"
+ },
+ "hscan":
+ {
+ "type":"object",
+ "properties":
+ {
+ "minimum":
+ {
+ "type":"number",
+ "minimum" : 0,
+ "maximum" : 1,
+ "required":true
+ },
+ "maximum":
+ {
+ "type":"number",
+ "minimum" : 0,
+ "maximum" : 1,
+ "required":true
+ }
+ },
+ "additionalProperties" : false
+ },
+ "vscan":
+ {
+ "type":"object",
+ "properties":
+ {
+ "minimum":
+ {
+ "type":"number",
+ "minimum" : 0,
+ "maximum" : 1,
+ "required":true
+ },
+ "maximum":
+ {
+ "type":"number",
+ "minimum" : 0,
+ "maximum" : 1,
+ "required":true
+ }
+ },
+ "additionalProperties" : false
+ },
+ "colorOrder":
+ {
+ "type": "string",
+ "enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"]
+ }
+ },
+ "additionalProperties" : false
+ }
+ }
+ },
+ "additionalProperties" : false
+}
diff --git a/libsrc/jsonserver/JsonClientConnection.cpp b/libsrc/jsonserver/JsonClientConnection.cpp
index c18c197f..80a5edb5 100644
--- a/libsrc/jsonserver/JsonClientConnection.cpp
+++ b/libsrc/jsonserver/JsonClientConnection.cpp
@@ -1085,7 +1085,7 @@ void JsonClientConnection::handleSchemaGetCommand(const QJsonObject& message, co
QJsonParseError error;
// read the hyperion json schema from the resource
- QFile schemaData(":/hyperion-schema");
+ QFile schemaData(":/hyperion-schema-"+QString::number(_hyperion->getConfigVersionId()));
if (!schemaData.open(QIODevice::ReadOnly))
{
diff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt
index 3a7d456a..fa1c0abd 100644
--- a/src/hyperiond/CMakeLists.txt
+++ b/src/hyperiond/CMakeLists.txt
@@ -1,6 +1,11 @@
-add_executable(hyperiond
- hyperiond.cpp hyperiond.h main.cpp)
+add_executable(hyperiond
+ configMigrator.cpp
+ configMigrator.h
+ hyperiond.cpp
+ hyperiond.h
+ main.cpp
+)
target_link_libraries(hyperiond
commandline
diff --git a/src/hyperiond/configMigrator.cpp b/src/hyperiond/configMigrator.cpp
new file mode 100644
index 00000000..d282b3ed
--- /dev/null
+++ b/src/hyperiond/configMigrator.cpp
@@ -0,0 +1,19 @@
+#include "configMigrator.h"
+
+
+ConfigMigrator::ConfigMigrator()
+ : _log(Logger::getInstance("ConfigMigrator"))
+{
+}
+
+ConfigMigrator::~ConfigMigrator()
+{
+}
+
+bool ConfigMigrator::migrate(QString configFile, int fromVersion,int toVersion)
+{
+ Debug(_log, "migrate config %s from version %d to %d.", configFile.toLocal8Bit().constData(), fromVersion, toVersion);
+ throw std::runtime_error("ERROR: config migration not implemented");
+ return true;
+}
+
diff --git a/src/hyperiond/configMigrator.h b/src/hyperiond/configMigrator.h
new file mode 100644
index 00000000..265a2fa8
--- /dev/null
+++ b/src/hyperiond/configMigrator.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include
+
+#include
+
+class ConfigMigrator
+{
+
+public:
+ ConfigMigrator();
+ ~ConfigMigrator();
+
+ bool migrate(QString configFile, int fromVersion,int toVersion);
+private:
+ Logger * _log;
+};
\ No newline at end of file
diff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp
index 32052336..5810af95 100644
--- a/src/hyperiond/hyperiond.cpp
+++ b/src/hyperiond/hyperiond.cpp
@@ -31,7 +31,7 @@
#include
#include "hyperiond.h"
-
+#include "configMigrator.h"
HyperionDaemon::HyperionDaemon(QString configFile, QObject *parent)
: QObject(parent)
@@ -51,7 +51,7 @@ HyperionDaemon::HyperionDaemon(QString configFile, QObject *parent)
, _osxGrabber(nullptr)
, _hyperion(nullptr)
{
- loadConfig(configFile);
+ loadConfig(configFile, CURRENT_CONFIG_VERSION );
if (Logger::getLogLevel() == Logger::WARNING)
{
@@ -116,20 +116,21 @@ void HyperionDaemon::run()
}
-void HyperionDaemon::loadConfig(const QString & configFile)
+int HyperionDaemon::tryLoadConfig(const QString & configFile, const int schemaVersion)
{
- Info(_log, "Selected configuration file: %s", configFile.toUtf8().constData());
-
// make sure the resources are loaded (they may be left out after static linking)
Q_INIT_RESOURCE(resource);
QJsonParseError error;
// read the json schema from the resource
- QFile schemaData(":/hyperion-schema");
+ QString schemaFile = ":/hyperion-schema";
+ if (schemaVersion > 0)
+ schemaFile += "-" + QString::number(schemaVersion);
+ QFile schemaData(schemaFile);
if (!schemaData.open(QIODevice::ReadOnly))
{
std::stringstream error;
- error << "Schema not found: " << schemaData.errorString().toStdString();
+ error << "Schema not found or not supported: " << schemaData.errorString().toStdString();
throw std::runtime_error(error.str());
}
@@ -168,11 +169,42 @@ void HyperionDaemon::loadConfig(const QString & configFile)
{
std::cout << *i << std::endl;
}
-
+
throw std::runtime_error("ERROR: Json validation failed");
}
+
+ const QJsonObject & generalConfig = _qconfig["general"].toObject();
+ return generalConfig["configVersion"].toInt(-1);
}
+
+void HyperionDaemon::loadConfig(const QString & configFile, const int neededConfigVersion)
+{
+ Info(_log, "Selected configuration file: %s", configFile.toUtf8().constData());
+
+ int configVersionId = tryLoadConfig(configFile,0);
+
+ // no config id found, assume legacy hyperion
+ if (configVersionId < 0)
+ {
+ Debug(_log, "config file has no version, assume old hyperion.");
+ configVersionId = tryLoadConfig(configFile,1);
+ }
+ Debug(_log, "config version: %d", configVersionId);
+ configVersionId = tryLoadConfig(configFile, configVersionId);
+
+ if (neededConfigVersion == configVersionId)
+ {
+ return;
+ }
+
+ // migrate configVersionId
+ ConfigMigrator migrator;
+ migrator.migrate(configFile, configVersionId, neededConfigVersion);
+
+}
+
+
void HyperionDaemon::startInitialEffect()
{
#define FGCONFIG_ARRAY fgEffectConfig.toArray()
@@ -343,8 +375,8 @@ void HyperionDaemon::startNetworkServices()
connect( Hyperion::getInstance(), SIGNAL(componentStateChanged(hyperion::Components,bool)), _udpListener, SLOT(componentStateChanged(hyperion::Components,bool)));
// zeroconf description - $leddevicename@$hostname
- const QJsonObject & deviceConfig = _qconfig["device"].toObject();
- const std::string mDNSDescr = ( deviceConfig["name"].toString("").toStdString()
+ const QJsonObject & generalConfig = _qconfig["general"].toObject();
+ const std::string mDNSDescr = ( generalConfig["name"].toString("").toStdString()
+ "@" +
QHostInfo::localHostName().toStdString()
);
diff --git a/src/hyperiond/hyperiond.h b/src/hyperiond/hyperiond.h
index 3ef3f8a1..7c7fd36f 100644
--- a/src/hyperiond/hyperiond.h
+++ b/src/hyperiond/hyperiond.h
@@ -1,5 +1,7 @@
#pragma once
+const int CURRENT_CONFIG_VERSION = 2;
+
#include
#ifdef ENABLE_DISPMANX
@@ -53,7 +55,8 @@ public:
HyperionDaemon(QString configFile, QObject *parent=nullptr);
~HyperionDaemon();
- void loadConfig(const QString & configFile);
+ int tryLoadConfig(const QString & configFile, const int schemaVersion);
+ void loadConfig(const QString & configFile, const int neededConfigVersion);
void run();
void startInitialEffect();
diff --git a/test/TestConfigFile.cpp b/test/TestConfigFile.cpp
index 4bdde4cc..d4ecca5e 100644
--- a/test/TestConfigFile.cpp
+++ b/test/TestConfigFile.cpp
@@ -16,13 +16,13 @@ bool loadConfig(const QString & configFile)
// make sure the resources are loaded (they may be left out after static linking)
Q_INIT_RESOURCE(resource);
QJsonParseError error;
-
+
////////////////////////////////////////////////////////////
// read and set the json schema from the resource
////////////////////////////////////////////////////////////
-
+
QFile schemaData(":/hyperion-schema");
-
+
if (!schemaData.open(QIODevice::ReadOnly))
{
std::stringstream error;