diff --git a/assets/webconfig/effects.html b/assets/webconfig/effects.html index 79eea8f2..917f4e92 100644 --- a/assets/webconfig/effects.html +++ b/assets/webconfig/effects.html @@ -17,28 +17,13 @@ $(document).ready( function() { - webSocket = new WebSocket('ws://'+document.location.hostname+':19444'); - var serverInfo; - - webSocket.onerror = function(event) { - alert(event.data); - }; - - - webSocket.onopen = function(event) { - webSocket.send('{"command":"serverinfo"}'); - }; - - webSocket.onmessage = function(response){ - responseJSON = JSON.parse(response.data ); - //console.log(response.data); - for(i = 0; i < responseJSON.info.effects.length; i++) { - //console.log(responseJSON.info.effects[i].name); - var effectName = responseJSON.info.effects[i].name; + for(i = 0; i < parsedServerInfoJSON.info.effects.length; i++) { + //console.log(parsedServerInfoJSON.info.effects[i].name); + var effectName = parsedServerInfoJSON.info.effects[i].name; $('#buttondiv').append(' '+effectName+'
'); } - } + $("#effect_stop").on("click", function() { webSocket.send('{"command":"clear", "priority":1}'); diff --git a/assets/webconfig/huebridge.html b/assets/webconfig/huebridge.html index f0396c73..4e1237ba 100644 --- a/assets/webconfig/huebridge.html +++ b/assets/webconfig/huebridge.html @@ -28,12 +28,18 @@ diff --git a/assets/webconfig/index.html b/assets/webconfig/index.html index 6274caa6..f79783cc 100644 --- a/assets/webconfig/index.html +++ b/assets/webconfig/index.html @@ -346,6 +346,8 @@

The dashboard give you a quick overview about the status of Hyperion and show you the latest news of the Hyperion Blog.

+
+
@@ -358,15 +360,19 @@ Your Hyperion version: - + unknown - + Latest version: - + unknown + + + LED type: + unknown Device: - + @@ -431,7 +437,49 @@
+ + + + @@ -479,46 +527,7 @@ //Change all Checkboxes to Switches $("[type='checkbox']").bootstrapSwitch(); - // vesion check - var currentVersion; - var cleanCurrentVersion; - var latestVersion; - var cleanLatestVersion; - - webSocket = new WebSocket('ws://'+document.location.hostname+':19444'); - var serverInfo; - - webSocket.onerror = function(event) { - alert(event.data); - }; - - - webSocket.onopen = function(event) { - webSocket.send('{"command":"serverinfo"}'); - }; - - webSocket.onmessage = function(response){ - responseJSON = JSON.parse(response.data ); - currentVersion = responseJSON.info.hyperion[0].version; - cleanCurrentVersion = currentVersion.replace(/\./g, ''); - - $.get( "https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/version.json", function( data ) { - var responseJSON = JSON.parse(data); - latestVersion = responseJSON[0].versionnr; - cleanLatestVersion = latestVersion.replace(/\./g, ''); - - $('#currentversion').append(' V'+currentVersion); - $('#latestversion').append(' V'+latestVersion); - - if ( cleanCurrentVersion < cleanLatestVersion ) { - $('#versioninforesult').append('
A newer version of Hyperion is available!
'); - } - else{ - $('#versioninforesult').append('
You run the latest version of Hyperion.
'); - } - }); - - }; + loaddata(); }); $(function(){ diff --git a/assets/webconfig/js/hyperion.js b/assets/webconfig/js/hyperion.js index 7730f68f..9fc67285 100644 --- a/assets/webconfig/js/hyperion.js +++ b/assets/webconfig/js/hyperion.js @@ -20,3 +20,59 @@ $inputs.each(function() { $("label[for='" + $(this).attr('id') + "']").html('' + oldtext + ''); }); } + +// global vars +var currentVersion; +var cleanCurrentVersion; +var latestVersion; +var cleanLatestVersion; +var parsedServerInfoJSON; +var parsedUpdateJSON; +var hyperionport = 19444; + +function button_reloaddata(){ + hyperionport = $("#json_port").val(); + loaddata(); + }; + +function loaddata() { + + webSocket = new WebSocket('ws://'+document.location.hostname+':'+hyperionport); + + webSocket.onerror = function(event) { + $('#con_error_modal').modal('show'); + }; + + webSocket.onopen = function(event) { + webSocket.send('{"command":"serverinfo"}'); + }; + + webSocket.onmessage = function(response){ + parsedServerInfoJSON = JSON.parse(response.data ); + currentVersion = parsedServerInfoJSON.info.hyperion[0].version; + cleanCurrentVersion = currentVersion.replace(/\./g, ''); + // get active led device + var leddevice = parsedServerInfoJSON.info.ledDevices.active; + $('#dash_leddevice').html(leddevice); + // get host + var hostname = parsedServerInfoJSON.info.hostname; + $('#dash_systeminfo').html(hostname+':'+hyperionport); + + $.get( "https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/version.json", function( data ) { + parsedUpdateJSON = JSON.parse(data); + latestVersion = parsedUpdateJSON[0].versionnr; + cleanLatestVersion = latestVersion.replace(/\./g, ''); + + $('#currentversion').html(' V'+currentVersion); + $('#latestversion').html(' V'+latestVersion); + + if ( cleanCurrentVersion < cleanLatestVersion ) { + $('#versioninforesult').html('
A newer version of Hyperion is available!
'); + } + else{ + $('#versioninforesult').html('
You run the latest version of Hyperion.
'); + } + }); + + }; +}; \ No newline at end of file diff --git a/assets/webconfig/lang/de.json b/assets/webconfig/lang/de.json index f7286ecf..e223bcbe 100644 --- a/assets/webconfig/lang/de.json +++ b/assets/webconfig/lang/de.json @@ -13,7 +13,8 @@ "dashboard_label_infobox_title" : "Informationen", "dashboard_label_infobox_currenthyp" : "Deine Hyperion Version:", "dashboard_label_infobox_latesthyp" : "Aktuellste Hyperion Version:", - "dashboard_label_infobox_device" : "Geräteinformation:", + "dashboard_label_infobox_leddevice" : "LED Typ:", + "dashboard_label_infobox_device" : "Systeminformation:", "dashboard_label_componentbox_title" : "Komponenten Status", "dashboard_label_newsbox_title" : "Die letzten Blogposts", "dashboard_message_infobox_updatewarning" : "Eine aktuellere Version von Hyperion ist verfügbar!", diff --git a/assets/webconfig/lighttest.html b/assets/webconfig/lighttest.html index 129e9824..76829aac 100644 --- a/assets/webconfig/lighttest.html +++ b/assets/webconfig/lighttest.html @@ -21,14 +21,6 @@ diff --git a/libsrc/leddevice/schemas/schema-adalight.json b/libsrc/leddevice/schemas/schema-adalight.json index 0bce7984..22e72a91 100644 --- a/libsrc/leddevice/schemas/schema-adalight.json +++ b/libsrc/leddevice/schemas/schema-adalight.json @@ -2,6 +2,20 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Output path" + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "delayAfterConnect": { + "type": "integer", + "title":"Delay after connect", + "default": 250 + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-adalightapa102.json b/libsrc/leddevice/schemas/schema-adalightapa102.json index 0bce7984..22e72a91 100644 --- a/libsrc/leddevice/schemas/schema-adalightapa102.json +++ b/libsrc/leddevice/schemas/schema-adalightapa102.json @@ -2,6 +2,20 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Output path" + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "delayAfterConnect": { + "type": "integer", + "title":"Delay after connect", + "default": 250 + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-apa102.json b/libsrc/leddevice/schemas/schema-apa102.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-apa102.json +++ b/libsrc/leddevice/schemas/schema-apa102.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-atmo.json b/libsrc/leddevice/schemas/schema-atmo.json index 0bce7984..22e72a91 100644 --- a/libsrc/leddevice/schemas/schema-atmo.json +++ b/libsrc/leddevice/schemas/schema-atmo.json @@ -2,6 +2,20 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Output path" + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "delayAfterConnect": { + "type": "integer", + "title":"Delay after connect", + "default": 250 + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-atmoorb.json b/libsrc/leddevice/schemas/schema-atmoorb.json index 0bce7984..293d8764 100644 --- a/libsrc/leddevice/schemas/schema-atmoorb.json +++ b/libsrc/leddevice/schemas/schema-atmoorb.json @@ -2,6 +2,33 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Multicast group", + "default" : "239.15.18.2" + }, + "orbIds": { + "type": "string", + "title":"Baudrate", + "default": "1" + }, + "numLeds": { + "type": "integer", + "title":"Number of LEDs", + "default": 24 + }, + "port": { + "type": "integer", + "title":"Port", + "minimum" : 0, + "maximum" : 65535, + "default": 24 + }, + "useOrbSmoothing": { + "type": "boolean", + "title":"Use orb smoothing", + "default": true + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-e131.json b/libsrc/leddevice/schemas/schema-e131.json index 0bce7984..54fe696b 100644 --- a/libsrc/leddevice/schemas/schema-e131.json +++ b/libsrc/leddevice/schemas/schema-e131.json @@ -2,6 +2,20 @@ "type":"object", "required":true, "properties":{ + "universe": { + "type": "integer", + "title":"Universe", + "default": 1 + }, + "latchtinme": { + "type": "integer", + "title":"Latchtime", + "default": 104000 + }, + "cid": { + "type": "string", + "title":"CID", + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-file.json b/libsrc/leddevice/schemas/schema-file.json index 0bce7984..88bd5f2f 100644 --- a/libsrc/leddevice/schemas/schema-file.json +++ b/libsrc/leddevice/schemas/schema-file.json @@ -2,6 +2,11 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Output", + "default" : "/dev/null", + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-lightpack.json b/libsrc/leddevice/schemas/schema-lightpack.json index 0bce7984..4834bff2 100644 --- a/libsrc/leddevice/schemas/schema-lightpack.json +++ b/libsrc/leddevice/schemas/schema-lightpack.json @@ -2,6 +2,10 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Serial number" + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-lpd6803.json b/libsrc/leddevice/schemas/schema-lpd6803.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-lpd6803.json +++ b/libsrc/leddevice/schemas/schema-lpd6803.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-lpd8806.json b/libsrc/leddevice/schemas/schema-lpd8806.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-lpd8806.json +++ b/libsrc/leddevice/schemas/schema-lpd8806.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-p9813.json b/libsrc/leddevice/schemas/schema-p9813.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-p9813.json +++ b/libsrc/leddevice/schemas/schema-p9813.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-paintpack.json b/libsrc/leddevice/schemas/schema-paintpack.json index 0bce7984..b449ccb7 100644 --- a/libsrc/leddevice/schemas/schema-paintpack.json +++ b/libsrc/leddevice/schemas/schema-paintpack.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "VID": { + "type": "string", + "title":"VID", + "default" : "0x2341" + }, + "PID": { + "type": "string", + "title":"PID", + "default" : "0x8036" + }, + "delayAfterConnect": { + "type": "integer", + "title":"Delay after connect", + "default": 0 + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-philipshue.json b/libsrc/leddevice/schemas/schema-philipshue.json index 0bce7984..3d14aca1 100644 --- a/libsrc/leddevice/schemas/schema-philipshue.json +++ b/libsrc/leddevice/schemas/schema-philipshue.json @@ -2,6 +2,29 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Target IP" + }, + "username": { + "type": "string", + "title":"Username", + "default": "newdeveloper" + }, + "lightIds": { + "type": "integer", + "title":"Light ids" + }, + "transitiontime": { + "type": "integer", + "title":"Transistion time (x100ms)", + "default" : 1, + }, + "switchOffOnBlack": { + "type": "boolean", + "title":"Switch off on black", + "default" : true + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-rawhid.json b/libsrc/leddevice/schemas/schema-rawhid.json index 0bce7984..b449ccb7 100644 --- a/libsrc/leddevice/schemas/schema-rawhid.json +++ b/libsrc/leddevice/schemas/schema-rawhid.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "VID": { + "type": "string", + "title":"VID", + "default" : "0x2341" + }, + "PID": { + "type": "string", + "title":"PID", + "default" : "0x8036" + }, + "delayAfterConnect": { + "type": "integer", + "title":"Delay after connect", + "default": 0 + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-sedu.json b/libsrc/leddevice/schemas/schema-sedu.json index 0bce7984..22e72a91 100644 --- a/libsrc/leddevice/schemas/schema-sedu.json +++ b/libsrc/leddevice/schemas/schema-sedu.json @@ -2,6 +2,20 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"Output path" + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "delayAfterConnect": { + "type": "integer", + "title":"Delay after connect", + "default": 250 + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-sk6812rgbw-spi.json b/libsrc/leddevice/schemas/schema-sk6812rgbw-spi.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-sk6812rgbw-spi.json +++ b/libsrc/leddevice/schemas/schema-sk6812rgbw-spi.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-ws2801.json b/libsrc/leddevice/schemas/schema-ws2801.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-ws2801.json +++ b/libsrc/leddevice/schemas/schema-ws2801.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true } diff --git a/libsrc/leddevice/schemas/schema-ws2812spi.json b/libsrc/leddevice/schemas/schema-ws2812spi.json index 0bce7984..a50f7e5d 100644 --- a/libsrc/leddevice/schemas/schema-ws2812spi.json +++ b/libsrc/leddevice/schemas/schema-ws2812spi.json @@ -2,6 +2,21 @@ "type":"object", "required":true, "properties":{ + "output": { + "type": "string", + "title":"SPI path", + "enum" : ["/dev/spidev0.0","/dev/spidev0.1"] + }, + "rate": { + "type": "integer", + "title":"Baudrate", + "default": 1000000 + }, + "invert": { + "type": "boolean", + "title":"Invert signal", + "default": false + } }, "additionalProperties": true }