查找Philips Hue的网桥IP地址
本文关键字:IP 地址 网桥 Philips Hue 查找 | 更新日期: 2023-09-27 18:04:55
我使用了下面的示例链接Nuget for HueApi
static void Main(string[] args)
{
IBridgeLocator locator = new SSDPBridgeLocator();
//For Windows 8 and .NET45 projects you can use the SSDPBridgeLocator which actually scans your network.
//See the included BridgeDiscoveryTests and the specific .NET and .WinRT projects
IEnumerable<string> bridgeIPs = locator.LocateBridgesAsync(TimeSpan.FromSeconds(5)).GetAwaiter().GetResult();
foreach (var bridgeIp in bridgeIPs)
{
Console.WriteLine(bridgeIp);
}
Console.ReadLine();
}
当我运行这个控制台应用程序时,它找不到网桥ip地址。有人能解释一下我做错了什么吗?我验证了Philips Hue的桥工作正常。
如何在网络中自动找到Philips Hue bridge ?
我应该在哪个凭据上运行控制台应用程序?
我面临的问题:在我使用HueApi的Nuget并进行构建并试图运行它用来成功检索网桥IP地址的代码之后,但在其他时候失败了。
我确保我一直成功运行的一些事情:1)像Ben在评论中提到的那样以Admin的身份运行2)清理并重新构建,然后尝试运行应用程序。