public PutDeviceUpdate ( ParadoxIp.Model.Device device ) : void | ||
device | ParadoxIp.Model.Device | |
리턴 | void |
public void AfterPluginsLoaded(IAppHost appHost) { var container = appHost.GetContainer(); if (container.Exists<IpModuleManager>()) { var manager = container.Resolve<IpModuleManager>(); manager.DeviceStatusChanged += (sender, args) => { logger.DebugFormat("{0}:{1}[{2}]", args.Device.Name, args.Device.Status, args.Device.ZoneId); var settings = container.Resolve<SmartThingsSettings>(); var cb = new SmartThingsCallbacks(settings); cb.PutDeviceUpdate(args.Device); }; manager.PartitionStatusChanged += (sender, args) => { logger.DebugFormat("{0}:{1}", args.Partition.Name, args.Partition.Status); var settings = container.Resolve<SmartThingsSettings>(); var cb = new SmartThingsCallbacks(settings); cb.PutPartitionUpdate(args.Partition); }; } else { logger.Error("Cannot find Ip Module Manager to register device and partition status changes events for SmartThings"); } }
public void AfterPluginsLoaded(IAppHost appHost) { var container = appHost.GetContainer(); if (container.Exists <IpModuleManager>()) { var manager = container.Resolve <IpModuleManager>(); manager.DeviceStatusChanged += (sender, args) => { logger.DebugFormat("{0}:{1}[{2}]", args.Device.Name, args.Device.Status, args.Device.ZoneId); var settings = container.Resolve <SmartThingsSettings>(); var cb = new SmartThingsCallbacks(settings); cb.PutDeviceUpdate(args.Device); }; manager.PartitionStatusChanged += (sender, args) => { logger.DebugFormat("{0}:{1}", args.Partition.Name, args.Partition.Status); var settings = container.Resolve <SmartThingsSettings>(); var cb = new SmartThingsCallbacks(settings); cb.PutPartitionUpdate(args.Partition); }; } else { logger.Error("Cannot find Ip Module Manager to register device and partition status changes events for SmartThings"); } }