static void Main(string[] args) { /* * Plm fluff = new Plm("COM4"); * var database = fluff.GetAllLinkDatabase(); * foreach (var record in database.Records) * { * // You can attempt to connect to each device * // to figure out what it is: * DeviceBase device; * if (fluff.Network * .TryConnectToDevice(record.DeviceId, out device)) * { * // It responded. You can get identification info like this: * string category = device.DeviceCategory; * string subcategory = device.DeviceSubcategory; * } * else * { * // couldn't connect - device may have been removed? * } * } */ FluffInsteon insteon = new FluffInsteon("COM4", null); insteon.DeviceAdded += insteon_DeviceAdded; insteon.Startup(); while (true) { Thread.Sleep(10000); } System.Console.WriteLine("Frog"); }
/// <summary> /// Setup the automation system. /// </summary> /// <param name="config">The configuration input</param> /// <param name="devices">The existing devices</param> public Plugins(Configuration config, IList <BasicDevice> devices) { insteon = new FluffInsteon(config.InsteonPort, null); insteon.Startup(); }