diff --git a/assets/webconfig/content/huebridge.html b/assets/webconfig/content/huebridge.html
index 4e1237ba..ea44bee2 100644
--- a/assets/webconfig/content/huebridge.html
+++ b/assets/webconfig/content/huebridge.html
@@ -5,13 +5,14 @@
@@ -32,13 +33,13 @@
Hue Bridge
-
Press link button on the Hue Bridge now and confirm with the "Pair" button.
-
Please press link button on your Hue Bridge.
+
Please press link button on the Hue Bridge.
+
+
+
+
@@ -53,9 +54,11 @@
}
- $("#create_user_first").on("click", function() {
+ $("#create_user").on("click", function() {
+ var connectionRetries = 15;
var data = {"devicetype":"hyperion#"+Date.now()};
- $.ajax({
+ var UserInterval = setInterval(function(){
+ $.ajax({
type: "POST",
url: 'http://'+$("#ip").val()+'/api',
processData: false,
@@ -63,42 +66,39 @@
contentType: 'application/json',
data: JSON.stringify(data),
success: function(r) {
- $("#ip_alert").hide();
- if (typeof r[0].error != 'undefined') {
- if (r[0].error.description == "link button not pressed"){
- $('#pairmodal').modal('show')
- }
- }
- },
+ connectionRetries--;
+ $("#connectionTime").html(connectionRetries);
+ if(connectionRetries == 0) {
+ abortConnection(UserInterval);
+ }
+ else{
+ $("#abortConnection").hide();
+ $('#pairmodal').modal('show');
+ $("#ip_alert").hide();
+ if (typeof r[0].error != 'undefined') {
+ console.log("link not pressed");
+ }
+ if (typeof r[0].success != 'undefined') {
+ $('#pairmodal').modal('hide');
+ $('#user').val(r[0].success.username);
+ get_hue_lights();
+ clearInterval(UserInterval);
+ }
+ }
+ },
error: function(XMLHttpRequest, textStatus, errorThrown) {
$("#ip_alert").show();
+ clearInterval(UserInterval);
}
});
+ },1000);
});
-
- $("#create_user_second").on("click", function() {
- var data = {"devicetype":"my_hue_app#iphone pet2er"};
- $.ajax({
- type: "POST",
- url: 'http://'+$("#ip").val()+'/api',
- processData: false,
- contentType: 'application/json',
- data: JSON.stringify(data),
- success: function(r) {
- if (typeof r[0].error != 'undefined') {
- $("#link_not_pressed").show();
- }
- if (typeof r[0].success != 'undefined') {
- $('#pairmodal').modal('hide');
- $('#user').val(r[0].success.username);
- $("#link_not_pressed").hide();
- get_hue_lights();
- }
- }
- });
- });
-
+ function abortConnection(UserInterval){
+ clearInterval(UserInterval);
+ $("#abortConnection").show();
+ $('#pairmodal').modal('hide');
+ }
function get_hue_lights(){
$.ajax({
diff --git a/assets/webconfig/img/hyperion/ring-alt.svg b/assets/webconfig/img/hyperion/ring-alt.svg
new file mode 100644
index 00000000..b1844c4e
--- /dev/null
+++ b/assets/webconfig/img/hyperion/ring-alt.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/webconfig/lang/de.json b/assets/webconfig/lang/de.json
index 14ed9307..57735fac 100644
--- a/assets/webconfig/lang/de.json
+++ b/assets/webconfig/lang/de.json
@@ -32,6 +32,7 @@
"main_menu_system_token" : "System",
"main_menu_input_selection_token" : "Eingabeauswahl",
"main_menu_general_conf_token":"Allgemein",
+ "main_menu_leds_conf_token":"LEDs",
"remote_colors_label_color":"Farbe: ",
"remote_colors_button_reset":"Farbe zurücksetzen",
"remote_effects_intro" : "Die Effekt-Fernbedienung ermöglicht es dir Effekte zu starten für Demonstrations- oder Testzwecke. Vergessse nicht den Effekt wieder zu stoppen, wenn du fertig bist.",
@@ -39,8 +40,8 @@
"remote_effects_label_stopeffect":"Stoppe Effekte",
"remote_components_intro" : "Die Komponenten-Fenbedienung ermöglicht es dir Komponenten von Hyperion zu starten und stoppen. Beachte: Dies ist nur temporär und geht nach einem Neustart verloren. Möchtest du dauerhaft Komponenten aktivieren/deaktivieren benutze die Konfigurationsseiten.",
"hue_button_create_user_token":"Benutzer anlegen",
- "hue_press_link_modal":"Link Taste auf der Hue Bridge drücken und mit Button bestätigen.",
- "hue_press_link_modal_failure":"Bitte drücke die Link Taste auf deiner Hue Bridge.",
+ "hue_press_link_modal":"Bitte Link Taste auf der Hue Bridge drücken.",
+ "hue_failure_connection_token":"Connection Timeout. Bitte drücke die Taste rechtzeitig.",
"hue_button_pair":"Verbinden",
"hue_failure_ip_token":"Bitte überprüfe deine IP Adresse.",
"hue_label_username":"Benutzername:",