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));
            }
        }
Exemple #2
0
        /// <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));
            }
        }