diff --git a/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs b/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs
index e4b503c3..9bec05b8 100644
--- a/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs
+++ b/PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs
@@ -223,6 +223,8 @@ namespace PepperDash.Essentials
CrestronEnvironment.Sleep(1000);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");
+
RunRouteAction("roomOff");
}
@@ -275,8 +277,8 @@ namespace PepperDash.Essentials
// Run this on a separate thread
new CTimer(o =>
{
- Debug.Console(1, this, "Run route action '{0}'", routeKey);
- var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey);
+ var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
if(dict == null)
{
Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey);
diff --git a/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs b/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs
index 62fbe754..b2db56ae 100644
--- a/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs
+++ b/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs
@@ -334,8 +334,11 @@ namespace PepperDash.Essentials
{
// Add Occupancy object from config
if (PropertiesConfig.Occupancy != null)
+ {
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
+ }
this.LogoUrl = PropertiesConfig.Logo.GetUrl();
this.SourceListKey = PropertiesConfig.SourceListKey;
@@ -359,6 +362,8 @@ namespace PepperDash.Essentials
CrestronEnvironment.Sleep(1000);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");
+
RunRouteAction("roomOff");
}
@@ -408,7 +413,7 @@ namespace PepperDash.Essentials
try
{
- Debug.Console(1, this, "Run route action '{0}'", routeKey);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Run route action '{0}'", routeKey);
var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
if (dict == null)
{
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs
new file mode 100644
index 00000000..6bdfc25c
--- /dev/null
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.GeneralIO;
+
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core
+{
+ ///
+ /// Wrapper class for CEN-IO-DIGIN-104 digital input module
+ ///
+ public class CenIoDigIn104Controller : Device, IDigitalInputPorts
+ {
+ public CenIoDi104 Di104 { get; private set; }
+
+ public CenIoDigIn104Controller(string key, string name, CenIoDi104 di104)
+ : base(key, name)
+ {
+ Di104 = di104;
+ }
+
+ #region IDigitalInputPorts Members
+
+ public CrestronCollection DigitalInputPorts
+ {
+ get { return Di104.DigitalInputPorts; }
+ }
+
+ public int NumberOfDigitalInputPorts
+ {
+ get { return Di104.NumberOfDigitalInputPorts; }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
index cfe5af0a..4eddd6ee 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
@@ -52,6 +52,13 @@ namespace PepperDash.Essentials.Core
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
return new GenericComm(dc);
}
+ else if (typeName == "ceniodigin104")
+ {
+ var control = CommFactory.GetControlPropertiesConfig(dc);
+ var ipid = control.CresnetIdInt;
+
+ return new CenIoDigIn104Controller(key, name, new Crestron.SimplSharpPro.GeneralIO.CenIoDi104(ipid, Global.ControlSystem));
+ }
// then check for types that have been added by plugin dlls.
if (FactoryMethods.ContainsKey(typeName))
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
index 7c3cd563..c6915164 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
@@ -62,6 +62,10 @@
False
..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll
+
+ False
+ ..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll
+
False
..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll
@@ -114,6 +118,7 @@
+
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs
index e8193837..7781f468 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs
@@ -100,7 +100,8 @@ namespace PepperDash.Essentials.Core
ShutdownPromptTimer.HasFinished += (o, a) => Shutdown(); // Shutdown is triggered
ShutdownPromptSeconds = 60;
- ShutdownVacancySeconds = 120;
+ ShutdownVacancySeconds = 120;
+
ShutdownType = eShutdownType.None;
RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer");
@@ -140,7 +141,7 @@ namespace PepperDash.Essentials.Core
case eVacancyMode.InShutdownWarning:
{
StartShutdown(eShutdownType.Vacancy);
- Debug.Console(0, this, "Shutting Down due to vacancy.");
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting Down due to vacancy.");
break;
}
default:
@@ -163,7 +164,7 @@ namespace PepperDash.Essentials.Core
ShutdownType = type;
ShutdownPromptTimer.Start();
- Debug.Console(0, this, "ShutdwonPromptTimer Started. Type: {0}. Seconds: {1}", ShutdownType, ShutdownPromptTimer.SecondsToCount);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "ShutdownPromptTimer Started. Type: {0}. Seconds: {1}", ShutdownType, ShutdownPromptTimer.SecondsToCount);
}
public void StartRoomVacancyTimer(eVacancyMode mode)
@@ -175,7 +176,7 @@ namespace PepperDash.Essentials.Core
VacancyMode = mode;
RoomVacancyShutdownTimer.Start();
- Debug.Console(0, this, "Vacancy Timer Started. Mode: {0}. Seconds: {1}", VacancyMode, RoomVacancyShutdownTimer.SecondsToCount);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Vacancy Timer Started. Mode: {0}. Seconds: {1}", VacancyMode, RoomVacancyShutdownTimer.SecondsToCount);
}
///
@@ -211,6 +212,9 @@ namespace PepperDash.Essentials.Core
return;
}
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Room Occupancy set to device: '{0}'", (statusProvider as Device).Key);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Timeout Minutes from Config is: {0}", timeoutMinutes);
+
// If status provider is fusion, set flag to remote
if (statusProvider is Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
OccupancyStatusProviderIsRemote = true;
@@ -218,16 +222,14 @@ namespace PepperDash.Essentials.Core
if(timeoutMinutes > 0)
RoomVacancyShutdownSeconds = timeoutMinutes * 60;
- Debug.Console(1, this, "RoomVacancyShutdownSeconds set to {0}", RoomVacancyShutdownSeconds);
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "RoomVacancyShutdownSeconds set to {0}", RoomVacancyShutdownSeconds);
RoomOccupancy = statusProvider;
- OnRoomOccupancyIsSet();
-
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange -= RoomIsOccupiedFeedback_OutputChange;
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange;
- Debug.Console(0, this, "Room Occupancy set to device: '{0}'", (statusProvider as Device).Key);
+ OnRoomOccupancyIsSet();
}
void OnRoomOccupancyIsSet()
@@ -252,13 +254,13 @@ namespace PepperDash.Essentials.Core
{
if (RoomOccupancy.RoomIsOccupiedFeedback.BoolValue == false)
{
- Debug.Console(1, this, "Notice: Vacancy Detected");
+ Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Notice: Vacancy Detected");
// Trigger the timer when the room is vacant
StartRoomVacancyTimer(eVacancyMode.InInitialVacancy);
}
else
{
- Debug.Console(1, this, "Notice: Occupancy Detected");
+ Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Notice: Occupancy Detected");
// Reset the timer when the room is occupied
RoomVacancyShutdownTimer.Cancel();
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
index 136f3c86..094b8022 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
@@ -66,6 +66,11 @@ namespace PepperDash.Essentials.DM
public const int RouteOffTime = 500;
Dictionary RouteOffTimers = new Dictionary();
+ ///
+ /// Text that represents when an output has no source routed to it
+ ///
+ public string NoRouteText = "";
+
///
/// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
///
@@ -128,6 +133,15 @@ namespace PepperDash.Essentials.DM
controller.InputNames = properties.InputNames;
controller.OutputNames = properties.OutputNames;
+
+ if (!string.IsNullOrEmpty(properties.NoRouteText))
+ {
+ controller.NoRouteText = properties.NoRouteText;
+ Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText);
+ }
+ else
+ Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText);
+
controller.PropertiesConfig = properties;
return controller;
}
@@ -217,7 +231,7 @@ namespace PepperDash.Essentials.DM
}
else
{
- return "";
+ return NoRouteText;
}
});
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
@@ -228,7 +242,7 @@ namespace PepperDash.Essentials.DM
}
else
{
- return "";
+ return NoRouteText;
}
});
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs
index 0c4ff887..6ed0e63b 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs
@@ -48,6 +48,11 @@ namespace PepperDash.Essentials.DM
public const int RouteOffTime = 500;
Dictionary RouteOffTimers = new Dictionary();
+ ///
+ /// Text that represents when an output has no source routed to it
+ ///
+ public string NoRouteText = "";
+
public static DmpsRoutingController GetDmpsRoutingController(string key, string name,
DmpsRoutingPropertiesConfig properties)
{
@@ -67,6 +72,9 @@ namespace PepperDash.Essentials.DM
controller.InputNames = properties.InputNames;
controller.OutputNames = properties.OutputNames;
+ if (!string.IsNullOrEmpty(properties.NoRouteText))
+ controller.NoRouteText = properties.NoRouteText;
+
return controller;
}
@@ -191,7 +199,7 @@ namespace PepperDash.Essentials.DM
}
else
{
- return "";
+ return NoRouteText;
}
});
OutputAudioRouteNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
@@ -202,7 +210,7 @@ namespace PepperDash.Essentials.DM
}
else
{
- return "";
+ return NoRouteText;
}
});
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs
index 22da6c44..d347fbc8 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs
@@ -32,6 +32,9 @@ namespace PepperDash.Essentials.DM.Config
[JsonProperty("outputNames")]
public Dictionary OutputNames { get; set; }
+ [JsonProperty("noRouteText")]
+ public string NoRouteText { get; set; }
+
[JsonProperty("inputSlotSupportsHdcp2")]
public Dictionary InputSlotSupportsHdcp2 { get; set; }
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs
index 57dd4a72..b4ed5342 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs
@@ -20,6 +20,9 @@ namespace PepperDash.Essentials.DM.Config
[JsonProperty("outputNames")]
public Dictionary OutputNames { get; set; }
+ [JsonProperty("noRouteText")]
+ public string NoRouteText { get; set; }
+
public DmpsRoutingPropertiesConfig()
{
InputNames = new Dictionary();
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs
index 4c7779ab..975487e0 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs
@@ -167,84 +167,91 @@ namespace PepperDash.Essentials.Devices.Displays
///
void Communication_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs e)
{
- // This is probably not thread-safe buffering
- // Append the incoming bytes with whatever is in the buffer
- var newBytes = new byte[IncomingBuffer.Length + e.Bytes.Length];
- IncomingBuffer.CopyTo(newBytes, 0);
- e.Bytes.CopyTo(newBytes, IncomingBuffer.Length);
-
- if (Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
- Debug.Console(2, this, "Received:{0}", ComTextHelper.GetEscapedText(newBytes));
-
- // Need to find AA FF and have
- for (int i = 0; i < newBytes.Length; i++)
+ try
{
- if (newBytes[i] == 0xAA && newBytes[i + 1] == 0xFF)
+ // This is probably not thread-safe buffering
+ // Append the incoming bytes with whatever is in the buffer
+ var newBytes = new byte[IncomingBuffer.Length + e.Bytes.Length];
+ IncomingBuffer.CopyTo(newBytes, 0);
+ e.Bytes.CopyTo(newBytes, IncomingBuffer.Length);
+
+ if (Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
+ Debug.Console(2, this, "Received:{0}", ComTextHelper.GetEscapedText(newBytes));
+
+ // Need to find AA FF and have
+ for (int i = 0; i < newBytes.Length; i++)
{
- newBytes = newBytes.Skip(i).ToArray(); // Trim off junk if there's "dirt" in the buffer
-
- // parse it
- // If it's at least got the header, then process it,
- while (newBytes.Length > 4 && newBytes[0] == 0xAA && newBytes[1] == 0xFF)
+ if (newBytes[i] == 0xAA && newBytes[i + 1] == 0xFF)
{
- var msgLen = newBytes[3];
- // if the buffer is shorter than the header (3) + message (msgLen) + checksum (1),
- // give and save it for next time
- if (newBytes.Length < msgLen + 4)
- break;
+ newBytes = newBytes.Skip(i).ToArray(); // Trim off junk if there's "dirt" in the buffer
- // Good length, grab the message
- var message = newBytes.Skip(4).Take(msgLen).ToArray();
-
- // At this point, the ack/nak is the first byte
- if (message[0] == 0x41)
+ // parse it
+ // If it's at least got the header, then process it,
+ while (newBytes.Length > 4 && newBytes[0] == 0xAA && newBytes[1] == 0xFF)
{
- switch (message[1]) // type byte
+ var msgLen = newBytes[3];
+ // if the buffer is shorter than the header (3) + message (msgLen) + checksum (1),
+ // give and save it for next time
+ if (newBytes.Length < msgLen + 4)
+ break;
+
+ // Good length, grab the message
+ var message = newBytes.Skip(4).Take(msgLen).ToArray();
+
+ // At this point, the ack/nak is the first byte
+ if (message[0] == 0x41)
{
- case 0x00: // General status
- //UpdatePowerFB(message[2], message[5]); // "power" can be misrepresented when the display sleeps
+ switch (message[1]) // type byte
+ {
+ case 0x00: // General status
+ //UpdatePowerFB(message[2], message[5]); // "power" can be misrepresented when the display sleeps
- // Handle the first power on fb when waiting for it.
- if (IsPoweringOnIgnorePowerFb && message[2] == 0x01)
- IsPoweringOnIgnorePowerFb = false;
- // Ignore general-status power off messages when powering up
- if (!(IsPoweringOnIgnorePowerFb && message[2] == 0x00))
- UpdatePowerFB(message[2]);
- UpdateVolumeFB(message[3]);
- UpdateMuteFb(message[4]);
- UpdateInputFb(message[5]);
- break;
+ // Handle the first power on fb when waiting for it.
+ if (IsPoweringOnIgnorePowerFb && message[2] == 0x01)
+ IsPoweringOnIgnorePowerFb = false;
+ // Ignore general-status power off messages when powering up
+ if (!(IsPoweringOnIgnorePowerFb && message[2] == 0x00))
+ UpdatePowerFB(message[2]);
+ UpdateVolumeFB(message[3]);
+ UpdateMuteFb(message[4]);
+ UpdateInputFb(message[5]);
+ break;
- case 0x11:
- UpdatePowerFB(message[2]);
- break;
+ case 0x11:
+ UpdatePowerFB(message[2]);
+ break;
- case 0x12:
- UpdateVolumeFB(message[2]);
- break;
+ case 0x12:
+ UpdateVolumeFB(message[2]);
+ break;
- case 0x13:
- UpdateMuteFb(message[2]);
- break;
+ case 0x13:
+ UpdateMuteFb(message[2]);
+ break;
- case 0x14:
- UpdateInputFb(message[2]);
- break;
+ case 0x14:
+ UpdateInputFb(message[2]);
+ break;
- default:
- break;
+ default:
+ break;
+ }
}
+ // Skip over what we've used and save the rest for next time
+ newBytes = newBytes.Skip(5 + msgLen).ToArray();
}
- // Skip over what we've used and save the rest for next time
- newBytes = newBytes.Skip(5 + msgLen).ToArray();
- }
-
- break; // parsing will mean we can stop looking for header in loop
- }
- }
- // Save whatever partial message is here
- IncomingBuffer = newBytes;
+ break; // parsing will mean we can stop looking for header in loop
+ }
+ }
+
+ // Save whatever partial message is here
+ IncomingBuffer = newBytes;
+ }
+ catch (Exception err)
+ {
+ Debug.Console(2, this, "Error parsing feedback: {0}", err);
+ }
}
///
@@ -256,6 +263,7 @@ namespace PepperDash.Essentials.Devices.Displays
if (newVal != _PowerIsOn)
{
_PowerIsOn = newVal;
+ Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Feedback Power State: {0}", _PowerIsOn);
PowerIsOnFeedback.FireUpdate();
}
}
@@ -364,6 +372,8 @@ namespace PepperDash.Essentials.Devices.Displays
///
public override void PowerOn()
{
+ Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering On Display");
+
IsPoweringOnIgnorePowerFb = true;
//Send(PowerOnCmd);
SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x01, 0x00 });
@@ -387,6 +397,8 @@ namespace PepperDash.Essentials.Devices.Displays
///
public override void PowerOff()
{
+ Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering Off Display");
+
IsPoweringOnIgnorePowerFb = false;
// If a display has unreliable-power off feedback, just override this and
// remove this check.