Click or drag to resize

CenOdtCPoe Class

Ethernet-based dual technology sensor that uses passive infrared and ultrasonic technologies to detect occupancy.

This class will trigger BaseEvent and CenOccupancySensorChange events.

Inheritance Hierarchy
SystemObject
  Crestron.SimplSharpProGenericBase
    Crestron.SimplSharpProGenericDevice
      Crestron.SimplSharpPro.GeneralIOCenOdtCPoe

Namespace: Crestron.SimplSharpPro.GeneralIO
Assembly: Crestron.SimplSharpPro.GeneralIO (in Crestron.SimplSharpPro.GeneralIO.dll) Version: 2.21.121
Syntax
C#
public sealed class CenOdtCPoe : GenericDevice, 
	IGlsCenOcc, ICommonOccupancySensorInfo

The CenOdtCPoe type exposes the following members.

Constructors
 NameDescription
Public methodCenOdtCPoe Constructor to generate a new CenOdtCPoe object.
Top
Properties
 NameDescription
Public propertyAndWhenOccupiedFeedback Indicates that both passive infrared (PIR) OR ultrasonic (US) sensor technologies must not register motion to trigger room vacancy. true = Vacancy determined by the lack of sensed motion by both technologies; false = AND logic disabled.

The CenOccupancySensorChange event will trigger with AndWhenOccupiedFeedbackEventId.

Public propertyAndWhenVacatedFeedback Property to indicate if both passive infrared (PIR) OR ultrasonic (US) sensor technologies must register motion to trigger initial room occupancy. true = motion sensed needed by both technologies for initial occupancy; false = AND logic disabled.

The CenOccupancySensorChange event will trigger with AndWhenVacatedFeedbackEventId.

Public propertyBrightToDarkThreshold Property to set the threshold value to transition room from BRIGHT to DARK state. When the LightValue drops below this value, a BRIGHT room transitions to DARK RoomIsBrightFeedback will set to false and RoomIsDarkFeedback will set to true.
Public propertyBrightToDarkThresholdFeedback Property to report the current threshold value set to transition room from BRIGHT to DARK state. When the LightValue rises above this value, a BRIGHT room transitions to DARK RoomIsBrightFeedback will set to false and RoomIsDarkFeedback will set to true.

The BaseEvent event will trigger with BrightToDarkThresholdFeedbackEventId.

Public propertyConnectedIpList A property containing the list of the ConnectedIpInformation objects which contain information about the devices that are connected to this IP ID. This property is only valid for an ethernet device. If this is not an ethernet device, then this property will return null. If this is an ethernet device, the list will be non-null. It will be empty if no devices are connected. The order of items in this list is not guaranteed.
(Inherited from GenericDevice)
Public propertyCurrentTimeoutFeedback Property to indicate which timeout being used by the sensor, in seconds. The timeout is the elapsed time of raw vacancy needed for the sensor to declare the room vacant and send OccupancyDetectedFeedback to false and VacancyDetectedFeedback to true.

The BaseEvent event will trigger with TimeoutFeedbackEventId.

Public propertyDarkToBrightThreshold Property to set the threshold value to transition room from DARK to BRIGHT state. When the LightValue rises above this value, a DARK room transitions to BRIGHT. RoomIsDarkFeedback will set to false and RoomIsBrightFeedback will set to true.
Public propertyDarkToBrightThresholdFeedback Property to report the current threshold value set to transition room from DARK to BRIGHT state. When the LightValue rises above this value, a DARK room transitions to BRIGHT RoomIsDarkFeedback will set to false and RoomIsBrightFeedback sets to true.

The BaseEvent event will trigger with DarkToBrightThresholdFeedbackEventId.

Public propertyCode exampleDescription Get/Set the description of this device.
(Inherited from GenericBase)
Public propertyDisposed Property to indicate if the device has been disposed.
(Inherited from GenericDevice)
Public propertyGraceOccupancyDetectedFeedback Property to indicate occupancy event detected within 15s of initial vacancy event. Beyond 15s after the initial vacancy event, this property cannot be triggered. This property is most commonly used in an application where a vacancy-only sensor is desired. In such an instance, only this property will be used to turn on the lights, while OccupancyDetectedFeedback will remain unused. true = Occupancy event detected within 15s of initial vacancy event; false = No occupancy event detected within 15s of initial vacancy event.

The BaseEvent event will trigger with GraceOccupancyDetectedFeedbackEventId.

Public propertyID Property to get the ID of the device.
(Inherited from GenericDevice)
Public propertyIdentityModeOnFeedback Reports if the device is in Identify Mode. true = Device is in Identify Mode; false = Device is out of Identify Mode.

The CenOccupancySensorChange event will trigger with IdentityOnFeedbackEventId.

Public propertyInternalPhotoSensorMinimumChange Property to set the minimum change in value that the internal photosensor must sense before reporting a new value. The default minimum change of the device is 655 (1% of the full scale). Valid Range: 0 (0 lux) to 65535 (MAXIMUM VALUE O BE DETERMINED lux); if a value of 0 is input, a default of 655 will be applied.
Public propertyInternalPhotoSensorMinimumChangeFeedback Reports the minimum change that the photosensor must sense before reporting a new value. Valid Range: 0 (0 lux) to 65535 (MAXIMUM VALUE TO BE DETERMINED lux).

The BaseEvent event will trigger with InternalPhotoSensorMinimumChangeFeedbackEventId.

Public propertyInternalPhotoSensorValueFeedback Property to report the internal photosensor value. The output range is from 0 to MAXIMIM VALUE TO BE DETERMINED lux, scaled linearly from 0 to 65535.

The BaseEvent event will trigger with InternalPhotoSensorValueFeedbackEventId.

Public propertyIsOnline Property to get the current online state of the device.
(Inherited from GenericDevice)
Public propertyLedFlashEnabledFeedback Property to indicate if feedback LEDs are enabled or disabled that indicates if motion is detected. true = Feedback LEDs enabled; false = Feedback LEDs disabled.

The CenOccupancySensorChange event will trigger with LedFlashEnabledFeedbackEventId.

Public propertyName Get the name of this device.
(Inherited from GenericBase)
Public propertyOccupancyDetectedFeedback Property to indicate when the room is occupied. While occupied, either the passive infrared (PIR) sensor or ultrasonic (US) sensor can be triggered to maintain that state. VacancyDetectedFeedback sets to false and OccupancyDetectedFeedback sets to true. true = Room Occupied ; false = Room Vacant.

The BaseEvent event will trigger with RoomOccupiedFeedbackEventId.

Public propertyOrWhenOccupiedFeedback Indicates if either passive infrared (PIR) OR ultrasonic (US) sensor technologies can un-trigger to determine vacancy. true = Vacancy determined by the lack of sense by only one technology; false = OR logic disabled.

The CenOccupancySensorChange event will trigger with OrWhenOccupiedFeedbackEventId.

Public propertyOrWhenVacatedFeedback Property to indicate if either passive infrared (PIR) OR ultrasonic (US) sensor technologies can trigger initial occupancy. true = motion sensed needed by only one technology; false = OR logic disabled.

The CenOccupancySensorChange event will trigger with OrWhenVacatedFeedbackEventId.

Public propertyParent The parent that a given object was added to.
(Inherited from GenericBase)
Public propertyPassiveInfraredSensorEnabledFeedback Property to report if the passive infrared (PIR) Sensor is enabled. true = PIR Sensor enabled; false = PIR Sensor disabled.

The CenOccupancySensorChange event will trigger with PirEnabledFeedbackEventId.

Public propertyPassiveInfraredSensorSensitivityInOccupiedState Property to set the Sensitivity level for passive infrared (PIR) while sensor in occupied state. Value passed for Sensitivity level is not valid.
Public propertyPassiveInfraredSensorSensitivityInOccupiedStateFeedback Property to report Sensitivity level for passive infrared (PIR) while sensor is in occupied state.

The CenOccupancySensorChange event will trigger with PirSensitivityInOccupiedStateFeedbackEventId.

Public propertyPassiveInfraredSensorSensitivityInVacantState Property to set the Sensitivity level for passive infrared (PIR) while sensor in vacant state. Value passed for Sensitivity level is not valid.
Public propertyPassiveInfraredSensorSensitivityInVacantStateFeedback Property to report Sensitivity level for passive infrared (PIR) while sensor is in vacant state.

The CenOccupancySensorChange event will trigger with PirSensitivityInVacantStateFeedbackEventId.

Public propertyRawOccupancyDetectedByPassiveInfraredSensorFeedback Property to indicate if any raw motion registered/detected by the passive infrared (PIR) sensor. true = motion detected by passive infrared (PIR) sensor; false = No motion detected by passive infrared (PIR) sensor.

The BaseEvent event will trigger with RawOccupancyPirFeedbackEventId.

Public propertyRawOccupancyDetectedByUltrasonicSensorFeedback Property to indicate if any raw motion registered/detected by the ultrasonic (US) sensor. true = motion detected by ultrasonic (US); false = No motion detected by ultrasonic (US).

The BaseEvent event will trigger with RawOccupancyUsFeedbackEventId.

Public propertyRawOccupancyDetectedFeedback This property value will be set to true if ultrasonic (US) AND/OR passive infrared (PIR) sensors detect motion. The AND/OR determination is decided based upon the chosen logic. To see which logic is chosen, look at OrWhenVacatedFeedback and AndWhenVacatedFeedback. For example, in “Vacancy AND” logic both ultrasonic (US) and passive infrared (PIR) technologies must register motion in order to set this property value to true. true = motion detected by logical state; false = No motion detected by logical state.

The BaseEvent event will trigger with RawOccupancyFeedbackEventId.

Public propertyRawStatesEnabledFeedback Property to indicate if RawOccupancyDetectedFeedback, RawOccupancyDetectedByPassiveInfraredSensorFeedback and RawOccupancyDetectedByUltrasonicSensorFeedback are enabled or disabled. true = Raw Occupancy properties are enabled; false = Raw Occupancy properties are disabled.

The BaseEvent event will trigger with RawStatesEnabledFeedbackEventId.

Public propertyRegisterable Property to indicate that this device can be registered.
(Inherited from GenericDevice)
Public propertyRegistered Property to get the current registration state of the device.
(Inherited from GenericDevice)
Public propertyRegistrationFailureReason Property to get the Registration Failure Reason, this will match the return value from the call to register.
(Inherited from GenericDevice)
Public propertyRemoteTimeout Property to set a dynamic timeout in seconds. This property is typically used to set different timeouts based upon time of day, or state of room. Valid range: 5 (5sec) – 1800 (30min). Any value above 1800 will revert to 1800s and any value below 5 will revert to 5s.
Public propertyRoomIsBrightFeedback Property to indicate when the room is determined to be brightly lit. RoomIsDarkFeedback is set to false and RoomIsDarkFeedback is set to true. true = Room Bright; false = Room Dark.

The BaseEvent event will trigger with RoomIsBrightFeedbackEventId.

Public propertyRoomIsDarkFeedback Property to indicate when the room is determined to not be brightly lit. RoomIsDarkFeedback is set to false and RoomIsDarkFeedback is set to true. true = Room Dark; false = Room Bright.

The BaseEvent event will trigger with RoomIsDarkFeedbackEventId.

Public propertyShortTimeoutEnabledFeedback Property to report if the short timeout functionality has been enabled. true = Short timeout enabled; false = Short timeout disabled

The CenOccupancySensorChange event will trigger with ShortTimeoutEnabledFeedbackEventId.

Protected propertySIMPLDeviceImplementation Internal protected member used for actual device control.
(Inherited from GenericDevice)
Public propertyType Property to determine to type of device this is.
(Inherited from GenericDevice)
Public propertyUltrasonicSensorSensitivityInOccupiedState Property to set the Sensitivity level for ultrasonic (US) while sensor is in occupied state. Value passed for Sensitivity level is not defined in the enum eSensitivityLevel.
Public propertyUltrasonicSensorSensitivityInOccupiedStateFeedback Property to report Sensitivity level for ultrasonic (US) while sensor is in occupied state.

The CenOccupancySensorChange event will trigger with UsSensitivityInOccupiedStateFeedbackEventId.

Public propertyUltrasonicSensorSensitivityInVacantState Property to set the Sensitivity level for ultrasonic (US) while sensor is in vacant state. Value passed for Sensitivity level is not defined in the enum eSensitivityLevel.
Public propertyUltrasonicSensorSensitivityInVacantStateFeedback Property to report Sensitivity level for ultrasonic (US) while sensor is in vacant state.

The CenOccupancySensorChange event will trigger with UsSensitivityInVacantStateFeedbackEventId.

Public propertyUltrasonicSensorSideAEnabledFeedback Property to report if the ultrasonic (US) Sensor side A is enabled.

The CenOccupancySensorChange event will trigger with UsAEnabledFeedbackEventId.

Public propertyUltrasonicSensorSideBEnabledFeedback Property to report if the ultrasonic (US) Sensor side B is enabled. true = US Sensor B enabled; false = US Sensor B disabled.

The CenOccupancySensorChange event will trigger with UsBEnabledFeedbackEventId.

Public propertyUnRegistrationFailureReason Property to get the Unregistration Failure Reason, this will match the return value from the call to unregister.
(Inherited from GenericDevice)
Public propertyUserSpecifiedObject Can be assigned anything that user wants.
(Inherited from GenericBase)
Public propertyVacancyDetectedFeedback Property to indicate when the room is vacant. OccupancyDetectedFeedback sets to false and VacancyDetectedFeedback sets to true. true = Room Vacant ; false = Room Occupied.

The BaseEvent event will trigger with RoomVacantFeedbackEventId.

Protected propertyXioEndpointStubSIMPLDevice The SIMPL "stub" Device that the XiO Director creates for an endpoint to send the 1C/0E to the correct place in hierarchy.
(Inherited from GenericDevice)
Top
Methods
 NameDescription
Public methodAndWhenOccupied If the room is occupied, both passive infrared (PIR) OR ultrasonic (US) motion sensors need to not detect motion to declare vacancy. Method to trigger both passive infrared (PIR) OR ultrasonic (US) motion sensors to not detect motion to declare vacancy, if the room is occupied.
Public methodAndWhenVacated Method to trigger both passive infrared (PIR) OR ultrasonic (US) motion sensors to detect motion to declare initial occupancy, if the room is vacant.
Public methodDisableLedFlash Method to disable the red and green feedback LEDs from blinking when motion is detected.
Public methodDisablePassiveInfraredSensor Method to disable the passive infrared (PIR) Sensor.
Public methodDisableRawStates Method to disable RawOccupancyDetectedFeedback, RawOccupancyDetectedByPassiveInfraredSensorFeedback and RawOccupancyDetectedByUltrasonicSensorFeedback properties.
Public methodDisableShortTimeout Method to disable the short timeout functionality. See EnableShortTimeout method for description.
Public methodDisableUltrasonicSensorSideA Method to disable the ultrasonic (US) Sensor side A. This does NOT enable side B.
Public methodDisableUltrasonicSensorSideB Method to disable the ultrasonic (US) Sensor side B. This does not enable side A.
Public methodDispose Clean up of resources.
(Inherited from GenericBase)
Protected methodDispose(Boolean) Method to perform the actual disposing of the device.
(Inherited from GenericDevice)
Public methodEnableLedFlash Method to enable the red and green feedback LEDs. The red LED turns on as the passive infrared (PIR) sensor detects motion, and the green LED turns on as the ultrasonic (US) sensor detects motion.
Public methodEnablePassiveInfraredSensor Method to enable the passive infrared (PIR) Sensor.
Public methodEnableRawStates Method to enable RawOccupancyDetectedFeedback, RawOccupancyDetectedByPassiveInfraredSensorFeedback and RawOccupancyDetectedByUltrasonicSensorFeedback properties.
Public methodEnableShortTimeout Method to enable a “walk-through” mode for a shorter timeouts upon periods of minimal occupancy. If the room is occupied for less than 90s, the timeout will revert to 60s. If the normally programmed timeout is set less than 60s, that timeout will take precedence. This is useful for rooms with normally a long timeout setting, so if the room is only entered for a short period of time, and occupancy is triggered, the lights do not remain on for a longer period than needed. Short timeout does not apply if occupancy event was a ""Grace occupancy"" (previous vacancy time is greater than 15 seconds).
Public methodEnableUltrasonicSensorSideA Method to enable the ultrasonic (US) Sensor side A. Does NOT disable side B. Side A is the side where the majority of the red LED is shown through the dome.
Public methodEnableUltrasonicSensorSideB Method to enable the ultrasonic (US) Sensor side B. This does NOT disable side A. Side B is the side where the majority of the green LED is shown through the dome and is also identified on the back-housing plastic rim.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Destructor of the device.
(Inherited from GenericDevice)
Public methodForceOccupied Method to force the device to report that the room is occupied even if the passive infrared (PIR) sensor does not detect motion. VacancyDetectedFeedback sets to false and OccupancyDetectedFeedback sets to true. RawOccupancyDetectedFeedback is set to true when ForceOccupied is called. The sensor will then be in the occupied state for the duration of the set timeout.
Public methodForceVacant Method to force the device to report that the room is vacant even if the passive infrared (PIR) sensor does not detect vacancy. OccupancyDetectedFeedback sets to false and VacancyDetectedFeedback sets to true. Upon forcing vacancy, there is a 5 second delay before the sensor begins re-sensing for motion.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIdentityModeOff Methodto take the device out of Identify Mode. Stops the blue LED from blinking.
Public methodIdentityModeOn Method to take the device into Identify Mode. The blue LED blinks.
Protected methodOnBaseEvent(Int32) Protected member used to fire the BaseEvent with the default extended information.
(Inherited from GenericBase)
Protected methodOnBaseEvent(Int32, UInt16) Protected member used to fine the BaseEvent with extended event information.
(Inherited from GenericBase)
Public methodOrWhenOccupied Method to trigger either passive infrared (PIR) OR ultrasonic (US) motion sensors to determine vacancy and set the sensor to the vacant state, if the room is occupied.
Public methodOrWhenVacated Method to trigger either passive infrared (PIR) OR ultrasonic (US) motion sensors to declare initial occupancy and set the sensor to the occupied state, if the room is vacant.
Public methodRegister Register this device with the system.
(Inherited from GenericDevice)
Public methodToString Return the name of the device.
(Inherited from GenericDevice)
Public methodUnRegister Unregister this device with the system. This function can not be called from the device's own SigChange event handler.

On successful unregistration, if this device supports the OnlineStatusChange event, it will trigger indicating the device when offline.


(Inherited from GenericDevice)
Top
Events
 NameDescription
Public eventBaseEvent Generic base event, triggered when the there are no other handlers available for a specific EventID.
(Inherited from GenericBase)
Public eventCenOccupancySensorChange Event triggered when the CEN Occupancy Sensor reports information to the Control System.

Valid event IDs are available in GlsOccupancySensorBase

Public eventIpInformationChange Event that tells what IP Address is connected/disconnected from an IP ID for a non-UDP device. This is only valid for an Ethernet device. An exception will be thrown if it is not.
(Inherited from GenericDevice)
Public eventOnlineStatusChange Event triggered when the Online status of the device changes.
(Inherited from GenericDevice)
Top
Example
C#
static CenOdtCPoe _cenOdtCPoe;

public ControlSystemCenOdtCPoe()
{
    //Register console commands
    CrestronConsole.AddNewConsoleCommand(CreateDeviceCmd, "CreateDevice", "This is a CEN-ODT-C-POE CreateDevice command", ConsoleAccessLevelEnum.AccessOperator);
}

public void CreateDeviceCmd(String args)
{
    _cenOdtCPoe = new CenOdtCPoe(0x25, this);
    _cenOdtCPoe.BaseEvent += CenOdtCPoePropertyChangeEventHandler;
    _CenOccupancySensorChange += OccupancySensorPropertyChange;

    _cenOdtCPoe.Register();
    if (_cenOdtCPoe.Registered)
    {
        CrestronConsole.ConsoleCommandResponse("{0} device successfully registered\r\n", _cenOdtCPoe.ToString());
    }
}

public void CenOdtCPoePropertyChangeEventHandler(GenericBase device, BaseEventArgs args)
{
    if (args.EventId == GlsOccupancySensorBase.RoomOccupiedFeedbackEventId)
    {
        CrestronConsole.PrintLine("Room Occupied Feedback Event Received, OccupancyDetectedFeedback is {0}", _cenOdtCPoe.OccupancyDetectedFeedback);
    }
}

public void OccupancySensorPropertyChange(CenOdtCPoe device, CenOccupancySensorChangeEventArgs args)
{
    if (args.EventId == GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId)
    {
        CrestronConsole.PrintLine("Led Flash Enabled Feedback Event Received, LedFlashEnabledFeedback is {0}", _cenOdtCPoe.LedFlashEnabledFeedback);
    }
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also