I'm running into a weird issue: for some reason, whenever I use the SsdpLocator it returns over 1900 devices (although I only have 3 actual devices) on my network. Its probably related to my network (but I do think some endusers are experiencing the same issue). What happens then is that the locator checks for each device if it is a Hue bridge (so it really takes a long time :-)).
To be safe, it would be nice if we only check if its a Hue bridge for a list of destinct devices:
var endpoints = discoveredDevices.Where(s => s.EndsWith("/description.xml")).ToList(); // 1907var filteredEndpoints = endpoints.Distinct(); //3foreach (var endpoint in filteredEndpoints)
Please let me know what you think before I do a pull request!
I'm running into a weird issue: for some reason, whenever I use the SsdpLocator it returns over 1900 devices (although I only have 3 actual devices) on my network. Its probably related to my network (but I do think some endusers are experiencing the same issue). What happens then is that the locator checks for each device if it is a Hue bridge (so it really takes a long time :-)).
To be safe, it would be nice if we only check if its a Hue bridge for a list of destinct devices:
var endpoints = discoveredDevices.Where(s => s.EndsWith("/description.xml")).ToList(); // 1907
var filteredEndpoints = endpoints.Distinct(); //3
foreach (var endpoint in filteredEndpoints)
Please let me know what you think before I do a pull request!