private void Communication_DeviceDiscovered(object sender, DiscoveredEventArgs e)
        {
            Log.Info($"Device Discovered: {e.DiscoveredDevice.ToString()}");
            string ip   = e.DiscoveredDevice.IP;
            string json = JsonConvert.SerializeObject(Communication.DiscoveredDevices);

            sm.SetKernelSetting(ESettingsType.APPLICATION, NANOLEAF_DISCOVERED_CONTROLLERS, json);
            addControllerAsync(ip);
        }
Exemplo n.º 2
0
        void locator_DeviceStatusUpdate(object sender, DiscoveredEventArgs e)
        {
            SimpleHttpClient client  = new SimpleHttpClient();
            DeviceFactory    factory = new DeviceFactory(client);
            var device = factory.Create(new Uri(e.Device.Location));

            if (device == null)
            {
                return;
            }
            devicesList.Add(device);
            foundDevices.Enqueue(device);
        }
Exemplo n.º 3
0
 private static void Communication_DeviceDiscovered(object sender, DiscoveredEventArgs e)
 {
     Console.WriteLine($"Device Discovered: {e.DiscoveredDevice.ToString()}");
 }
Exemplo n.º 4
0
 static void ssdp_DeviceStatusUpdate(object sender, DiscoveredEventArgs e)
 {
     Console.WriteLine(e.Device.Location);
 }