IBridgeLocator locator = new HttpBridgeLocator();
var bridgeIPs = await locator.LocateBridgesAsync(TimeSpan.FromSeconds(5));
Console.WriteLine(bridgeIPs.First());
But what I get on console is "Q42.HueApi.Models.Bridge.LocatedBridge192". I don't know if it's a bug or it's just me that is not getting what I'm doing wrong.
Any help would be great.
P.S.: Currently I'm using the following to get the bridge ip, but I really wanted to use the LocateBridgesAsync method.
HttpClient client = new HttpClient();
string response = await client.GetStringAsync("https://discovery.meethue.com");
response = response.Substring(1, response.Length - 3); // removes '[' and ']' from string
var responseModel = JsonConvert.DeserializeObject(response);
JObject data = JObject.Parse(responseModel.ToString());
Console.WriteLine(data["internalipaddress"]?.ToString());
I'm trying to use the following:
But what I get on console is "Q42.HueApi.Models.Bridge.LocatedBridge192". I don't know if it's a bug or it's just me that is not getting what I'm doing wrong.
Any help would be great.
P.S.: Currently I'm using the following to get the bridge ip, but I really wanted to use the LocateBridgesAsync method.