From 8e46d575e4a3a8fc42d7537d49f7c078753f6a8b Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 6 Jan 2022 12:24:36 -0700 Subject: [PATCH 1/5] feat(essentials): Adds JsonProperty attribute tags --- .../Essentials Devices Common/Codec/iHasDirectory.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs index b2ccb29c..642f03d0 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs @@ -69,6 +69,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec [JsonProperty("directoryResults")] public List CurrentDirectoryResults { get; private set; } + [JsonProperty("contacts")] public List Contacts { get @@ -77,6 +78,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } + [JsonProperty("folders")] public List Folders { get From 2d64e49f8ee3f1521435aa8b59f81e3650497d92 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 6 Jan 2022 15:32:47 -0700 Subject: [PATCH 2/5] feat(essentials): Adds JsonProperty attributes to LightingScene --- .../PepperDashEssentialsBase/Lighting/LightingBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs index eeb25531..569d2005 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs @@ -113,9 +113,12 @@ namespace PepperDash.Essentials.Core.Lighting public class LightingScene { + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] public string Name { get; set; } + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] public string ID { get; set; } bool _IsActive; + [JsonProperty("isActive", NullValueHandling = NullValueHandling.Ignore)] public bool IsActive { get @@ -128,6 +131,8 @@ namespace PepperDash.Essentials.Core.Lighting IsActiveFeedback.FireUpdate(); } } + + [JsonIgnore] public BoolFeedback IsActiveFeedback { get; set; } public LightingScene() From 482bef435ac3d4d1d731b71cc000aa04b201b393 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 19 Jan 2022 11:40:12 -0700 Subject: [PATCH 3/5] fix(essentials): #887 Adds missing "crestronapp" typename to factory --- PepperDashEssentials/UI/EssentialsTouchpanelController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PepperDashEssentials/UI/EssentialsTouchpanelController.cs b/PepperDashEssentials/UI/EssentialsTouchpanelController.cs index 9a8006e5..72e22b9c 100644 --- a/PepperDashEssentials/UI/EssentialsTouchpanelController.cs +++ b/PepperDashEssentials/UI/EssentialsTouchpanelController.cs @@ -213,7 +213,7 @@ namespace PepperDash.Essentials { public EssentialsTouchpanelControllerFactory() { - TypeNames = new List() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" }; + TypeNames = new List() { "crestronapp", "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" }; } public override EssentialsDevice BuildDevice(DeviceConfig dc) From 52c589b56b03666fc48394a4285075d5478adc36 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 19 Jan 2022 11:50:18 -0700 Subject: [PATCH 4/5] fix(essentials): #888 fixes legacy typename in example config files --- .../configurationFile-HuddleSpace-2-Source.json | 2 +- .../configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PepperDashEssentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json b/PepperDashEssentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json index 3e43dac6..d3ce3275 100644 --- a/PepperDashEssentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json +++ b/PepperDashEssentials/Example Configuration/EssentialsHuddleSpaceRoom/configurationFile-HuddleSpace-2-Source.json @@ -88,7 +88,7 @@ { "name": "Wireless Video", "key": "wePresent-1", - "type": "wePresent", + "type": "genericSource", "group": "genericSource", "uid": 9, "properties": { diff --git a/PepperDashEssentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json b/PepperDashEssentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json index 7cc97c47..1e5b66d2 100644 --- a/PepperDashEssentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json +++ b/PepperDashEssentials/Example Configuration/EssentialsHuddleVtc1Room/configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json @@ -114,7 +114,7 @@ { "name": "Wireless Video", "key": "wePresent-1", - "type": "wePresent", + "type": "genericSource", "properties": {}, "group": "genericSource", "uid": 3 From dba60cfd76827fde15a9688e0a998ff556ce611c Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 19 Jan 2022 11:51:26 -0700 Subject: [PATCH 5/5] fix(essentials): Fixes incorrect logical comparison for processor prompt with config value --- PepperDashEssentials/ControlSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index ef1a9378..84018a15 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -343,7 +343,7 @@ namespace PepperDash.Essentials { var prompt = Global.ControlSystem.ControllerPrompt; - var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) && + var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) || String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase); if (!typeMatch)