public static void DiscoverDevices() { var discoveredHumidifiers = MiioTransport .SendDiscoverMessage() .Where(x => x.type == "0404"); // magic number identifying air humidifier foreach (var(ip, type, serial, token) in discoveredHumidifiers) { OnDiscovered?.Invoke(null, new DiscoverEventArgs(ip, type, serial, token)); } }
/// <summary> /// Find all available mi robot vacuums in the LAN /// </summary> public static void DiscoverDevices() { var discoveredRobots = MiioTransport .SendDiscoverMessage() .Where(x => x.type == "05c5"); // magic number identifying rockrobo.vacuum.v1 foreach (var(ip, type, serial, token) in discoveredRobots) { OnDiscovered?.Invoke(null, new DiscoverEventArgs(ip, type, serial, token)); } }