コード例 #1
0
        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));
            }
        }
コード例 #2
0
ファイル: MiRobotV1.cs プロジェクト: sergey-brutsky/mi-home
        /// <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));
            }
        }