mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Compare commits
7 Commits
hotfix/dmp
...
1.15.4-hot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cf4039315 | ||
|
|
3d15227aa2 | ||
|
|
23a37ebb37 | ||
|
|
75895604ed | ||
|
|
de6f8c7896 | ||
|
|
8612fab4fe | ||
|
|
b9fd9f23a4 |
@@ -337,19 +337,20 @@ namespace PepperDash.Essentials
|
|||||||
void Load()
|
void Load()
|
||||||
{
|
{
|
||||||
LoadDevices();
|
LoadDevices();
|
||||||
LoadTieLines();
|
|
||||||
LoadRooms();
|
LoadRooms();
|
||||||
LoadLogoServer();
|
LoadLogoServer();
|
||||||
|
|
||||||
DeviceManager.ActivateAll();
|
DeviceManager.ActivateAll();
|
||||||
|
|
||||||
|
LoadTieLines();
|
||||||
|
|
||||||
var mobileControl = GetMobileControlDevice();
|
var mobileControl = GetMobileControlDevice();
|
||||||
|
|
||||||
if (mobileControl == null) return;
|
if (mobileControl == null) return;
|
||||||
|
|
||||||
mobileControl.LinkSystemMonitorToAppServer();
|
mobileControl.LinkSystemMonitorToAppServer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads all devices from config and adds them to DeviceManager
|
/// Reads all devices from config and adds them to DeviceManager
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ namespace PepperDash.Essentials
|
|||||||
/// route or commands
|
/// route or commands
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
public void RunRouteAction(string routeKey, Action successCallback)
|
public virtual void RunRouteAction(string routeKey, Action successCallback)
|
||||||
{
|
{
|
||||||
// Run this on a separate thread
|
// Run this on a separate thread
|
||||||
new CTimer(o =>
|
new CTimer(o =>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ using PepperDash.Essentials.Room.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay, IHasCurrentVolumeControls
|
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay, IHasCurrentVolumeControls, IRoomOccupancy,
|
||||||
|
IEmergency, IMicrophonePrivacy
|
||||||
{
|
{
|
||||||
bool ExcludeFromGlobalFunctions { get; }
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ using PepperDash.Essentials.Devices.Common.AudioCodec;
|
|||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
||||||
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback
|
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback,
|
||||||
|
IRoomOccupancy, IEmergency, IMicrophonePrivacy
|
||||||
{
|
{
|
||||||
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,8 @@ namespace PepperDash.Essentials
|
|||||||
// spin up different room drivers depending on room type
|
// spin up different room drivers depending on room type
|
||||||
var room = DeviceManager.GetDeviceForKey(roomKey);
|
var room = DeviceManager.GetDeviceForKey(roomKey);
|
||||||
if (room is IEssentialsHuddleSpaceRoom)
|
if (room is IEssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
// Screen Saver Driver
|
SetupScreenSaver(room, mainDriver);
|
||||||
|
|
||||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
|
|
||||||
|
|
||||||
// Header Driver
|
// Header Driver
|
||||||
Debug.Console(0, this, "Adding header driver");
|
Debug.Console(0, this, "Adding header driver");
|
||||||
@@ -94,10 +92,9 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
else if (room is IEssentialsHuddleVtc1Room)
|
else if (room is IEssentialsHuddleVtc1Room)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Adding huddle space VTC AV driver");
|
Debug.Console(0, this, "Adding huddle space VTC AV driver");
|
||||||
|
|
||||||
// Screen Saver Driver
|
SetupScreenSaver(room, mainDriver);
|
||||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
|
|
||||||
|
|
||||||
// Header Driver
|
// Header Driver
|
||||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _config);
|
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _config);
|
||||||
@@ -148,6 +145,16 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", roomKey);
|
Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", roomKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetupScreenSaver(IKeyed room, EssentialsPanelMainInterfaceDriver mainDriver)
|
||||||
|
{
|
||||||
|
var huddleRoom = room as IEssentialsRoom;
|
||||||
|
// Screen Saver Driver
|
||||||
|
if (huddleRoom.IsMobileControlEnabled)
|
||||||
|
{
|
||||||
|
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadAndShowDriver(PanelDriverBase driver)
|
public void LoadAndShowDriver(PanelDriverBase driver)
|
||||||
|
|||||||
@@ -81,6 +81,15 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
case eControlMethod.Telnet:
|
case eControlMethod.Telnet:
|
||||||
break;
|
break;
|
||||||
|
case eControlMethod.SecureTcpIp:
|
||||||
|
{
|
||||||
|
var secureTcp = new GenericSecureTcpIpClient(deviceConfig.Key + "-secureTcp", c.Address, c.Port, c.BufferSize);
|
||||||
|
secureTcp.AutoReconnect = c.AutoReconnect;
|
||||||
|
if (secureTcp.AutoReconnect)
|
||||||
|
secureTcp.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs;
|
||||||
|
comm = secureTcp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
IBasicVolumeControls CurrentVolumeControls { get; }
|
IBasicVolumeControls CurrentVolumeControls { get; }
|
||||||
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
|
|
||||||
|
void SetDefaultLevels();
|
||||||
|
|
||||||
|
bool ZeroVolumeWhenSwtichingVolumeDevices { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -148,15 +148,20 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
ReadGuidFile(guidFilePath);
|
ReadGuidFile(guidFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Room.RoomOccupancy != null)
|
var occupancyRoom = Room as IRoomOccupancy;
|
||||||
|
|
||||||
|
if (occupancyRoom != null)
|
||||||
{
|
{
|
||||||
if (Room.OccupancyStatusProviderIsRemote)
|
if (occupancyRoom.RoomOccupancy != null)
|
||||||
{
|
{
|
||||||
SetUpRemoteOccupancy();
|
if (occupancyRoom.OccupancyStatusProviderIsRemote)
|
||||||
}
|
{
|
||||||
else
|
SetUpRemoteOccupancy();
|
||||||
{
|
}
|
||||||
SetUpLocalOccupancy();
|
else
|
||||||
|
{
|
||||||
|
SetUpLocalOccupancy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1523,10 +1528,15 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
// Tie to method on occupancy object
|
// Tie to method on occupancy object
|
||||||
//occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b));
|
//occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b));
|
||||||
|
|
||||||
|
var occRoom = Room as IRoomOccupancy;
|
||||||
|
|
||||||
|
if (occRoom != null)
|
||||||
|
{
|
||||||
|
occRoom.RoomOccupancy.RoomIsOccupiedFeedback.LinkInputSig(occSensorAsset.RoomOccupied.InputSig);
|
||||||
|
occRoom.RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange;
|
||||||
|
}
|
||||||
RoomOccupancyRemoteStringFeedback = new StringFeedback(() => _roomOccupancyRemoteString);
|
RoomOccupancyRemoteStringFeedback = new StringFeedback(() => _roomOccupancyRemoteString);
|
||||||
Room.RoomOccupancy.RoomIsOccupiedFeedback.LinkInputSig(occSensorAsset.RoomOccupied.InputSig);
|
|
||||||
Room.RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange;
|
|
||||||
RoomOccupancyRemoteStringFeedback.LinkInputSig(occSensorAsset.RoomOccupancyInfo.InputSig);
|
RoomOccupancyRemoteStringFeedback.LinkInputSig(occSensorAsset.RoomOccupancyInfo.InputSig);
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
ScheduledEventGroup FeatureEventGroup;
|
ScheduledEventGroup FeatureEventGroup;
|
||||||
|
|
||||||
public IEssentialsRoom Room { get; private set; }
|
public IRoomOccupancy Room { get; private set; }
|
||||||
|
|
||||||
private Fusion.EssentialsHuddleSpaceFusionSystemControllerBase FusionRoom;
|
private Fusion.EssentialsHuddleSpaceFusionSystemControllerBase FusionRoom;
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetUpDevice()
|
void SetUpDevice()
|
||||||
{
|
{
|
||||||
Room = DeviceManager.GetDeviceForKey(PropertiesConfig.RoomKey) as IEssentialsRoom;
|
Room = DeviceManager.GetDeviceForKey(PropertiesConfig.RoomKey) as IRoomOccupancy;
|
||||||
|
|
||||||
if (Room != null)
|
if (Room != null)
|
||||||
{
|
{
|
||||||
@@ -235,12 +235,23 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
if (FeatureEnabled)
|
if (FeatureEnabled)
|
||||||
{
|
{
|
||||||
// Check room power state first
|
var essentialsRoom = Room as IEssentialsRoom;
|
||||||
if (!Room.OnFeedback.BoolValue)
|
|
||||||
{
|
if (essentialsRoom != null) {
|
||||||
Debug.Console(1, this, "Powering Room on to default source");
|
if (!essentialsRoom.OnFeedback.BoolValue)
|
||||||
Room.RunDefaultPresentRoute();
|
{
|
||||||
|
Debug.Console(1, this, "Powering Room on to default source");
|
||||||
|
|
||||||
|
var defaultRouteRoom = Room as IRunDefaultPresentRoute;
|
||||||
|
|
||||||
|
if (defaultRouteRoom != null)
|
||||||
|
{
|
||||||
|
defaultRouteRoom.RunDefaultPresentRoute();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// Check room power state first
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,15 +17,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute, IEnvironmentalControls
|
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute, IEnvironmentalControls
|
||||||
{
|
{
|
||||||
BoolFeedback OnFeedback { get; }
|
BoolFeedback OnFeedback { get; }
|
||||||
|
|
||||||
event EventHandler<EventArgs> RoomOccupancyIsSet;
|
|
||||||
|
|
||||||
BoolFeedback IsWarmingUpFeedback { get; }
|
BoolFeedback IsWarmingUpFeedback { get; }
|
||||||
BoolFeedback IsCoolingDownFeedback { get; }
|
BoolFeedback IsCoolingDownFeedback { get; }
|
||||||
|
|
||||||
IOccupancyStatusProvider RoomOccupancy { get; }
|
|
||||||
bool OccupancyStatusProviderIsRemote { get; }
|
|
||||||
|
|
||||||
bool IsMobileControlEnabled { get; }
|
bool IsMobileControlEnabled { get; }
|
||||||
IMobileControlRoomBridge MobileControlRoomBridge { get; }
|
IMobileControlRoomBridge MobileControlRoomBridge { get; }
|
||||||
@@ -35,31 +30,16 @@ namespace PepperDash.Essentials.Core
|
|||||||
SecondsCountdownTimer ShutdownPromptTimer { get; }
|
SecondsCountdownTimer ShutdownPromptTimer { get; }
|
||||||
int ShutdownPromptSeconds { get; }
|
int ShutdownPromptSeconds { get; }
|
||||||
int ShutdownVacancySeconds { get; }
|
int ShutdownVacancySeconds { get; }
|
||||||
eShutdownType ShutdownType { get; }
|
eShutdownType ShutdownType { get; }
|
||||||
|
|
||||||
EssentialsRoomEmergencyBase Emergency { get; }
|
|
||||||
|
|
||||||
Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; }
|
|
||||||
|
|
||||||
string LogoUrlLightBkgnd { get; }
|
string LogoUrlLightBkgnd { get; }
|
||||||
string LogoUrlDarkBkgnd { get; }
|
string LogoUrlDarkBkgnd { get; }
|
||||||
|
|
||||||
eVacancyMode VacancyMode { get; }
|
void StartShutdown(eShutdownType type);
|
||||||
|
|
||||||
bool ZeroVolumeWhenSwtichingVolumeDevices { get; }
|
void Shutdown();
|
||||||
|
|
||||||
void StartShutdown(eShutdownType type);
|
void PowerOnToDefaultOrLastSource();
|
||||||
void StartRoomVacancyTimer(eVacancyMode mode);
|
|
||||||
|
|
||||||
void Shutdown();
|
|
||||||
|
|
||||||
void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
|
|
||||||
|
|
||||||
void PowerOnToDefaultOrLastSource();
|
|
||||||
|
|
||||||
void SetDefaultLevels();
|
|
||||||
|
|
||||||
void RoomVacatedForTimeoutPeriod(object o);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
void RunRouteAction(string routeKey, string sourceListKey);
|
void RunRouteAction(string routeKey, string sourceListKey);
|
||||||
|
|
||||||
void RunRouteAction(string routeKey, string sourceListKey, Action successCallback);
|
void RunRouteAction(string routeKey, string sourceListKey, Action successCallback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -78,4 +77,30 @@ namespace PepperDash.Essentials.Core
|
|||||||
bool HasEnvironmentalControlDevices { get; }
|
bool HasEnvironmentalControlDevices { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IRoomOccupancy:IKeyed
|
||||||
|
{
|
||||||
|
IOccupancyStatusProvider RoomOccupancy { get; }
|
||||||
|
bool OccupancyStatusProviderIsRemote { get; }
|
||||||
|
|
||||||
|
void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
|
||||||
|
|
||||||
|
void RoomVacatedForTimeoutPeriod(object o);
|
||||||
|
|
||||||
|
void StartRoomVacancyTimer(eVacancyMode mode);
|
||||||
|
|
||||||
|
eVacancyMode VacancyMode { get; }
|
||||||
|
|
||||||
|
event EventHandler<EventArgs> RoomOccupancyIsSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IEmergency
|
||||||
|
{
|
||||||
|
EssentialsRoomEmergencyBase Emergency { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IMicrophonePrivacy
|
||||||
|
{
|
||||||
|
Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -991,41 +991,28 @@ namespace PepperDash.Essentials.DM
|
|||||||
case (DMInputEventIds.OnlineFeedbackEventId):
|
case (DMInputEventIds.OnlineFeedbackEventId):
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
||||||
|
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
||||||
if(!InputEndpointOnlineFeedbacks.ContainsKey(args.Number)){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (DMInputEventIds.EndpointOnlineEventId):
|
case (DMInputEventIds.EndpointOnlineEventId):
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
||||||
|
|
||||||
if(!InputEndpointOnlineFeedbacks.ContainsKey(args.Number)){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (DMInputEventIds.VideoDetectedEventId):
|
case (DMInputEventIds.VideoDetectedEventId):
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
|
||||||
|
|
||||||
if(!VideoInputSyncFeedbacks.ContainsKey(args.Number)){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
VideoInputSyncFeedbacks[args.Number].FireUpdate();
|
VideoInputSyncFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (DMInputEventIds.InputNameEventId):
|
case (DMInputEventIds.InputNameEventId):
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
|
||||||
if(!InputNameFeedbacks.ContainsKey(args.Number))
|
if(InputNameFeedbacks.ContainsKey(args.Number))
|
||||||
{
|
{
|
||||||
break;
|
InputNameFeedbacks[args.Number].FireUpdate();
|
||||||
}
|
}
|
||||||
InputNameFeedbacks[args.Number].FireUpdate();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user