mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 19:54:59 +00:00
Minor updates after testing at runtime.
This commit is contained in:
@@ -14,6 +14,7 @@ using PepperDash.Essentials.Core.Bridges;
|
|||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for CEN-ODT-C-POE")]
|
[Description("Wrapper class for CEN-ODT-C-POE")]
|
||||||
|
[ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0,\"enableUsA\": true,\"enableUsB\": true,\"orWhenVacatedState\": true}")]
|
||||||
public class CenOdtOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
public class CenOdtOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
||||||
{
|
{
|
||||||
public CenOdtCPoe OccSensor { get; private set; }
|
public CenOdtCPoe OccSensor { get; private set; }
|
||||||
@@ -135,6 +136,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void ApplySettingsToSensorFromConfig()
|
protected virtual void ApplySettingsToSensorFromConfig()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "Checking config for settings to apply");
|
||||||
|
|
||||||
if (PropertiesConfig.EnablePir != null)
|
if (PropertiesConfig.EnablePir != null)
|
||||||
{
|
{
|
||||||
SetPirEnable((bool)PropertiesConfig.EnablePir);
|
SetPirEnable((bool)PropertiesConfig.EnablePir);
|
||||||
@@ -494,6 +497,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
var dash = new string('*', 50);
|
var dash = new string('*', 50);
|
||||||
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Vacancy Detected: {0}",
|
||||||
|
OccSensor.VacancyDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
Debug.Console(0, Key, "Timeout Current: {0} | Remote: {1}",
|
Debug.Console(0, Key, "Timeout Current: {0} | Remote: {1}",
|
||||||
OccSensor.CurrentTimeoutFeedback.UShortValue,
|
OccSensor.CurrentTimeoutFeedback.UShortValue,
|
||||||
OccSensor.RemoteTimeout.UShortValue);
|
OccSensor.RemoteTimeout.UShortValue);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using PepperDash.Essentials.Core.Bridges;
|
|||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for Single Technology GLS Occupancy Sensors")]
|
[Description("Wrapper class for Single Technology GLS Occupancy Sensors")]
|
||||||
|
[ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0}")]
|
||||||
public class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
public class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
||||||
{
|
{
|
||||||
public GlsOccupancySensorPropertiesConfig PropertiesConfig { get; private set; }
|
public GlsOccupancySensorPropertiesConfig PropertiesConfig { get; private set; }
|
||||||
@@ -343,19 +344,22 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Method to print current occ settings to console.
|
/// Method to print current occ settings to console.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
public void GetSettings()
|
public virtual void GetSettings()
|
||||||
{
|
{
|
||||||
var dash = new string('*', 50);
|
var dash = new string('*', 50);
|
||||||
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
||||||
|
|
||||||
Debug.Console(0, Key, "Timeout Current: {0} | Local: {1}",
|
Debug.Console(0, this, "Vacancy Detected: {0}",
|
||||||
|
OccSensor.VacancyDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Timeout Current: {0} | Local: {1}",
|
||||||
OccSensor.CurrentTimeoutFeedback.UShortValue,
|
OccSensor.CurrentTimeoutFeedback.UShortValue,
|
||||||
OccSensor.LocalTimeoutFeedback.UShortValue);
|
OccSensor.LocalTimeoutFeedback.UShortValue);
|
||||||
|
|
||||||
Debug.Console(0, Key, "Short Timeout Enabled: {0}",
|
Debug.Console(0, this, "Short Timeout Enabled: {0}",
|
||||||
OccSensor.ShortTimeoutEnabledFeedback.BoolValue);
|
OccSensor.ShortTimeoutEnabledFeedback.BoolValue);
|
||||||
|
|
||||||
Debug.Console(0, Key, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}",
|
Debug.Console(0, this, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}",
|
||||||
OccSensor.PirEnabledFeedback.BoolValue,
|
OccSensor.PirEnabledFeedback.BoolValue,
|
||||||
OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue,
|
OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue,
|
||||||
OccSensor.PirSensitivityInVacantStateFeedback.UShortValue);
|
OccSensor.PirSensitivityInVacantStateFeedback.UShortValue);
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ using PepperDash.Essentials.Core.Bridges;
|
|||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for Dual Technology GLS Occupancy Sensors")]
|
[Description("Wrapper class for Dual Technology GLS Occupancy Sensors")]
|
||||||
public class GlsOdtOccupancySensorController : GlsOccupancySensorBaseController
|
[ConfigSnippet("\"properties\": {\"control\": {\"method\": \"cresnet\",\"cresnetId\": \"97\"},\"enablePir\": true,\"enableLedFlash\": true,\"enableRawStates\":true,\"remoteTimeout\": 30,\"internalPhotoSensorMinChange\": 0,\"externalPhotoSensorMinChange\": 0,\"enableUsA\": true,\"enableUsB\": true,\"orWhenVacatedState\": true}")]
|
||||||
|
public class GlsOdtOccupancySensorController : GlsOccupancySensorBaseController
|
||||||
{
|
{
|
||||||
public new GlsOdtCCn OccSensor { get; private set; }
|
public new GlsOdtCCn OccSensor { get; private set; }
|
||||||
|
|
||||||
@@ -198,31 +199,19 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method to print occ sensor settings to console.
|
/// Method to print occ sensor settings to console.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void GetSettings()
|
public override void GetSettings()
|
||||||
{
|
{
|
||||||
var dash = new string('*', 50);
|
base.GetSettings();
|
||||||
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
|
||||||
|
|
||||||
Debug.Console(0, Key, "Timeout Current: {0} | Local: {1}",
|
Debug.Console(0, this, "Ultrasonic Enabled A: {0} | B: {1}",
|
||||||
OccSensor.CurrentTimeoutFeedback.UShortValue,
|
|
||||||
OccSensor.LocalTimeoutFeedback.UShortValue);
|
|
||||||
|
|
||||||
Debug.Console(0, Key, "Short Timeout Enabled: {0}",
|
|
||||||
OccSensor.ShortTimeoutEnabledFeedback.BoolValue);
|
|
||||||
|
|
||||||
Debug.Console(0, Key, "PIR Sensor Enabled: {0} | Sensitivity Occupied: {1} | Sensitivity Vacant: {2}",
|
|
||||||
OccSensor.PirEnabledFeedback.BoolValue,
|
|
||||||
OccSensor.PirSensitivityInOccupiedStateFeedback.UShortValue,
|
|
||||||
OccSensor.PirSensitivityInVacantStateFeedback.UShortValue);
|
|
||||||
|
|
||||||
Debug.Console(0, Key, "Ultrasonic Enabled A: {0} | B: {1}",
|
|
||||||
OccSensor.UsAEnabledFeedback.BoolValue,
|
OccSensor.UsAEnabledFeedback.BoolValue,
|
||||||
OccSensor.UsBEnabledFeedback.BoolValue);
|
OccSensor.UsBEnabledFeedback.BoolValue);
|
||||||
|
|
||||||
Debug.Console(0, Key, "Ultrasonic Sensitivity Occupied: {0} | Vacant: {1}",
|
Debug.Console(0, this, "Ultrasonic Sensitivity Occupied: {0} | Vacant: {1}",
|
||||||
OccSensor.UsSensitivityInOccupiedStateFeedback.UShortValue,
|
OccSensor.UsSensitivityInOccupiedStateFeedback.UShortValue,
|
||||||
OccSensor.UsSensitivityInVacantStateFeedback.UShortValue);
|
OccSensor.UsSensitivityInVacantStateFeedback.UShortValue);
|
||||||
|
|
||||||
|
var dash = new string('*', 50);
|
||||||
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user