diff --git a/Essentials/PepperDashEssentials/ControlSystem.cs b/Essentials/PepperDashEssentials/ControlSystem.cs
index 4e20e064..4ca8a8d7 100644
--- a/Essentials/PepperDashEssentials/ControlSystem.cs
+++ b/Essentials/PepperDashEssentials/ControlSystem.cs
@@ -32,6 +32,9 @@ namespace PepperDash.Essentials
///
public override void InitializeSystem()
{
+ CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
+ ConsoleAccessLevelEnum.AccessOperator);
+
CrestronConsole.AddNewConsoleCommand(s =>
{
foreach (var tl in TieLineCollection.Default)
@@ -54,7 +57,7 @@ namespace PepperDash.Essentials
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
- GoWithLoad();
+ //GoWithLoad();
}
///
diff --git a/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs b/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs
index ce70e381..2e952c36 100644
--- a/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs
+++ b/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs
@@ -1005,6 +1005,10 @@ namespace PepperDash.Essentials.Fusion
///
void SetUpCommunitcationMonitors()
{
+ uint displayNum = 0;
+ uint touchpanelNum = 0;
+ uint xpanelNum = 0;
+
// Attach to all room's devices with monitors.
//foreach (var dev in DeviceManager.Devices)
foreach (var dev in DeviceManager.GetDevices())
@@ -1012,41 +1016,56 @@ namespace PepperDash.Essentials.Fusion
if (!(dev is ICommunicationMonitor))
continue;
- var keyNum = ExtractNumberFromKey(dev.Key);
- if (keyNum == -1)
- {
- Debug.Console(1, this, "WARNING: Cannot link device '{0}' to numbered Fusion monitoring attributes",
- dev.Key);
- continue;
- }
- string attrName = null;
- uint attrNum = Convert.ToUInt32(keyNum);
+ string attrName = null;
+ uint attrNum = 1;
- if (dev is EssentialsTouchpanelController)
+ //var keyNum = ExtractNumberFromKey(dev.Key);
+ //if (keyNum == -1)
+ //{
+ // Debug.Console(1, this, "WARNING: Cannot link device '{0}' to numbered Fusion monitoring attributes",
+ // dev.Key);
+ // continue;
+ //}
+ //uint attrNum = Convert.ToUInt32(keyNum);
+
+ // Check for UI devices
+ var uiDev = dev as EssentialsTouchpanelController;
+ if (uiDev != null)
{
- if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.DeviceSupport.TswFt5Button)
- {
- if (attrNum > 10)
- continue;
- attrName = "Online - Touch Panel " + attrNum;
- attrNum += 150;
- }
- else if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
+ if (uiDev.Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
{
+ attrNum = attrNum + touchpanelNum;
+
if (attrNum > 10)
continue;
attrName = "Online - XPanel " + attrNum;
attrNum += 160;
+
+ touchpanelNum++;
}
- }
+ else
+ {
+ attrNum = attrNum + xpanelNum;
+
+ if (attrNum > 10)
+ continue;
+ attrName = "Online - Touch Panel " + attrNum;
+ attrNum += 150;
+
+ xpanelNum++;
+ }
+ }
//else
if (dev is DisplayBase)
{
+ attrNum = attrNum + displayNum;
if (attrNum > 10)
continue;
attrName = "Online - Display " + attrNum;
attrNum += 170;
+
+ displayNum++;
}
//else if (dev is DvdDeviceBase)
//{
@@ -1265,7 +1284,7 @@ namespace PepperDash.Essentials.Fusion
/// -1 if no number matched
int ExtractNumberFromKey(string key)
{
- var capture = System.Text.RegularExpressions.Regex.Match(key, @"\D+(\d+)");
+ var capture = System.Text.RegularExpressions.Regex.Match(key, @"\b(\d+)");
if (!capture.Success)
return -1;
else return Convert.ToInt32(capture.Groups[1].Value);
diff --git a/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs b/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs
index cfa8e996..4b504af0 100644
--- a/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs
+++ b/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs
@@ -12,7 +12,9 @@
public bool ShowDate { get; set; }
public bool ShowTime { get; set; }
public UiSetupPropertiesConfig Setup { get; set; }
- public string HeaderStyle { get; set; }
+ public string HeaderStyle { get; set; }
+ public bool IncludeInFusionRoomHealth { get; set; }
+
///
/// The count of sources that will trigger the "additional" arrows to show on the SRL.
diff --git a/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs b/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs
index 5fae4414..88fbc7bf 100644
--- a/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs
+++ b/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs
@@ -13,9 +13,13 @@ using PepperDash.Essentials.Core.PageManagers;
namespace PepperDash.Essentials
{
- public class EssentialsTouchpanelController : Device
+ public class EssentialsTouchpanelController : Device, ICommunicationMonitor
{
- public BasicTriListWithSmartObject Panel { get; private set; }
+ public BasicTriListWithSmartObject Panel { get; private set; }
+
+ public StatusMonitorBase CommunicationMonitor { get; private set; }
+
+ public bool IncludeInFusionRoomHealth { get; private set; }
public PanelDriverBase PanelDriver { get; private set; }
@@ -35,48 +39,97 @@ namespace PepperDash.Essentials
///
public EssentialsTouchpanelController(string key, string name, string type, CrestronTouchpanelPropertiesConfig props, uint id)
: base(key, name)
- {
+ {
+ IncludeInFusionRoomHealth = props.IncludeInFusionRoomHealth;
+
+ Debug.Console(0, this, "Creating hardware...");
+ type = type.ToLower();
+ try
+ {
+ if (type == "crestronapp")
+ {
+ var app = new CrestronApp(id, Global.ControlSystem);
+ app.ParameterProjectName.Value = props.ProjectName;
+ Panel = app;
+ }
+ else if (type == "tsw550")
+ Panel = new Tsw550(id, Global.ControlSystem);
+ else if (type == "tsw552")
+ Panel = new Tsw552(id, Global.ControlSystem);
+ else if (type == "tsw560")
+ Panel = new Tsw560(id, Global.ControlSystem);
+ else if (type == "tsw750")
+ Panel = new Tsw750(id, Global.ControlSystem);
+ else if (type == "tsw752")
+ Panel = new Tsw752(id, Global.ControlSystem);
+ else if (type == "tsw760")
+ Panel = new Tsw760(id, Global.ControlSystem);
+ else if (type == "tsw1050")
+ Panel = new Tsw1050(id, Global.ControlSystem);
+ else if (type == "tsw1052")
+ Panel = new Tsw1052(id, Global.ControlSystem);
+ else if (type == "tsw1060")
+ Panel = new Tsw1060(id, Global.ControlSystem);
+ else if (type == "xpanel")
+ Panel = new XpanelForSmartGraphics(id, Global.ControlSystem);
+ else
+ {
+ Debug.Console(0, this, "WARNING: Cannot create TSW controller with type '{0}'", type);
+ return;
+ }
+ }
+ catch (Exception e)
+ {
+ Debug.Console(0, this, "WARNING: Cannot create TSW base class. Panel will not function: {0}", e.Message);
+ return;
+ }
+
+ CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, Panel, 30000, 120000);
+
AddPostActivationAction(() =>
{
- Debug.Console(0, this, "Creating hardware...");
- type = type.ToLower();
- try
- {
- if (type == "crestronapp")
- {
- var app = new CrestronApp(id, Global.ControlSystem);
- app.ParameterProjectName.Value = props.ProjectName;
- Panel = app;
- }
- else if (type == "tsw550")
- Panel = new Tsw550(id, Global.ControlSystem);
- else if (type == "tsw552")
- Panel = new Tsw552(id, Global.ControlSystem);
- else if (type == "tsw560")
- Panel = new Tsw560(id, Global.ControlSystem);
- else if (type == "tsw750")
- Panel = new Tsw750(id, Global.ControlSystem);
- else if (type == "tsw752")
- Panel = new Tsw752(id, Global.ControlSystem);
- else if (type == "tsw760")
- Panel = new Tsw760(id, Global.ControlSystem);
- else if (type == "tsw1050")
- Panel = new Tsw1050(id, Global.ControlSystem);
- else if (type == "tsw1052")
- Panel = new Tsw1052(id, Global.ControlSystem);
- else if (type == "tsw1060")
- Panel = new Tsw1060(id, Global.ControlSystem);
- else
- {
- Debug.Console(0, this, "WARNING: Cannot create TSW controller with type '{0}'", type);
- return;
- }
- }
- catch (Exception e)
- {
- Debug.Console(0, this, "WARNING: Cannot create TSW base class. Panel will not function: {0}", e.Message);
- return;
- }
+ //Debug.Console(0, this, "Creating hardware...");
+ //type = type.ToLower();
+ //try
+ //{
+ // if (type == "crestronapp")
+ // {
+ // var app = new CrestronApp(id, Global.ControlSystem);
+ // app.ParameterProjectName.Value = props.ProjectName;
+ // Panel = app;
+ // }
+ // else if (type == "tsw550")
+ // Panel = new Tsw550(id, Global.ControlSystem);
+ // else if (type == "tsw552")
+ // Panel = new Tsw552(id, Global.ControlSystem);
+ // else if (type == "tsw560")
+ // Panel = new Tsw560(id, Global.ControlSystem);
+ // else if (type == "tsw750")
+ // Panel = new Tsw750(id, Global.ControlSystem);
+ // else if (type == "tsw752")
+ // Panel = new Tsw752(id, Global.ControlSystem);
+ // else if (type == "tsw760")
+ // Panel = new Tsw760(id, Global.ControlSystem);
+ // else if (type == "tsw1050")
+ // Panel = new Tsw1050(id, Global.ControlSystem);
+ // else if (type == "tsw1052")
+ // Panel = new Tsw1052(id, Global.ControlSystem);
+ // else if (type == "tsw1060")
+ // Panel = new Tsw1060(id, Global.ControlSystem);
+ // else if (type == "xpanel")
+ // Panel = new XpanelForSmartGraphics(id, Global.ControlSystem);
+ // else
+ // {
+ // Debug.Console(0, this, "WARNING: Cannot create TSW controller with type '{0}'", type);
+ // return;
+ // }
+ //}
+ //catch (Exception e)
+ //{
+ // Debug.Console(0, this, "WARNING: Cannot create TSW base class. Panel will not function: {0}", e.Message);
+ // return;
+ //}
+
// Reserved sigs
if (Panel is TswFt5ButtonSystem)
diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz
index 3d899cbd..71977d34 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 68eabfc4..e6b84329 100644
Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ