Merge pull request #496 from PepperDash/release/1.6.7

Release/1.6.7
This commit is contained in:
Neil Dorin
2020-11-16 12:01:44 -07:00
committed by GitHub
17 changed files with 1343 additions and 1188 deletions

View File

@@ -16,7 +16,6 @@ using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.DM; using PepperDash.Essentials.DM;
using PepperDash.Essentials.Fusion; using PepperDash.Essentials.Fusion;
using PepperDash.Essentials.Room.Config; using PepperDash.Essentials.Room.Config;
//using PepperDash.Essentials.Room.MobileControl;
using Newtonsoft.Json; using Newtonsoft.Json;
using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.DeviceTypeInterfaces;
@@ -290,33 +289,14 @@ namespace PepperDash.Essentials
DeviceManager.ActivateAll(); DeviceManager.ActivateAll();
var mobileControl = DeviceManager.GetDeviceForKey("appServer") as IMobileControl; var mobileControl = GetMobileControlDevice();
if (mobileControl == null) return; if (mobileControl == null) return;
mobileControl.LinkSystemMonitorToAppServer(); mobileControl.LinkSystemMonitorToAppServer();
//LinkSystemMonitorToAppServer();
} }
//void LinkSystemMonitorToAppServer()
//{
// var sysMon = DeviceManager.GetDeviceForKey("systemMonitor") as PepperDash.Essentials.Core.Monitoring.SystemMonitorController;
// var appServer = DeviceManager.GetDeviceForKey("appServer") as MobileControlSystemController;
// if (sysMon != null && appServer != null)
// {
// var key = sysMon.Key + "-" + appServer.Key;
// var messenger = new PepperDash.Essentials.AppServer.Messengers.SystemMonitorMessenger
// (key, sysMon, "/device/systemMonitor");
// messenger.RegisterWithAppServer(appServer);
// DeviceManager.AddDevice(messenger);
// }
//}
/// <summary> /// <summary>
/// Reads all devices from config and adds them to DeviceManager /// Reads all devices from config and adds them to DeviceManager
/// </summary> /// </summary>
@@ -394,11 +374,6 @@ namespace PepperDash.Essentials
if (newDev == null) if (newDev == null)
newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf); newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf);
//
//if (newDev == null)
// newDev = PepperDash.Essentials.Devices.Displays.DisplayDeviceFactory.GetDevice(devConf);
//
if (newDev != null) if (newDev != null)
DeviceManager.AddDevice(newDev); DeviceManager.AddDevice(newDev);
else else
@@ -465,10 +440,6 @@ namespace PepperDash.Essentials
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge..."); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
// Mobile Control bridge
//var bridge = new MobileConrolEssentialsHuddleSpaceRoomBridge(room as EssentialsHuddleSpaceRoom);
//AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
//DeviceManager.AddDevice(bridge);
CreateMobileControlBridge(room); CreateMobileControlBridge(room);
} }
@@ -480,10 +451,6 @@ namespace PepperDash.Essentials
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1)); DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1));
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge..."); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
// Mobile Control bridge
//var bridge = new MobileConrolEssentialsHuddleSpaceRoomBridge(room);
//AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
//DeviceManager.AddDevice(bridge);
CreateMobileControlBridge(room); CreateMobileControlBridge(room);
} }
@@ -504,34 +471,35 @@ namespace PepperDash.Essentials
private static void CreateMobileControlBridge(EssentialsRoomBase room) private static void CreateMobileControlBridge(EssentialsRoomBase room)
{ {
var mobileControl = DeviceManager.GetDeviceForKey("appServer") as IMobileControl; var mobileControl = GetMobileControlDevice();
if (mobileControl == null) return; if (mobileControl == null) return;
mobileControl.CreateMobileControlRoomBridge(room); mobileControl.CreateMobileControlRoomBridge(room, mobileControl);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added..."); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
} }
/// <summary> private static IMobileControl GetMobileControlDevice()
/// Helps add the post activation steps that link bridges to main controller {
/// </summary> var mobileControlList = DeviceManager.AllDevices.OfType<IMobileControl>().ToList();
/// <param name="bridge"></param>
//void AddBridgePostActivationHelper(MobileControlBridgeBase bridge) if (mobileControlList.Count > 1)
//{ {
// bridge.AddPostActivationAction(() => Debug.Console(0, Debug.ErrorLogLevel.Warning,
// { "Multiple instances of Mobile Control Server found.");
// var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as MobileControlSystemController;
// if (parent == null) return null;
// { }
// Debug.Console(0, bridge, "ERROR: Cannot connect app server room bridge. System controller not present");
// return; if (mobileControlList.Count > 0)
// } {
// Debug.Console(0, bridge, "Linking to parent controller"); return mobileControlList[0];
// bridge.AddParent(parent); }
// parent.AddBridge(bridge);
// }); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control not enabled for this system");
//} return null;
}
/// <summary> /// <summary>
/// Fires up a logo server if not already running /// Fires up a logo server if not already running

View File

@@ -393,6 +393,8 @@ namespace PepperDash.Essentials
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room"); Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");
RunRouteAction("roomOff"); RunRouteAction("roomOff");
VideoCodec.StopSharing();
VideoCodec.StandbyActivate();
} }
/// <summary> /// <summary>
@@ -590,6 +592,19 @@ namespace PepperDash.Essentials
OnFeedback.FireUpdate(); OnFeedback.FireUpdate();
if (OnFeedback.BoolValue)
{
if (VideoCodec.UsageTracker.InUseTracker.InUseFeedback.BoolValue)
{
Debug.Console(1, this, "Video Codec in use, deactivating standby on codec");
}
if (VideoCodec.StandbyIsOnFeedback.BoolValue)
{
VideoCodec.StandbyDeactivate();
}
}
// report back when done // report back when done
if (successCallback != null) if (successCallback != null)
successCallback(); successCallback();
@@ -652,6 +667,7 @@ namespace PepperDash.Essentials
dest.ReleaseRoute(); dest.ReleaseRoute();
if (dest is IHasPowerControl) if (dest is IHasPowerControl)
(dest as IHasPowerControl).PowerOff(); (dest as IHasPowerControl).PowerOff();
} }
else else
{ {
@@ -703,37 +719,44 @@ namespace PepperDash.Essentials
} }
/// <summary> /// <summary>
/// Setup the external sources for the Cisco Touch 10 devices that support IHasExternalSourceSwitch /// Setup the external sources for the Cisco Touch 10 devices that support IHasExternalSourceSwitch
/// </summary> /// </summary>
private void SetCodecExternalSources() private void SetCodecExternalSources()
{ {
var videoCodecWithExternalSwitching = VideoCodec as IHasExternalSourceSwitching; var videoCodecWithExternalSwitching = VideoCodec as IHasExternalSourceSwitching;
if (videoCodecWithExternalSwitching == null) if (videoCodecWithExternalSwitching == null || !videoCodecWithExternalSwitching.ExternalSourceListEnabled)
{ {
return; return;
} }
string codecTieLine = ConfigReader.ConfigObject.TieLines.SingleOrDefault(x => x.DestinationKey == VideoCodec.Key).DestinationPort; try
videoCodecWithExternalSwitching.ClearExternalSources(); {
videoCodecWithExternalSwitching.RunRouteAction = RunRouteAction; // Get the tie line that the external switcher is connected to
var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ; string codecInputConnectorName = ConfigReader.ConfigObject.TieLines.SingleOrDefault(
x => x.DestinationKey == VideoCodec.Key && x.DestinationPort == videoCodecWithExternalSwitching.ExternalSourceInputPort).DestinationPort;
foreach (var kvp in srcList) videoCodecWithExternalSwitching.ClearExternalSources();
{ videoCodecWithExternalSwitching.RunRouteAction = RunRouteAction;
var srcConfig = kvp.Value; var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ;
if (kvp.Key != DefaultCodecRouteString && kvp.Key != "roomOff") foreach (var kvp in srcList)
{ {
var srcConfig = kvp.Value;
videoCodecWithExternalSwitching.AddExternalSource(codecTieLine, kvp.Key, srcConfig.PreferredName, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceType.desktop); if (kvp.Key != DefaultCodecRouteString && kvp.Key != "roomOff")
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready); {
videoCodecWithExternalSwitching.AddExternalSource(codecInputConnectorName, kvp.Key, srcConfig.PreferredName, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceType.desktop);
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
} }
} }
} }
catch (Exception e)
{
Debug.Console(2, this, "Error setting codec external sources: {0}", e);
}
}
private void SetCodecBranding() private void SetCodecBranding()
{ {

View File

@@ -33,6 +33,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
IOPortConfig config) IOPortConfig config)
: base(key, name) : base(key, name)
{ {
InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc);
AddPostActivationAction(() => AddPostActivationAction(() =>
{ {
@@ -81,7 +82,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
} }
if (ioPortDevice == null) if (ioPortDevice == null)
{ {
Debug.Console(0, "GetDigitalInput: Device '0' is not a valid IRelayPorts Device", dc.PortDeviceKey); Debug.Console(0, "GetDigitalInput: Device '0' is not a valid IDigitalInputPorts Device", dc.PortDeviceKey);
return null; return null;
} }
@@ -144,7 +145,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)
{ {
Debug.Console(1, "Factory Attempting to create new Generic Relay Device"); Debug.Console(1, "Factory Attempting to create new Generic Digital Input Device");
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString()); var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());

View File

@@ -4,15 +4,21 @@ using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using Crestron.SimplSharpPro; using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Bridges;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Core.CrestronIO namespace PepperDash.Essentials.Core.CrestronIO
{ {
/// <summary> /// <summary>
/// Represents a generic digital input deviced tied to a versiport /// Represents a generic digital input deviced tied to a versiport
/// </summary> /// </summary>
public class GenericVersiportDigitalInputDevice : EssentialsDevice, IDigitalInput public class GenericVersiportDigitalInputDevice : EssentialsBridgeableDevice, IDigitalInput
{ {
public Versiport InputPort { get; private set; } public Versiport InputPort { get; private set; }
@@ -26,17 +32,29 @@ namespace PepperDash.Essentials.Core.CrestronIO
} }
} }
public GenericVersiportDigitalInputDevice(string key, Versiport inputPort, IOPortConfig props): public GenericVersiportDigitalInputDevice(string key, string name, Func<IOPortConfig, Versiport> postActivationFunc, IOPortConfig config) :
base(key) base(key, name)
{ {
InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc); InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc);
InputPort = inputPort;
InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput);
if (props.DisablePullUpResistor)
InputPort.DisablePullUpResistor = true;
InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange);
Debug.Console(1, this, "Created GenericVersiportDigitalInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", props.PortNumber, InputPort.DisablePullUpResistor); AddPostActivationAction(() =>
{
InputPort = postActivationFunc(config);
InputPort.Register();
InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput);
if (config.DisablePullUpResistor)
InputPort.DisablePullUpResistor = true;
InputPort.VersiportChange += InputPort_VersiportChange;
Debug.Console(1, this, "Created GenericVersiportDigitalInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", config.PortNumber, InputPort.DisablePullUpResistor);
});
} }
void InputPort_VersiportChange(Versiport port, VersiportEventArgs args) void InputPort_VersiportChange(Versiport port, VersiportEventArgs args)
@@ -46,5 +64,105 @@ namespace PepperDash.Essentials.Core.CrestronIO
if(args.Event == eVersiportEvent.DigitalInChange) if(args.Event == eVersiportEvent.DigitalInChange)
InputStateFeedback.FireUpdate(); InputStateFeedback.FireUpdate();
} }
#region Bridge Linking
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
var joinMap = new IDigitalInputJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<IDigitalInputJoinMap>(joinMapSerialized);
if (bridge != null)
{
bridge.AddJoinMap(Key, joinMap);
}
else
{
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
}
try
{
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// Link feedback for input state
InputStateFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputState.JoinNumber]);
}
catch (Exception e)
{
Debug.Console(1, this, "Unable to link device '{0}'. Input is null", Key);
Debug.Console(1, this, "Error: {0}", e);
}
}
#endregion
public static Versiport GetVersiportDigitalInput(IOPortConfig dc)
{
IIOPorts ioPortDevice;
if (dc.PortDeviceKey.Equals("processor"))
{
if (!Global.ControlSystem.SupportsVersiport)
{
Debug.Console(0, "GetVersiportDigitalInput: Processor does not support Versiports");
return null;
}
ioPortDevice = Global.ControlSystem;
}
else
{
var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IIOPorts;
if (ioPortDev == null)
{
Debug.Console(0, "GetVersiportDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey);
return null;
}
ioPortDevice = ioPortDev;
}
if (ioPortDevice == null)
{
Debug.Console(0, "GetVersiportDigitalInput: Device '0' is not a valid IIOPorts Device", dc.PortDeviceKey);
return null;
}
if (dc.PortNumber > ioPortDevice.NumberOfVersiPorts)
{
Debug.Console(0, "GetVersiportDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
}
return ioPortDevice.VersiPorts[dc.PortNumber];
}
}
public class GenericVersiportDigitalInputDeviceFactory : EssentialsDeviceFactory<GenericVersiportDigitalInputDevice>
{
public GenericVersiportDigitalInputDeviceFactory()
{
TypeNames = new List<string>() { "versiportinput" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Generic Versiport Device");
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
if (props == null) return null;
var portDevice = new GenericVersiportDigitalInputDevice(dc.Key, dc.Name, GenericVersiportDigitalInputDevice.GetVersiportDigitalInput, props);
return portDevice;
}
} }
} }

View File

@@ -8,11 +8,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
/// </summary> /// </summary>
public interface IMobileControl : IKeyed public interface IMobileControl : IKeyed
{ {
void CreateMobileControlRoomBridge(EssentialsRoomBase room); void CreateMobileControlRoomBridge(EssentialsRoomBase room, IMobileControl parent);
void LinkSystemMonitorToAppServer(); void LinkSystemMonitorToAppServer();
} }
/// <summary> /// <summary>
@@ -26,6 +24,8 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
string QrCodeUrl { get; } string QrCodeUrl { get; }
string QrCodeChecksum { get; }
string McServerUrl { get; } string McServerUrl { get; }
string RoomName { get; } string RoomName { get; }

View File

@@ -13,6 +13,8 @@ namespace PepperDash.Essentials.Core
{ {
public static class DeviceManager public static class DeviceManager
{ {
public static event EventHandler<EventArgs> AllDevicesActivated;
private static readonly CCriticalSection DeviceCriticalSection = new CCriticalSection(); private static readonly CCriticalSection DeviceCriticalSection = new CCriticalSection();
private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true); private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true);
//public static List<Device> Devices { get { return _Devices; } } //public static List<Device> Devices { get { return _Devices; } }
@@ -98,6 +100,8 @@ namespace PepperDash.Essentials.Core
Debug.Console(0, d, "ERROR: Device PostActivation failure:\r{0}", e); Debug.Console(0, d, "ERROR: Device PostActivation failure:\r{0}", e);
} }
} }
OnAllDevicesActivated();
} }
finally finally
{ {
@@ -105,6 +109,15 @@ namespace PepperDash.Essentials.Core
} }
} }
private static void OnAllDevicesActivated()
{
var handler = AllDevicesActivated;
if (handler != null)
{
handler(null, new EventArgs());
}
}
/// <summary> /// <summary>
/// Calls activate on all Device class items /// Calls activate on all Device class items
/// </summary> /// </summary>

View File

@@ -88,8 +88,12 @@ namespace PepperDash.Essentials.Core.Privacy
else else
Debug.Console(0, this, "Unable to add Red LED device"); Debug.Console(0, this, "Unable to add Red LED device");
DeviceManager.AllDevicesActivated += (o, a) =>
{
CheckPrivacyMode();
};
AddPostActivationAction(() => { AddPostActivationAction(() => {
CheckPrivacyMode();
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange; PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange; PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
}); });

View File

@@ -14,7 +14,7 @@
<tags>crestron 3series 4series</tags> <tags>crestron 3series 4series</tags>
<repository type="git" url="https://github.com/PepperDash/Essentials"/> <repository type="git" url="https://github.com/PepperDash/Essentials"/>
<dependencies> <dependencies>
<dependency id="PepperDashCore" version="[1.0, 1.1)"/> <dependency id="PepperDashCore" version="[1.0.43, 1.1.0)"/>
</dependencies> </dependencies>
</metadata> </metadata>
<files> <files>

View File

@@ -59,7 +59,7 @@ namespace PepperDash.Essentials.Core
/// <summary> /// <summary>
/// For fixed-source endpoint devices /// For fixed-source endpoint devices
/// </summary> /// </summary>
[Obsolete] [Obsolete("Please switch to IRoutingSink")]
public interface IRoutingSinkNoSwitching : IRoutingSink public interface IRoutingSinkNoSwitching : IRoutingSink
{ {

View File

@@ -11,6 +11,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec
public interface IHasExternalSourceSwitching public interface IHasExternalSourceSwitching
{ {
bool ExternalSourceListEnabled { get; } bool ExternalSourceListEnabled { get; }
string ExternalSourceInputPort { get; }
void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type); void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type);
void SetExternalSourceState(string key, eExternalSourceMode mode); void SetExternalSourceState(string key, eExternalSourceMode mode);
void ClearExternalSources(); void ClearExternalSources();

View File

@@ -407,6 +407,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
CreateOsdSource(); CreateOsdSource();
ExternalSourceListEnabled = props.ExternalSourceListEnabled; ExternalSourceListEnabled = props.ExternalSourceListEnabled;
ExternalSourceInputPort = props.ExternalSourceInputPort;
if (props.UiBranding == null) if (props.UiBranding == null)
{ {
@@ -416,6 +417,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
props.UiBranding.BrandingUrl); props.UiBranding.BrandingUrl);
BrandingEnabled = props.UiBranding.Enable; BrandingEnabled = props.UiBranding.Enable;
_brandingUrl = props.UiBranding.BrandingUrl; _brandingUrl = props.UiBranding.BrandingUrl;
} }
@@ -1917,7 +1919,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
#region IHasExternalSourceSwitching Members #region IHasExternalSourceSwitching Members
/// <summary> /// <summary>
/// Weather the Cisco supports External Source Lists or not /// Wheather the Cisco supports External Source Lists or not
/// </summary> /// </summary>
public bool ExternalSourceListEnabled public bool ExternalSourceListEnabled
{ {
@@ -1925,6 +1927,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
private set; private set;
} }
/// <summary>
/// The name of the RoutingInputPort to which the upstream external switcher is connected
/// </summary>
public string ExternalSourceInputPort { get; private set; }
public bool BrandingEnabled { get; private set; } public bool BrandingEnabled { get; private set; }
private string _brandingUrl; private string _brandingUrl;
private bool _sendMcUrl; private bool _sendMcUrl;
@@ -2102,7 +2109,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{ {
public CiscoSparkCodecFactory() public CiscoSparkCodecFactory()
{ {
TypeNames = new List<string>() { "ciscospark", "ciscowebex", "ciscowebexpro", "ciscoroomkit" }; TypeNames = new List<string>() { "ciscospark", "ciscowebex", "ciscowebexpro", "ciscoroomkit", "ciscosparkpluscodec" };
} }
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)

View File

@@ -31,9 +31,18 @@ namespace PepperDash.Essentials.Devices.Common.Codec
[JsonProperty("sharing")] [JsonProperty("sharing")]
public SharingProperties Sharing { get; set; } public SharingProperties Sharing { get; set; }
/// <summary>
/// Enables external source switching capability
/// </summary>
[JsonProperty("externalSourceListEnabled")] [JsonProperty("externalSourceListEnabled")]
public bool ExternalSourceListEnabled { get; set; } public bool ExternalSourceListEnabled { get; set; }
/// <summary>
/// The name of the routing input port on the codec to which the external switch is connected
/// </summary>
[JsonProperty("externalSourceInputPort")]
public string ExternalSourceInputPort { get; set; }
/// <summary> /// <summary>
/// Optionsal property to set the limit of any phonebook queries for directory or searching /// Optionsal property to set the limit of any phonebook queries for directory or searching
/// </summary> /// </summary>

View File

@@ -1368,8 +1368,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{ {
set set
{ {
// If the incoming value is "Of" it sets the BoolValue true, otherwise sets it false // If the incoming value is "On" it sets the BoolValue true, otherwise sets it false
BoolValue = value == "Off"; BoolValue = value == "On";
OnValueChanged(); OnValueChanged();
} }
} }

View File

@@ -5,6 +5,7 @@ using System.Text;
using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharp.Ssh; using Crestron.SimplSharp.Ssh;
using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharp;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Core.Intersystem; using PepperDash.Core.Intersystem;
using PepperDash.Core.Intersystem.Tokens; using PepperDash.Core.Intersystem.Tokens;
@@ -231,12 +232,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
/// </summary> /// </summary>
protected void SetIsReady() protected void SetIsReady()
{ {
IsReady = true; CrestronInvoke.BeginInvoke( (o) =>
var h = IsReadyChange; {
if (h != null) try
{ {
h(this, new EventArgs()); IsReady = true;
} var h = IsReadyChange;
if (h != null)
{
h(this, new EventArgs());
}
}
catch (Exception e)
{
Debug.Console(2, this, "Error in SetIsReady() : {0}", e);
}
});
} }
// **** DEBUGGING THINGS **** // **** DEBUGGING THINGS ****