From c2d91806e9e51780626f8a408bccb09b199f55a0 Mon Sep 17 00:00:00 2001 From: Will Goring Date: Sun, 31 May 2020 17:55:46 +0100 Subject: [PATCH] switch to new (still active) discovery URL --- lib/hue/client.rb | 2 +- test/hue/client_test.rb | 2 +- test/hue/light_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hue/client.rb b/lib/hue/client.rb index be7abddb..46bd1ccb 100644 --- a/lib/hue/client.rb +++ b/lib/hue/client.rb @@ -38,7 +38,7 @@ def bridges easy = Curl::Easy.new easy.follow_location = true easy.max_redirects = 10 - easy.url = 'https://www.meethue.com/api/nupnp' + easy.url = 'https://discovery.meethue.com/' easy.perform JSON(easy.body).each do |hash| bs << Bridge.new(self, hash) diff --git a/test/hue/client_test.rb b/test/hue/client_test.rb index bf0bedd3..f3485fa1 100644 --- a/test/hue/client_test.rb +++ b/test/hue/client_test.rb @@ -4,7 +4,7 @@ class ClientTest < Minitest::Test def before_setup super - stub_request(:get, "https://www.meethue.com/api/nupnp"). + stub_request(:get, "https://discovery.meethue.com/"). to_return(:body => '[{"id":"ffa57b3b257200065704","internalipaddress":"192.168.0.1"},{"id":"63c2fc01391276a319f9","internalipaddress":"192.168.0.2"}]') stub_request(:get, %r{http://192.168.0.1/api/*}).to_return(:body => '[{"success":true}]') diff --git a/test/hue/light_test.rb b/test/hue/light_test.rb index 061eab2a..3591749b 100644 --- a/test/hue/light_test.rb +++ b/test/hue/light_test.rb @@ -4,7 +4,7 @@ class LightTest < Minitest::Test def before_setup super - stub_request(:get, "https://www.meethue.com/api/nupnp"). + stub_request(:get, "https://discovery.meethue.com/"). to_return(:body => '[{"internalipaddress":"localhost"}]') stub_request(:get, %r{http://localhost/api/*}).to_return(:body => '[{"success":true}]')