1

我使用了以下链接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 地址。有人可以解释我做错了什么吗?我确认飞利浦 Hue 的网桥工作正常。

如何在网络中自动找到 Philips Hue 网桥?

我应该在哪些凭据上运行控制台应用程序?

4

1 回答 1

0

我面临的问题:在我为HueApi 使用 Nuget并进行构建并尝试运行它曾经成功检索桥 IP 地址的代码之后,但在其他时候失败了。

我确保我一直成功运行的一些事情:1)按照 Ben 在评论中提到的以管理员​​身份运行 2)进行清理并重建,然后尝试运行应用程序。

于 2015-07-31T03:09:37.020 回答