diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index c6b1e17a..3a8e6620 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -101,6 +101,8 @@ namespace PepperDash.Essentials.Bridges public EiscApi(DeviceConfig dc) : base(dc.Key) { + JoinMaps = new Dictionary(); + PropertiesConfig = JsonConvert.DeserializeObject(dc.Properties.ToString()); Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem); @@ -119,6 +121,9 @@ namespace PepperDash.Essentials.Bridges if (device != null) { + Debug.Console(1, this, "Linking Device: '{0}'", d.DeviceKey); + + if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type. { (device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); @@ -126,6 +131,7 @@ namespace PepperDash.Essentials.Bridges } else if (device is IBridgeAdvanced) { + Debug.Console(2, this, "'{0}' is IBridgeAdvanced"); (device as IBridgeAdvanced).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this); } else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index ac33c7e7..f158fc1f 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -290,12 +290,13 @@ namespace PepperDash.Essentials /// public void LoadDevices() { + // Instantiate the Device Factories + new CoreDeviceFactory(); + + // Build the processor wrapper class - DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor")); - - // Add global System Monitor device DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor")); diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs index 0fab13ae..201675d0 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs @@ -48,7 +48,6 @@ namespace PepperDash.Essentials.Core var typeName = dc.Type.ToLower(); - // Check for types that have been added by plugin dlls. if (FactoryMethods.ContainsKey(typeName)) { @@ -57,11 +56,11 @@ namespace PepperDash.Essentials.Core } // Check "core" types - if (typeName == "genericcomm") - { - Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); - return new GenericComm(dc); - } + //if (typeName == "genericcomm") + //{ + // Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); + // return new GenericComm(dc); + //} if (typeName == "ceniodigin104") { var control = CommFactory.GetControlPropertiesConfig(dc);