diff --git a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs b/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs
index b62e047c..fb40252c 100644
--- a/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs
+++ b/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs
@@ -97,10 +97,10 @@ namespace PepperDash.Essentials
{
TriList.SetSigFalseAction(ButtonPressJoinBase + 1, ShadeDevice.Open);
- TriList.SetSigFalseAction(ButtonPressJoinBase + 2, (ShadeDevice as IShadesOpenCloseStop).StopOrPreset);
-
- if(ShadeDevice is RelayControlledShade)
- TriList.SetString(StringJoinBase + 2, (ShadeDevice as RelayControlledShade).StopOrPresetButtonLabel);
+ TriList.SetSigFalseAction(ButtonPressJoinBase + 2, (ShadeDevice as IShadesOpenCloseStop).Stop);
+
+ if (ShadeDevice is IShadesOpenCloseStop)
+ TriList.SetString(StringJoinBase + 2, "Stop");
TriList.SetSigFalseAction(ButtonPressJoinBase + 3, ShadeDevice.Close);
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs
index 35492162..949009f6 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs
@@ -19,6 +19,7 @@ namespace PepperDash.Essentials.Core.Shades
///
/// Requirements for a device that implements basic Open/Close shade control
///
+ [Obsolete("Please use IShadesOpenCloseStop instead")]
public interface IShadesOpenClose
{
void Open();
@@ -28,15 +29,26 @@ namespace PepperDash.Essentials.Core.Shades
///
/// Requirements for a device that implements basic Open/Close/Stop shade control (Uses 3 relays)
///
- public interface IShadesOpenCloseStop : IShadesOpenClose
- {
- void StopOrPreset();
- string StopOrPresetButtonLabel { get; }
+ public interface IShadesOpenCloseStop
+ {
+ void Open();
+ void Close();
+ void Stop();
+ }
+
+ public interface IShadesOpenClosePreset : IShadesOpenCloseStop
+ {
+ void RecallPreset(uint presetNumber);
+ void SavePreset(uint presetNumber);
+ string StopOrPresetButtonLabel { get; }
+
+ event EventHandler PresetSaved;
}
///
/// Requirements for a shade that implements press/hold raise/lower functions
- ///
+ ///
+ [Obsolete("Please use IShadesOpenCloseStop instead")]
public interface IShadesRaiseLower
{
void Raise(bool state);
@@ -55,7 +67,7 @@ namespace PepperDash.Essentials.Core.Shades
///
/// Requirements for a shade/scene that is open or closed
///
- public interface IShadesOpenClosedFeedback: IShadesOpenClose
+ public interface IShadesOpenClosedFeedback: IShadesOpenCloseStop
{
BoolFeedback ShadeIsOpenFeedback { get; }
BoolFeedback ShadeIsClosedFeedback { get; }
@@ -63,15 +75,16 @@ namespace PepperDash.Essentials.Core.Shades
///
///
- ///
- public interface IShadesStop
+ ///
+ [Obsolete("Please use IShadesOpenCloseStop instead")]
+ public interface IShadesStop
{
void Stop();
}
///
- ///
- ///
+ /// Used to implement raise/stop/lower/stop from single button
+ ///
public interface IShadesStopOrMove
{
void OpenOrStop();
@@ -82,7 +95,7 @@ namespace PepperDash.Essentials.Core.Shades
///
/// Basic feedback for shades/scene stopped
///
- public interface IShadesStopFeedback
+ public interface IShadesStopFeedback : IShadesOpenCloseStop
{
BoolFeedback IsStoppedFeedback { get; }
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs
index d30b716a..2b92480e 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs
@@ -12,7 +12,7 @@ namespace PepperDash.Essentials.Core.Shades
///
/// Base class for a shade device
///
- public abstract class ShadeBase : EssentialsDevice, IShadesOpenClose
+ public abstract class ShadeBase : EssentialsDevice, IShadesOpenCloseStop
{
public ShadeBase(string key, string name)
: base(key, name)
@@ -23,7 +23,7 @@ namespace PepperDash.Essentials.Core.Shades
#region iShadesOpenClose Members
public abstract void Open();
- public abstract void StopOrPreset();
+ public abstract void Stop();
public abstract void Close();
#endregion
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs
index a78e5045..852d554f 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs
@@ -56,9 +56,9 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Somfy
PulseOutput(OpenRelay, RelayPulseTime);
}
- public override void StopOrPreset()
+ public override void Stop()
{
- Debug.Console(1, this, "Stopping or recalling preset on Shade: '{0}'", this.Name);
+ Debug.Console(1, this, "Stopping Shade: '{0}'", this.Name);
PulseOutput(StopOrPresetRelay, RelayPulseTime);
}
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs
index 9fae1a99..44d3f423 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs
@@ -1393,11 +1393,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, call.IsOnHold);
//serials
- tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty);
- tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, call.Number ?? String.Empty);
- tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString());
- tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 4, call.Type.ToString());
- tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 5, call.Status.ToString());
+ tokenArray[arrayIndex] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty);
+ tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 2, call.Number ?? String.Empty);
+ tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString());
+ tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 4, call.Type.ToString());
+ tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 5, call.Status.ToString());
if(call.Duration != null)
{
// May need to verify correct string format here
@@ -1407,9 +1407,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
arrayIndex += offset;
stringIndex += maxStrings;
- digitalIndex++;
+ digitalIndex += maxDigitals;
}
- while (digitalIndex < maxCalls)
+ while (arrayIndex < maxCalls * offset)
{
//digitals
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
@@ -1417,16 +1417,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
//serials
- tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, String.Empty);
- tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, String.Empty);
- tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, String.Empty);
- tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 4, String.Empty);
- tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 5, String.Empty);
- tokenArray[arrayIndex + 6] = new XSigSerialToken(stringIndex + 6, String.Empty);
+ tokenArray[arrayIndex] = new XSigSerialToken(stringIndex + 1, String.Empty);
+ tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 2, String.Empty);
+ tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 3, String.Empty);
+ tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 4, String.Empty);
+ tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 5, String.Empty);
+ tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 6, String.Empty);
arrayIndex += offset;
stringIndex += maxStrings;
- digitalIndex++;
+ digitalIndex += maxDigitals;
}
return GetXSigString(tokenArray);
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs
index 820d3ab1..6f497cef 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs
@@ -62,6 +62,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private readonly ZoomRoomPropertiesConfig _props;
+ private bool _meetingPasswordRequired;
+
+ public void Poll(string pollString)
+ {
+ if(_meetingPasswordRequired) return;
+
+ SendText(string.Format("{0}{1}", pollString, SendDelimiter));
+ }
+
public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
: base(config)
{
@@ -75,13 +84,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (_props.CommunicationMonitorProperties != null)
{
- CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
- _props.CommunicationMonitorProperties);
+ CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, _props.CommunicationMonitorProperties.PollInterval, _props.CommunicationMonitorProperties.TimeToWarning, _props.CommunicationMonitorProperties.TimeToError,
+ () => Poll(_props.CommunicationMonitorProperties.PollString));
}
else
{
- CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000,
- "zStatus SystemUnit" + SendDelimiter);
+ CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, () => Poll("zStatus SystemUnit"));
}
DeviceManager.AddDevice(CommunicationMonitor);
@@ -1992,6 +2000,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
///
private void GetBookings()
{
+ if (_meetingPasswordRequired) return;
+
SendText("zCommand Bookings List");
}
@@ -2179,6 +2189,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
);
}
+ _meetingPasswordRequired = false;
base.OnCallStatusChange(item);
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
@@ -3450,6 +3461,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
var handler = PasswordRequired;
if (handler != null)
{
+ if(!loginFailed || !loginCancelled)
+ _meetingPasswordRequired = true;
+
handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message));
}
}