From 88dbaa5f0a65f3c54f21eb970ffa12409626bccf Mon Sep 17 00:00:00 2001 From: birdhouse Date: Sun, 14 Jul 2019 12:23:47 +0200 Subject: [PATCH] Fixing PhilipsHue wizard, Fixing issue #545 --- assets/webconfig/js/wizard.js | 5 +++-- libsrc/leddevice/dev_net/LedDevicePhilipsHue.cpp | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/webconfig/js/wizard.js b/assets/webconfig/js/wizard.js index cd775e8e..3b56796e 100644 --- a/assets/webconfig/js/wizard.js +++ b/assets/webconfig/js/wizard.js @@ -26,6 +26,7 @@ if(withKodi) sendToKodi("stop"); step = 0; + location.reload(); } //rgb byte order wizard @@ -658,7 +659,7 @@ function getHueIPs(){ $('#wiz_hue_ipstate').html($.i18n('wiz_hue_searchb')); $.ajax({ - url: 'https://www.meethue.com/api/nupnp', + url: 'https://discovery.meethue.com', crossDomain: true, type: 'GET', timeout: 3000 @@ -697,7 +698,7 @@ } $('#retry_bridge').off().on('click', function(){ - hueIPs[0].internalipaddress = $('#ip').val(); + hueIPs.push({internalipaddress : $('#ip').val()}); hueIPsinc = 0; checkHueBridge(checkBridgeResult); }); diff --git a/libsrc/leddevice/dev_net/LedDevicePhilipsHue.cpp b/libsrc/leddevice/dev_net/LedDevicePhilipsHue.cpp index fe453894..83b672cf 100644 --- a/libsrc/leddevice/dev_net/LedDevicePhilipsHue.cpp +++ b/libsrc/leddevice/dev_net/LedDevicePhilipsHue.cpp @@ -446,10 +446,10 @@ int LedDevicePhilipsHue::write(const std::vector & ledValues) else { light.setOn(true); + // Write color if color has been changed. + light.setTransitionTime(transitionTime); + light.setColor(xy, brightnessFactor); } - // Write color if color has been changed. - light.setTransitionTime(transitionTime); - light.setColor(xy, brightnessFactor); idx++; }