mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Adds logging for room on/off and occupancy events
This commit is contained in:
@@ -223,6 +223,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
CrestronEnvironment.Sleep(1000);
|
CrestronEnvironment.Sleep(1000);
|
||||||
|
|
||||||
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");
|
||||||
|
|
||||||
RunRouteAction("roomOff");
|
RunRouteAction("roomOff");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,8 +277,8 @@ namespace PepperDash.Essentials
|
|||||||
// Run this on a separate thread
|
// Run this on a separate thread
|
||||||
new CTimer(o =>
|
new CTimer(o =>
|
||||||
{
|
{
|
||||||
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);
|
var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
|
||||||
if(dict == null)
|
if(dict == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey);
|
Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey);
|
||||||
|
|||||||
@@ -334,8 +334,11 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
// Add Occupancy object from config
|
// Add Occupancy object from config
|
||||||
if (PropertiesConfig.Occupancy != null)
|
if (PropertiesConfig.Occupancy != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Setting Occupancy Provider for room");
|
||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
}
|
||||||
|
|
||||||
this.LogoUrl = PropertiesConfig.Logo.GetUrl();
|
this.LogoUrl = PropertiesConfig.Logo.GetUrl();
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
@@ -359,6 +362,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
CrestronEnvironment.Sleep(1000);
|
CrestronEnvironment.Sleep(1000);
|
||||||
|
|
||||||
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");
|
||||||
|
|
||||||
RunRouteAction("roomOff");
|
RunRouteAction("roomOff");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,7 +413,7 @@ namespace PepperDash.Essentials
|
|||||||
try
|
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);
|
var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
|
||||||
if (dict == null)
|
if (dict == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
ShutdownType = type;
|
ShutdownType = type;
|
||||||
ShutdownPromptTimer.Start();
|
ShutdownPromptTimer.Start();
|
||||||
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "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)
|
public void StartRoomVacancyTimer(eVacancyMode mode)
|
||||||
@@ -212,6 +212,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
return;
|
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 status provider is fusion, set flag to remote
|
||||||
if (statusProvider is Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
|
if (statusProvider is Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
|
||||||
OccupancyStatusProviderIsRemote = true;
|
OccupancyStatusProviderIsRemote = true;
|
||||||
@@ -223,12 +226,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
RoomOccupancy = statusProvider;
|
RoomOccupancy = statusProvider;
|
||||||
|
|
||||||
OnRoomOccupancyIsSet();
|
|
||||||
|
|
||||||
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange -= RoomIsOccupiedFeedback_OutputChange;
|
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange -= RoomIsOccupiedFeedback_OutputChange;
|
||||||
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange;
|
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange;
|
||||||
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Room Occupancy set to device: '{0}'", (statusProvider as Device).Key);
|
OnRoomOccupancyIsSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnRoomOccupancyIsSet()
|
void OnRoomOccupancyIsSet()
|
||||||
|
|||||||
Reference in New Issue
Block a user