diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index dd8f3d5a..9a48000a 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -195,6 +195,8 @@ namespace PepperDash.Essentials } else // Handles Linux OS (Virtual Control) { + Debug.SetDebugLevel(2); + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion); // Set path to User/ diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs index a1326770..252c9c48 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs @@ -394,35 +394,51 @@ namespace PepperDash.Essentials.Core.Bridges var controlProperties = CommFactory.GetControlPropertiesConfig(dc); + BasicTriList eisc; + switch (dc.Type.ToLower()) { case "eiscapiadv": case "eiscapiadvanced": { - var eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt, + eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem); - return new EiscApiAdvanced(dc, eisc); + break; } case "eiscapiadvancedserver": { - var eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem); - return new EiscApiAdvanced(dc, eisc); + eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem); + break; } case "eiscapiadvancedclient": { - var eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem); - return new EiscApiAdvanced(dc, eisc); + eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem); + break; } case "vceiscapiadv": case "vceiscapiadvanced": { - var eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, InitialParametersClass.RoomId, + if (string.IsNullOrEmpty(controlProperties.RoomId)) + { + Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key); + eisc = null; + break; + } + eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, controlProperties.RoomId, Global.ControlSystem); - return new EiscApiAdvanced(dc, eisc); + break; } default: - return null; + eisc = null; + break; } + + if (eisc == null) + { + return null; + } + + return new EiscApiAdvanced(dc, eisc); } } diff --git a/packages.config b/packages.config index 4c411add..e2f8b03b 100644 --- a/packages.config +++ b/packages.config @@ -1,3 +1,3 @@ - + \ No newline at end of file