diff --git a/Essentials Devices Common/Essentials Devices Common/Occupancy/EssentialsGlsOccupancySensorBaseController.cs b/Essentials Devices Common/Essentials Devices Common/Occupancy/EssentialsGlsOccupancySensorBaseController.cs index 60ea5c63..bc49561f 100644 --- a/Essentials Devices Common/Essentials Devices Common/Occupancy/EssentialsGlsOccupancySensorBaseController.cs +++ b/Essentials Devices Common/Essentials Devices Common/Occupancy/EssentialsGlsOccupancySensorBaseController.cs @@ -16,10 +16,25 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy public BoolFeedback RoomIsOccupiedFeedback { get; private set; } + public Func RoomIsOccupiedFeedbackFunc + { + get + { + return () => OccSensor.OccupancyDetectedFeedback.BoolValue; + } + } + public EssentialsGlsOccupancySensorBaseController(string key, string name, GlsOccupancySensorBase sensor, GlsOccupancySensorConfigurationProperties props) : base(key, name, sensor) { + OccSensor = sensor; + OccSensor.GlsOccupancySensorChange += new GlsOccupancySensorChangeEventHandler(sensor_GlsOccupancySensorChange); + } + + void sensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args) + { + RoomIsOccupiedFeedback.FireUpdate(); } } diff --git a/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs b/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs index eb33edc7..0a3cbf3d 100644 --- a/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs +++ b/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs @@ -270,7 +270,7 @@ namespace PepperDash.Essentials RunDefaultPresentRoute(); - CrestronEnvironment.Sleep(200); + CrestronEnvironment.Sleep(1000); RunRouteAction("roomOff"); } @@ -280,7 +280,7 @@ namespace PepperDash.Essentials /// public bool RunDefaultPresentRoute() { - if (DefaultSourceItem != null) + //if (DefaultSourceItem != null) RunRouteAction(DefaultSourceItem); return DefaultSourceItem != null; } diff --git a/Essentials/PepperDashEssentials/Room/Types/EssentialsRoomBase.cs b/Essentials/PepperDashEssentials/Room/Types/EssentialsRoomBase.cs index 60f87c7b..2c47f322 100644 --- a/Essentials/PepperDashEssentials/Room/Types/EssentialsRoomBase.cs +++ b/Essentials/PepperDashEssentials/Room/Types/EssentialsRoomBase.cs @@ -123,8 +123,11 @@ namespace PepperDash.Essentials StartRoomVacancyTimer(eVacancyMode.InShutdownWarning); break; case eVacancyMode.InShutdownWarning: - StartShutdown(eShutdownType.Vacancy); - break; + { + StartShutdown(eShutdownType.Vacancy); + Debug.Console(0, this, "Shutting Down due to vacancy."); + break; + } default: break; } @@ -154,6 +157,8 @@ namespace PepperDash.Essentials RoomVacancyShutdownTimer.SecondsToCount = RoomVacancyShutdownSeconds; VacancyMode = mode; RoomVacancyShutdownTimer.Start(); + + Debug.Console(0, this, "Vacancy Timer Started."); } /// @@ -196,13 +201,15 @@ namespace PepperDash.Essentials { if ((sender as IOccupancyStatusProvider).RoomIsOccupiedFeedback.BoolValue == false) { + Debug.Console(0, this, "Vacancy Detected"); // Trigger the timer when the room is vacant StartRoomVacancyTimer(eVacancyMode.InInitialVacancy); } else { + Debug.Console(0, this, "Occupancy Detected"); // Reset the timer when the room is occupied - if(RoomVacancyShutdownTimer.IsRunningFeedback.BoolValue) + RoomVacancyShutdownTimer.Cancel(); } } diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 7fcfb444..044ad2c8 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -644,9 +644,12 @@ namespace PepperDash.Essentials // Run default source when room is off and share is pressed if (!CurrentRoom.OnFeedback.BoolValue) { - // If there's no default, show UI elements - if(!CurrentRoom.RunDefaultPresentRoute()) - TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + if (!CurrentRoom.OnFeedback.BoolValue) + { + // If there's no default, show UI elements + if (!CurrentRoom.RunDefaultPresentRoute()) + TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + } } else // room is on show what's active or select a source if nothing is yet active { diff --git a/docs/PepperDash Essentials Installation v1.0.x.docx b/docs/PepperDash Essentials Installation v1.0.x.docx new file mode 100644 index 00000000..7d8b71ab Binary files /dev/null and b/docs/PepperDash Essentials Installation v1.0.x.docx differ