diff --git a/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs b/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs index 4bccd704..5e479f12 100644 --- a/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs +++ b/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs @@ -26,12 +26,20 @@ namespace PepperDash.Essentials.Core public ComPortController(string key, ComPort port, ComPort.ComPortSpec spec) : base(key) { + if (port == null) + { + Debug.Console(0, this, "ERROR: Invalid com port, continuing but comms will not function"); + return; + } + Port = port; Spec = spec; //IsConnected = new BoolFeedback(CommonBoolCue.IsConnected, () => true); if (Port.Parent is CrestronControlSystem) { + + var result = Port.Register(); if (result != eDeviceRegistrationUnRegistrationResponse.Success) { @@ -80,11 +88,15 @@ namespace PepperDash.Essentials.Core public void SendText(string text) { + if (Port == null) + return; Port.Send(text); } public void SendBytes(byte[] bytes) { + if (Port == null) + return; var text = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length); Port.Send(text); } diff --git a/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs b/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs index d137c46b..5e71b689 100644 --- a/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs +++ b/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs @@ -17,9 +17,6 @@ namespace PepperDash.Essentials.Core.Config [JsonProperty("info")] public InfoConfig Info { get; set; } - //[JsonProperty("roomLists")] - //public Dictionary> RoomLists { get; set; } - [JsonProperty("devices")] public List Devices { get; set; } diff --git a/Essentials/PepperDashEssentials/Config/EssentialsConfig.cs b/Essentials/PepperDashEssentials/Config/EssentialsConfig.cs index 80f410bc..3b2fec4d 100644 --- a/Essentials/PepperDashEssentials/Config/EssentialsConfig.cs +++ b/Essentials/PepperDashEssentials/Config/EssentialsConfig.cs @@ -25,7 +25,8 @@ namespace PepperDash.Essentials //public CotijaConfig Cotija { get; private set; } - public string SystemUuid + [JsonProperty("templateUuid")] + public string SystemUuid { get { @@ -37,7 +38,8 @@ namespace PepperDash.Essentials } } - public string TemplateUuid + [JsonProperty("systemUuid")] + public string TemplateUuid { get { diff --git a/Essentials/PepperDashEssentials/ControlSystem.cs b/Essentials/PepperDashEssentials/ControlSystem.cs index b6880d2c..f33e4c20 100644 --- a/Essentials/PepperDashEssentials/ControlSystem.cs +++ b/Essentials/PepperDashEssentials/ControlSystem.cs @@ -32,10 +32,6 @@ namespace PepperDash.Essentials /// public override void InitializeSystem() { - //CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file", - // ConsoleAccessLevelEnum.AccessOperator); - //CrestronConsole.AddNewConsoleCommand(s => TearDown(), "ungo", "Unloads configuration file", - // ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => { foreach (var tl in TieLineCollection.Default) diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index b8e7b23c..9e3266ca 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index cac41416..26409aff 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ