mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Compare commits
37 Commits
feature/ge
...
v2.25.0-ud
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c5e75b025 | ||
|
|
9ef23cfcfe | ||
|
|
e44a7160ad | ||
|
|
50fc40cc4d | ||
|
|
d6b5dc00e6 | ||
|
|
2eb9442c0a | ||
|
|
260d92228c | ||
|
|
13e833b797 | ||
|
|
81df2738de | ||
|
|
08fbec416f | ||
|
|
7594b22096 | ||
|
|
d1babf6b9b | ||
|
|
2187c9fb0d | ||
|
|
a5e6059160 | ||
|
|
9ef4aedcce | ||
|
|
f7c7160bf0 | ||
|
|
dbf5740841 | ||
|
|
c07e099a79 | ||
|
|
06cb508f3a | ||
|
|
e93b5b34cc | ||
|
|
4f5d4ef87a | ||
|
|
636da8cc8c | ||
|
|
5de1e2d7bb | ||
|
|
2be078da18 | ||
|
|
03bbb84894 | ||
|
|
d17394cdd7 | ||
|
|
8467afde38 | ||
|
|
5c016fb4b8 | ||
|
|
2fbc32947c | ||
|
|
c06b57a5f9 | ||
|
|
6d64fffc50 | ||
|
|
0c4ebdaf1d | ||
|
|
2c49fb9321 | ||
|
|
7330ae2e30 | ||
|
|
a57dddba5e | ||
|
|
0bfec16622 | ||
|
|
94e7b8210f |
@@ -11,11 +11,11 @@ using PepperDash.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Config
|
namespace PepperDash.Essentials.Core.Config
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads the ConfigObject from the file
|
/// Loads the ConfigObject from the file
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsConfig : BasicConfig
|
public class EssentialsConfig : BasicConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the SystemUrl
|
/// Gets or sets the SystemUrl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -32,24 +32,33 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
/// Gets the SystemUuid extracted from the SystemUrl
|
/// Gets the SystemUuid extracted from the SystemUrl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("systemUuid")]
|
[JsonProperty("systemUuid")]
|
||||||
public string SystemUuid
|
public string SystemUuid
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(SystemUrl))
|
string uuid;
|
||||||
return "missing url";
|
|
||||||
|
|
||||||
if (SystemUrl.Contains("#"))
|
if (string.IsNullOrEmpty(SystemUrl))
|
||||||
{
|
{
|
||||||
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/#.*");
|
uuid = "missing url";
|
||||||
string uuid = result.Groups[1].Value;
|
|
||||||
return uuid;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/.*");
|
|
||||||
string uuid = result.Groups[1].Value;
|
|
||||||
return uuid;
|
|
||||||
}
|
}
|
||||||
|
else if (SystemUrl.Contains("#"))
|
||||||
|
{
|
||||||
|
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/#.*");
|
||||||
|
uuid = result.Groups[1].Value;
|
||||||
|
}
|
||||||
|
else if (SystemUrl.Contains("detail"))
|
||||||
|
{
|
||||||
|
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/detail\/(.*)\/.*");
|
||||||
|
uuid = result.Groups[1].Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/.*");
|
||||||
|
uuid = result.Groups[1].Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return uuid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,24 +66,33 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
/// Gets the TemplateUuid extracted from the TemplateUrl
|
/// Gets the TemplateUuid extracted from the TemplateUrl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("templateUuid")]
|
[JsonProperty("templateUuid")]
|
||||||
public string TemplateUuid
|
public string TemplateUuid
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(TemplateUrl))
|
string uuid;
|
||||||
return "missing template url";
|
|
||||||
|
|
||||||
if (TemplateUrl.Contains("#"))
|
if (string.IsNullOrEmpty(TemplateUrl))
|
||||||
{
|
{
|
||||||
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/templates\/(.*)\/#.*");
|
uuid = "missing template url";
|
||||||
string uuid = result.Groups[1].Value;
|
|
||||||
return uuid;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/system-templates\/(.*)\/system-template-versions\/(.*)\/.*");
|
|
||||||
string uuid = result.Groups[2].Value;
|
|
||||||
return uuid;
|
|
||||||
}
|
}
|
||||||
|
else if (TemplateUrl.Contains("#"))
|
||||||
|
{
|
||||||
|
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/templates\/(.*)\/#.*");
|
||||||
|
uuid = result.Groups[1].Value;
|
||||||
|
}
|
||||||
|
else if (TemplateUrl.Contains("detail"))
|
||||||
|
{
|
||||||
|
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/system-templates\/detail\/(.*)\/system-template-versions\/detail\/(.*)\/.*");
|
||||||
|
uuid = result.Groups[2].Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/system-templates\/(.*)\/system-template-versions\/(.*)\/.*");
|
||||||
|
uuid = result.Groups[2].Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return uuid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +115,7 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
{
|
{
|
||||||
Rooms = new List<DeviceConfig>();
|
Rooms = new List<DeviceConfig>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents version data for Essentials and its packages
|
/// Represents version data for Essentials and its packages
|
||||||
@@ -147,7 +165,7 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
/// Represents a SystemTemplateConfigs
|
/// Represents a SystemTemplateConfigs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SystemTemplateConfigs
|
public class SystemTemplateConfigs
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the System
|
/// Gets or sets the System
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -157,5 +175,5 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
/// Gets or sets the Template
|
/// Gets or sets the Template
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EssentialsConfig Template { get; set; }
|
public EssentialsConfig Template { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,9 +77,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// A name that will override the source's name on the UI
|
/// A name that will override the source's name on the UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the Name
|
|
||||||
/// </summary>
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Timers;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Fusion
|
namespace PepperDash.Essentials.Core.Fusion
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a EssentialsHuddleSpaceFusionSystemControllerBase
|
/// Represents a EssentialsHuddleSpaceFusionSystemControllerBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class IEssentialsRoomFusionController : EssentialsDevice, IOccupancyStatusProvider, IFusionHelpRequest
|
public class IEssentialsRoomFusionController : EssentialsDevice, IOccupancyStatusProvider, IFusionHelpRequest, IHasFeedback
|
||||||
{
|
{
|
||||||
private IEssentialsRoomFusionControllerPropertiesConfig _config;
|
private IEssentialsRoomFusionControllerPropertiesConfig _config;
|
||||||
|
|
||||||
@@ -87,15 +88,17 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public StringFeedback HelpRequestStatusFeedback { get; private set; }
|
public StringFeedback HelpRequestStatusFeedback { get; private set; }
|
||||||
|
|
||||||
|
private Timer _helpRequestTimeoutTimer;
|
||||||
|
|
||||||
#region System Info Sigs
|
/// <summary>
|
||||||
|
/// Gets the DefaultHelpRequestTimeoutMs
|
||||||
|
/// </summary>
|
||||||
|
public int HelpRequestTimeoutMs => _config.HelpRequestTimeoutMs;
|
||||||
|
|
||||||
//StringSigData SystemName;
|
/// <summary>
|
||||||
//StringSigData Model;
|
/// Gets whether to use a timer for help requests
|
||||||
//StringSigData SerialNumber;
|
/// </summary>
|
||||||
//StringSigData Uptime;
|
public bool UseHelpRequestTimer => _config.UseTimeoutForHelpRequests;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Processor Info Sigs
|
#region Processor Info Sigs
|
||||||
|
|
||||||
@@ -240,6 +243,19 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
this.LogDebug("Occupancy setup complete");
|
this.LogDebug("Occupancy setup complete");
|
||||||
|
|
||||||
|
HelpRequestResponseFeedback = new StringFeedback("HelpRequestResponse", () => FusionRoom.Help.OutputSig.StringValue);
|
||||||
|
|
||||||
|
HelpRequestSentFeedback = new BoolFeedback("HelpRequestSent", () => _helpRequestSent);
|
||||||
|
HelpRequestStatusFeedback = new StringFeedback("HelpRequestStatus", () => _helpRequestStatus.ToString());
|
||||||
|
|
||||||
|
Feedbacks.Add(HelpRequestResponseFeedback);
|
||||||
|
Feedbacks.Add(HelpRequestSentFeedback);
|
||||||
|
Feedbacks.Add(HelpRequestStatusFeedback);
|
||||||
|
if (RoomOccupancyRemoteStringFeedback != null)
|
||||||
|
Feedbacks.Add(RoomOccupancyRemoteStringFeedback);
|
||||||
|
if (RoomIsOccupiedFeedback != null)
|
||||||
|
Feedbacks.Add(RoomIsOccupiedFeedback);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -303,10 +319,6 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
FusionRVI.GenerateFileForAllFusionDevices();
|
FusionRVI.GenerateFileForAllFusionDevices();
|
||||||
|
|
||||||
HelpRequestResponseFeedback = new StringFeedback("HelpRequestResponse", () => FusionRoom.Help.OutputSig.StringValue);
|
|
||||||
|
|
||||||
HelpRequestSentFeedback = new BoolFeedback("HelpRequestSent", () => _helpRequestSent);
|
|
||||||
HelpRequestStatusFeedback = new StringFeedback("HelpRequestStatus", () => _helpRequestStatus.ToString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -339,6 +351,11 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public FeedbackCollection<Feedback> Feedbacks { get; private set; } = new FeedbackCollection<Feedback>();
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ScheduleChange event
|
/// ScheduleChange event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1772,7 +1789,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
{
|
{
|
||||||
if (args.EventId == FusionEventIds.HelpMessageReceivedEventId)
|
if (args.EventId == FusionEventIds.HelpMessageReceivedEventId)
|
||||||
{
|
{
|
||||||
this.LogInformation( "Help message received from Fusion for room '{0}'",
|
this.LogInformation("Help message received from Fusion for room '{0}'",
|
||||||
Room.Name);
|
Room.Name);
|
||||||
|
|
||||||
this.LogDebug("Help message content: {0}", FusionRoom.Help.OutputSig.StringValue);
|
this.LogDebug("Help message content: {0}", FusionRoom.Help.OutputSig.StringValue);
|
||||||
@@ -1791,7 +1808,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
break;
|
break;
|
||||||
case "Please call the helpdesk.":
|
case "Please call the helpdesk.":
|
||||||
// this.LogInformation("Please call the helpdesk.");
|
// this.LogInformation("Please call the helpdesk.");
|
||||||
// _helpRequestStatus = eFusionHelpResponse.CallHelpDesk;
|
_helpRequestStatus = eFusionHelpResponse.CallHelpDesk;
|
||||||
break;
|
break;
|
||||||
case "Please wait, I will reschedule your meeting to a different room.":
|
case "Please wait, I will reschedule your meeting to a different room.":
|
||||||
// this.LogInformation("Please wait, I will reschedule your meeting to a different room.",
|
// this.LogInformation("Please wait, I will reschedule your meeting to a different room.",
|
||||||
@@ -1818,13 +1835,21 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
_helpRequestStatus = eFusionHelpResponse.None;
|
_helpRequestStatus = eFusionHelpResponse.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_helpRequestStatus == eFusionHelpResponse.None)
|
if (_helpRequestStatus == eFusionHelpResponse.None)
|
||||||
{
|
{
|
||||||
_helpRequestSent = false;
|
_helpRequestSent = false;
|
||||||
HelpRequestSentFeedback.FireUpdate();
|
HelpRequestSentFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
HelpRequestStatusFeedback.FireUpdate();
|
HelpRequestStatusFeedback.FireUpdate();
|
||||||
|
|
||||||
|
if (_helpRequestTimeoutTimer != null)
|
||||||
|
{
|
||||||
|
_helpRequestTimeoutTimer.Stop();
|
||||||
|
_helpRequestTimeoutTimer.Elapsed -= OnTimedEvent;
|
||||||
|
_helpRequestTimeoutTimer.Dispose();
|
||||||
|
_helpRequestTimeoutTimer = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1895,10 +1920,34 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
_helpRequestSent = true;
|
_helpRequestSent = true;
|
||||||
HelpRequestSentFeedback.FireUpdate();
|
HelpRequestSentFeedback.FireUpdate();
|
||||||
|
|
||||||
|
if (UseHelpRequestTimer)
|
||||||
|
{
|
||||||
|
if (_helpRequestTimeoutTimer == null)
|
||||||
|
{
|
||||||
|
_helpRequestTimeoutTimer = new Timer(HelpRequestTimeoutMs);
|
||||||
|
_helpRequestTimeoutTimer.AutoReset = false;
|
||||||
|
_helpRequestTimeoutTimer.Enabled = true;
|
||||||
|
|
||||||
|
_helpRequestTimeoutTimer.Elapsed += OnTimedEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
_helpRequestTimeoutTimer.Interval = HelpRequestTimeoutMs;
|
||||||
|
_helpRequestTimeoutTimer.Start();
|
||||||
|
|
||||||
|
this.LogDebug("Help request timeout timer started for room '{0}' with timeout of {1} ms.",
|
||||||
|
Room.Name, HelpRequestTimeoutMs);
|
||||||
|
}
|
||||||
|
|
||||||
_helpRequestStatus = eFusionHelpResponse.HelpRequested;
|
_helpRequestStatus = eFusionHelpResponse.HelpRequested;
|
||||||
HelpRequestStatusFeedback.FireUpdate();
|
HelpRequestStatusFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnTimedEvent(object source, ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
this.LogInformation("Help request timeout reached for room '{0}'. Cancelling help request.", Room.Name);
|
||||||
|
CancelHelpRequest();
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void CancelHelpRequest()
|
public void CancelHelpRequest()
|
||||||
{
|
{
|
||||||
@@ -1909,7 +1958,16 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
HelpRequestSentFeedback.FireUpdate();
|
HelpRequestSentFeedback.FireUpdate();
|
||||||
_helpRequestStatus = eFusionHelpResponse.None;
|
_helpRequestStatus = eFusionHelpResponse.None;
|
||||||
HelpRequestStatusFeedback.FireUpdate();
|
HelpRequestStatusFeedback.FireUpdate();
|
||||||
Debug.LogMessage(LogEventLevel.Information, this, "Help request cancelled in Fusion for room '{0}'", Room.Name);
|
Debug.LogMessage(LogEventLevel.Information, this, "Help request cancelled for room '{0}'", Room.Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_helpRequestTimeoutTimer != null)
|
||||||
|
{
|
||||||
|
_helpRequestTimeoutTimer.Stop();
|
||||||
|
_helpRequestTimeoutTimer.Elapsed -= OnTimedEvent;
|
||||||
|
_helpRequestTimeoutTimer.Dispose();
|
||||||
|
_helpRequestTimeoutTimer = null;
|
||||||
|
this.LogDebug("Help request timeout timer stopped for room '{0}'.", Room.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,4 +56,16 @@ public class IEssentialsRoomFusionControllerPropertiesConfig
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("use24HourTimeFormat")]
|
[JsonProperty("use24HourTimeFormat")]
|
||||||
public bool Use24HourTimeFormat { get; set; } = false;
|
public bool Use24HourTimeFormat { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets whether to use a timeout for help requests
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("useTimeoutForHelpRequests")]
|
||||||
|
public bool UseTimeoutForHelpRequests { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the timeout duration for help requests in milliseconds
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("helpRequestTimeoutMs")]
|
||||||
|
public int HelpRequestTimeoutMs { get; set; } = 30000;
|
||||||
}
|
}
|
||||||
@@ -105,12 +105,21 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomPropertiesConfig
|
public class EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Addresses
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("addresses")]
|
[JsonProperty("addresses")]
|
||||||
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Description
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Emergency
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("emergency")]
|
[JsonProperty("emergency")]
|
||||||
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
||||||
|
|
||||||
@@ -226,11 +235,11 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// Indicates if this room represents a combination of other rooms
|
/// Indicates if this room represents a combination of other rooms
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("isRoomCombinationScenario")]
|
[JsonProperty("isRoomCombinationScenario")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the IsRoomCombinationScenario
|
|
||||||
/// </summary>
|
|
||||||
public bool IsRoomCombinationScenario { get; set; }
|
public bool IsRoomCombinationScenario { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
public EssentialsRoomPropertiesConfig()
|
public EssentialsRoomPropertiesConfig()
|
||||||
{
|
{
|
||||||
LogoLight = new EssentialsLogoPropertiesConfig();
|
LogoLight = new EssentialsLogoPropertiesConfig();
|
||||||
@@ -243,10 +252,10 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomUiBehaviorConfig
|
public class EssentialsRoomUiBehaviorConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DisableActivityButtonsWhileWarmingCooling
|
/// Gets or sets the DisableActivityButtonsWhileWarmingCooling
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
||||||
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,74 +264,86 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("defaultAudioKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DefaultAudioKey
|
/// Gets or sets the DefaultAudioKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("defaultAudioKey")]
|
||||||
public string DefaultAudioKey { get; set; }
|
public string DefaultAudioKey { get; set; }
|
||||||
[JsonProperty("sourceListKey")]
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the DefaultOnDspPresetKey
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("defaultOnDspPresetKey")]
|
||||||
|
public string DefaultOnDspPresetKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the DefaultOffDspPresetKey
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("defaultOffDspPresetKey")]
|
||||||
|
public string DefaultOffDspPresetKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the SourceListKey
|
/// Gets or sets the SourceListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("sourceListKey")]
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
[JsonProperty("destinationListKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DestinationListKey
|
/// Gets or sets the DestinationListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("destinationListKey")]
|
||||||
public string DestinationListKey { get; set; }
|
public string DestinationListKey { get; set; }
|
||||||
[JsonProperty("audioControlPointListKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the AudioControlPointListKey
|
/// Gets or sets the AudioControlPointListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("audioControlPointListKey")]
|
||||||
public string AudioControlPointListKey { get; set; }
|
public string AudioControlPointListKey { get; set; }
|
||||||
[JsonProperty("cameraListKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the CameraListKey
|
/// Gets or sets the CameraListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("cameraListKey")]
|
||||||
public string CameraListKey { get; set; }
|
public string CameraListKey { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonProperty("defaultSourceItem")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DefaultSourceItem
|
/// Gets or sets the DefaultSourceItem
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("defaultSourceItem")]
|
||||||
public string DefaultSourceItem { get; set; }
|
public string DefaultSourceItem { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if the room supports advanced sharing
|
/// Indicates if the room supports advanced sharing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("supportsAdvancedSharing")]
|
[JsonProperty("supportsAdvancedSharing")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the SupportsAdvancedSharing
|
|
||||||
/// </summary>
|
|
||||||
public bool SupportsAdvancedSharing { get; set; }
|
public bool SupportsAdvancedSharing { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if non-tech users can change the share mode
|
/// Indicates if non-tech users can change the share mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("userCanChangeShareMode")]
|
[JsonProperty("userCanChangeShareMode")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the UserCanChangeShareMode
|
|
||||||
/// </summary>
|
|
||||||
public bool UserCanChangeShareMode { get; set; }
|
public bool UserCanChangeShareMode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the MatrixRoutingKey
|
/// Gets or sets the MatrixRoutingKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public string MatrixRoutingKey { get; set; }
|
public string MatrixRoutingKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a EssentialsConferenceRoomPropertiesConfig
|
||||||
|
/// </summary>
|
||||||
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("videoCodecKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the VideoCodecKey
|
/// Gets or sets the VideoCodecKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("videoCodecKey")]
|
||||||
public string VideoCodecKey { get; set; }
|
public string VideoCodecKey { get; set; }
|
||||||
[JsonProperty("audioCodecKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the AudioCodecKey
|
/// Gets or sets the AudioCodecKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("audioCodecKey")]
|
||||||
public string AudioCodecKey { get; set; }
|
public string AudioCodecKey { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -337,12 +358,15 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
|
|
||||||
[JsonProperty("deviceKeys")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKeys
|
/// Gets or sets the DeviceKeys
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("deviceKeys")]
|
||||||
public List<string> DeviceKeys { get; set; }
|
public List<string> DeviceKeys { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
public EssentialsEnvironmentPropertiesConfig()
|
public EssentialsEnvironmentPropertiesConfig()
|
||||||
{
|
{
|
||||||
DeviceKeys = new List<string>();
|
DeviceKeys = new List<string>();
|
||||||
@@ -355,6 +379,9 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomFusionConfig
|
public class EssentialsRoomFusionConfig
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the the IpId as a UInt16
|
||||||
|
/// </summary>
|
||||||
public uint IpIdInt
|
public uint IpIdInt
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -371,16 +398,16 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("ipId")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the IpId
|
/// Gets or sets the IpId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("ipId")]
|
||||||
public string IpId { get; set; }
|
public string IpId { get; set; }
|
||||||
|
|
||||||
[JsonProperty("joinMapKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the JoinMapKey
|
/// Gets or sets the JoinMapKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("joinMapKey")]
|
||||||
public string JoinMapKey { get; set; }
|
public string JoinMapKey { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -390,16 +417,16 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomMicrophonePrivacyConfig
|
public class EssentialsRoomMicrophonePrivacyConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("deviceKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKey
|
/// Gets or sets the DeviceKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("deviceKey")]
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
[JsonProperty("behaviour")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Behaviour
|
/// Gets or sets the Behaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("behaviour")]
|
||||||
public string Behaviour { get; set; }
|
public string Behaviour { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,12 +435,15 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsHelpPropertiesConfig
|
public class EssentialsHelpPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("message")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Message
|
/// Gets or sets the Message
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("message")]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the ShowCallButton
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("showCallButton")]
|
[JsonProperty("showCallButton")]
|
||||||
public bool ShowCallButton { get; set; }
|
public bool ShowCallButton { get; set; }
|
||||||
|
|
||||||
@@ -421,11 +451,11 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// Defaults to "Call Help Desk"
|
/// Defaults to "Call Help Desk"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("callButtonText")]
|
[JsonProperty("callButtonText")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the CallButtonText
|
|
||||||
/// </summary>
|
|
||||||
public string CallButtonText { get; set; }
|
public string CallButtonText { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
public EssentialsHelpPropertiesConfig()
|
public EssentialsHelpPropertiesConfig()
|
||||||
{
|
{
|
||||||
CallButtonText = "Call Help Desk";
|
CallButtonText = "Call Help Desk";
|
||||||
@@ -437,22 +467,28 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsOneButtonMeetingPropertiesConfig
|
public class EssentialsOneButtonMeetingPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("enable")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Enable
|
/// Gets or sets the Enable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("enable")]
|
||||||
public bool Enable { get; set; }
|
public bool Enable { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a EssentialsRoomAddressPropertiesConfig
|
||||||
|
/// </summary>
|
||||||
public class EssentialsRoomAddressPropertiesConfig
|
public class EssentialsRoomAddressPropertiesConfig
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the PhoneNumber
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("phoneNumber")]
|
[JsonProperty("phoneNumber")]
|
||||||
public string PhoneNumber { get; set; }
|
public string PhoneNumber { get; set; }
|
||||||
|
|
||||||
[JsonProperty("sipAddress")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the SipAddress
|
/// Gets or sets the SipAddress
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("sipAddress")]
|
||||||
public string SipAddress { get; set; }
|
public string SipAddress { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,14 +498,18 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsLogoPropertiesConfig
|
public class EssentialsLogoPropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("type")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Type
|
/// Gets or sets the Type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Url
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// GetLogoUrlLight method
|
/// GetLogoUrlLight method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -502,22 +542,28 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomOccSensorConfig
|
public class EssentialsRoomOccSensorConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("deviceKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKey
|
/// Gets or sets the DeviceKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("deviceKey")]
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the TimeoutMinutes
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("timeoutMinutes")]
|
[JsonProperty("timeoutMinutes")]
|
||||||
public int TimeoutMinutes { get; set; }
|
public int TimeoutMinutes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a EssentialsRoomTechConfig
|
||||||
|
/// </summary>
|
||||||
public class EssentialsRoomTechConfig
|
public class EssentialsRoomTechConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("password")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Password
|
/// Gets or sets the Password
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("password")]
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
15
src/PepperDash.Essentials.Core/UDMApi/CustomProperties.cs
Normal file
15
src/PepperDash.Essentials.Core/UDMApi/CustomProperties.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
|
||||||
|
internal class CustomProperties
|
||||||
|
{
|
||||||
|
[JsonProperty("label")]
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("value")]
|
||||||
|
public string Value { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
29
src/PepperDash.Essentials.Core/UDMApi/DeviceStatus.cs
Normal file
29
src/PepperDash.Essentials.Core/UDMApi/DeviceStatus.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
internal class DeviceStatus
|
||||||
|
{
|
||||||
|
[JsonProperty("label")]
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("status")]
|
||||||
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("description")]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("videoSource")]
|
||||||
|
public string VideoSource { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("audioSource")]
|
||||||
|
public string AudioSource { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("usage")]
|
||||||
|
public int Usage { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("error")]
|
||||||
|
public string Error { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
12
src/PepperDash.Essentials.Core/UDMApi/IUDMAPI.cs
Normal file
12
src/PepperDash.Essentials.Core/UDMApi/IUDMAPI.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
internal interface IUDMAPI
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
35
src/PepperDash.Essentials.Core/UDMApi/RoomResponse.cs
Normal file
35
src/PepperDash.Essentials.Core/UDMApi/RoomResponse.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the complete room response for UDM API
|
||||||
|
/// </summary>
|
||||||
|
internal class RoomResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// API version string
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("apiVersion")]
|
||||||
|
public string ApiVersion { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Standard room properties
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("standard")]
|
||||||
|
public StandardProperties Standard { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Status information including devices
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("status")]
|
||||||
|
public StatusProperties Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Custom properties dictionary
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("custom")]
|
||||||
|
public Dictionary<string, CustomProperties> Custom { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
26
src/PepperDash.Essentials.Core/UDMApi/StandardProperties.cs
Normal file
26
src/PepperDash.Essentials.Core/UDMApi/StandardProperties.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
internal class StandardProperties
|
||||||
|
{
|
||||||
|
[JsonProperty("version")]
|
||||||
|
public string Version { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("state")]
|
||||||
|
public string State { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("error")]
|
||||||
|
public string Error { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("occupancy")]
|
||||||
|
public bool Occupancy { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("helpRequest")]
|
||||||
|
public string HelpRequest { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("activity")]
|
||||||
|
public string Activity { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
14
src/PepperDash.Essentials.Core/UDMApi/StatusProperties.cs
Normal file
14
src/PepperDash.Essentials.Core/UDMApi/StatusProperties.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
internal class StatusProperties
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Dictionary of device statuses keyed by device identifier
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("devices")]
|
||||||
|
public Dictionary<string, DeviceStatus> Devices { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Core.Logging;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
@@ -73,7 +74,7 @@ namespace PepperDash.Essentials.Devices.Common.Generic
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void ExecuteSwitch(object inputSelector)
|
public void ExecuteSwitch(object inputSelector)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
this.LogDebug("GenericSink Executing Switch to: {inputSelector}", inputSelector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,6 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
{
|
{
|
||||||
if (!enableMessengerSubscriptions)
|
if (!enableMessengerSubscriptions)
|
||||||
{
|
{
|
||||||
this.LogWarning("Messenger subscriptions not enabled");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +217,6 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
{
|
{
|
||||||
if (!enableMessengerSubscriptions)
|
if (!enableMessengerSubscriptions)
|
||||||
{
|
{
|
||||||
this.LogWarning("Messenger subscriptions not enabled");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +236,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.LogInformation("Client with ID {clientId} unsubscribed", clientId);
|
this.LogDebug("Client with ID {clientId} unsubscribed", clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -272,7 +270,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.LogError(ex, "Exception posting status message for {messagePath} to {clientId}", MessagePath, clientId ?? "all clients");
|
this.LogError("Exception posting status message for {messagePath} to {clientId}: {message}", MessagePath, clientId ?? "all clients", ex.Message);
|
||||||
|
this.LogDebug(ex, "Stack trace: ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,7 +300,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.LogError(ex, "Exception posting status message for {type} to {clientId}", type, clientId ?? "all clients");
|
this.LogError("Exception posting status message for {type} to {clientId}: {message}", type, clientId ?? "all clients", ex.Message);
|
||||||
|
this.LogDebug(ex, "Stack trace: ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1312,6 +1312,11 @@ namespace PepperDash.Essentials
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
if (!Config.EnableMessengerSubscriptions)
|
||||||
|
{
|
||||||
|
this.LogWarning("Messenger subscriptions disabled. add \"enableMessengerSubscriptions\": true to config for {key} to enable.", Key);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var messenger in _messengers)
|
foreach (var messenger in _messengers)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user