The implemented cluster.
Readonly
eventsAccess the behavior's events.
Supported features as a flag object.
Protected
internalReadonly
stateAccess the behavior's state.
Readonly
globalIn order to support the use case where the user gets back the last setting of a set of devices (e.g. level settings for lights), a global scene is introduced which is stored when the devices are turned off and recalled when the devices are turned on. The global scene is defined as the scene that is stored with group identifier 0 and scene identifier 0.
This attribute is defined in order to prevent a second Off command storing the all-devices-off situation as a global scene, and to prevent a second On command destroying the current settings by going back to the global scene.
This attribute shall be set to TRUE after the reception of a command which causes the OnOff attribute to be set to TRUE, such as a standard On command, a MoveToLevel(WithOnOff) command, a RecallScene command or a OnWithRecallGlobalScene command.
This attribute is set to FALSE after reception of a OffWithEffect command.
Readonly
offThis attribute specifies the length of time (in 1/10ths second) that the Off state shall be guarded to prevent another OnWithTimedOff command turning the server back to its On state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving person and attempts to turn the lights back on). This attribute can be written at any time, but writing a value only has an effect when in the Timed On state followed by a transition to the Delayed Off state, or in the Delayed Off state. See OnWithTimedOff for more details.
Readonly
onThis attribute indicates whether the device type implemented on the endpoint is turned off or turned on, in these cases the value of the OnOff attribute equals FALSE, or TRUE respectively.
Readonly
onThis attribute specifies the length of time (in 1/10ths second) that the On state shall be maintained before automatically transitioning to the Off state when using the OnWithTimedOff command. This attribute can be written at any time, but writing a value only has effect when in the Timed On state. See OnWithTimedOff for more details.
Readonly
startThis attribute shall define the desired startup behavior of a device when it is supplied with power and this state shall be reflected in the OnOff attribute. If the value is null, the OnOff attribute is set to its previous value. Otherwise, the behavior is defined in the table defining StartUpOnOffEnum.
This behavior does not apply to reboots associated with OTA. After an OTA restart, the OnOff attribute shall return to its value prior to the restart.
Static
Readonly
clusterBase cluster state include all attribute values but may be extended by subclasses.
Static
Readonly
defaultsStatic
Optional
Readonly
dependenciesStatic
Readonly
earlyStatic
Readonly
EventsStatic
Readonly
ExtensionStatic
Readonly
idThe behavior ID for ClusterBehaviors is the name of the cluster.
Static
Readonly
InterfaceStatic
Readonly
nameStatic
Optional
Readonly
schemaStatic
Readonly
StateStatic
Readonly
supervisorStatic
supportsDoes this behavior support functionality of a specific implementation?
Protected
callbackCreate a generic callback function that has the same properties as a Reactor.
Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!
Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.
This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.
Default implementation notes:
Default implementation notes:
Default implementation notes:
Protected
reactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
Default implementation notes: This method uses the on/off methods when timed actions should occur. This means that it is enough to override on() and off() with custom control logic.
Static
alterStatic
enableStatic
forStatic
setStatic
with
This is the default server implementation of OnOffBehavior.
This implementation includes all features of OnOff.Cluster and automatically enables the "Level Control for Lighting" Feature. You should use OnOffServer.with to specialize the class for the features your implementation supports. Alternatively you can extend this class and override the methods you need to change or add mandatory commands.
The "OffOnly" feature is automatically supported because the commands are disabled by conformance. The default implementation do not contain any logic for the DeadFrontBehavior feature because this is very use case specific, so this needs to be implemented by the device implementor as needed.