The implemented cluster.
Readonly
eventsAccess the behavior's events.
Readonly
actionThis event shall be generated when there is some error which prevents the action from its normal planned execution and the most recent command using that ActionID used an InvokeID data field.
It provides feedback to the client about the non-successful progress of the action.
Example: When InstantActionWithTransition is invoked (with an InvokeID data field), and another controller changes the state of one or more of the involved endpoints during the transition, thus interrupting the transition triggered by the action, two events would be generated:
• StateChanged when the transition starts (NewState=Active)
• ActionFailed when the interrupting command occurs (NewState=Inactive, Error=interrupted)
Example: When InstantActionWithTransition is invoked (with an InvokeID data field = 1), and the same client invokes an InstantAction with (the same or another ActionId and) InvokeID = 2, and this second command interrupts the transition triggered by the first command, these events would be generated:
• StateChanged (InvokeID=1, NewState=Active) when the transition starts
• ActionFailed (InvokeID=2, NewState=Inactive, Error=interrupted) when the second command interrupts the transition
• StateChanged (InvokeID=2, NewState=Inactive) upon the execution of the action for the second command
Readonly
stateThis event shall be generated when there is a change in the State of an ActionID during the execution of an action and the most recent command using that ActionID used an InvokeID data field.
It provides feedback to the client about the progress of the action.
Example: When InstantActionWithTransition is invoked (with an InvokeID data field), two StateChanged events will be generated:
• one when the transition starts (NewState=Active)
• one when the transition completed (NewState=Inactive)
Supported features as a flag object.
Readonly
stateAccess the behavior's state.
Readonly
actionThe ActionList attribute holds the list of actions. Each entry shall have an unique ActionID, and its EndpointListID shall exist in the EndpointLists attribute.
Readonly
endpointThe EndpointLists attribute holds the list of endpoint lists. Each entry shall have an unique EndpointListID.
Optional
Readonly
setupThe SetupURL attribute (when provided) shall indicate a URL; its syntax shall follow the syntax as specified in RFC 3986, max. 512 ASCII characters. The location referenced by this URL shall provide additional information for the actions provided:
• When used without suffix, it shall provide information about the various actions which the cluster provides.
◦ Example: SetupURL could take the value of example://Actions or https://domain.example/
Matter/bridgev1/Actions for this generic case (access generic info how to use actions provided by
this cluster).
• When used with a suffix of "/?a=" and the decimal value of ActionID for one of the actions, it may provide information about that particular action. This could be a deeplink to manufacturer-app/website (associated somehow to the server node) with the information/edit-screen for this action so that the user can view and update details of the action, e.g. edit the scene, or change the wake-up experience time period.
◦ Example of SetupURL with suffix added: example://Actions/?a=12345 or
https://domain.example/Matter/bridgev1/Actions/?a=12345 for linking to specific info/editing of
the action with ActionID 0x3039.
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
InternalImplementation of internal state. Subclasses may override to extend.
Static
Readonly
nameStatic
Optional
Readonly
schemaStatic
Readonly
StateStatic
Readonly
supervisorStatic
supportsDoes this behavior support functionality of a specific implementation?
Release resources. This is the public API for releasing application resources held by behaviors in internal state.
Execute logic with elevated privileges.
The provided function executes with privileges escalated to offline mode. This is not commonly necessary.
Elevated logic effectively ignores ACLs so should be used with care.
Note that interactions with the behavior will remain elevated until the synchronous completion of this call. You should only elevate privileges for synchronous logic.
the elevated logic
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!
This command disables a certain action or automation, and shall change the action’s state to Inactive.
Example: disable a motion sensor to no longer control the lights in an area.
This command disables a certain action or automation, and shall change the action’s state to Disabled. After the specified Duration, the action or automation will re-start, and the action’s state shall change to either Inactive or Active, depending on the actions (see examples 4 and 6).
Example: disable a "wakeup" experience for a period of 1 week when going on holiday (to prevent them from turning on in the morning while you’re not at home). After this period, the wakeup experience will control the lights as before.
This command enables a certain action or automation. Afterwards, the action’s state shall be Active.
Example: enable a motion sensor to control the lights in an area.
This command enables a certain action or automation, and shall change the action’s state to be Active. After the specified Duration, the action or automation will stop, and the action’s state shall change to Disabled.
Example: enable a "presence mimicking" behavior for the lights in your home during a vacation; the Duration field is used to indicated the length of your absence from home. After that period, the presence mimicking behavior will no longer control these lights.
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.
Optional
_options: {}This command triggers an action (state change) on the involved endpoints, in a "fire and forget" manner. Afterwards, the action’s state shall be Inactive.
Example: recall a scene on a number of lights.
It is recommended that, where possible (e.g., it is not possible for attributes with Boolean data type), a gradual transition SHOULD take place from the old to the new state over this time period. However, the exact transition is manufacturer dependent.
This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. During the transition, the action’s state shall be Active. Afterwards, the action’s state shall be Inactive.
Example: recall a scene on a number of lights, with a specified transition time.
This command pauses an ongoing action, and shall change the action’s state to Paused.
Example: pause a dynamic lighting effect (the lights stay at their current color) which was previously started with StartAction.
This command pauses an ongoing action, and shall change the action’s state to Paused. After the specified Duration, the ongoing action will be automatically resumed. which shall change the action’s state to Active.
Example: pause a dynamic lighting effect (the lights stay at their current color) for 10 minutes (Duration=600).
The difference between Pause/Resume and Disable/Enable is on the one hand semantic (the former is more of a transitionary nature while the latter is more permanent) and on the other hand these can be implemented slightly differently in the implementation of the action (e.g. a Pause would be automatically resumed after some hours or during a nightly reset, while an Disable would remain in effect until explicitly enabled again).
Protected
reactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
This command resumes a previously paused action, and shall change the action’s state to Active.
The difference between ResumeAction and StartAction is that ResumeAction will continue the action from the state where it was paused, while StartAction will start the action from the beginning.
Example: resume a dynamic lighting effect (the lights' colors will change gradually, continuing from the point they were paused).
This command triggers the commencement of an action on the involved endpoints. Afterwards, the action’s state shall be Active.
Example: start a dynamic lighting pattern (such as gradually rotating the colors around the setpoints of the scene) on a set of lights.
Example: start a sequence of events such as a wake-up experience involving lights moving through several brightness/color combinations and the window covering gradually opening.
This command triggers the commencement of an action on the involved endpoints, and shall change the action’s state to Active. After the specified Duration, the action will stop, and the action’s state shall change to Inactive.
Example: start a dynamic lighting pattern (such as gradually rotating the colors around the setpoints of the scene) on a set of lights for 1 hour (Duration=3600).
This command stops the ongoing action on the involved endpoints. Afterwards, the action’s state shall be Inactive.
Example: stop a dynamic lighting pattern which was previously started with StartAction.
Static
alterStatic
enableStatic
forStatic
setStatic
with
This is the default server implementation of ActionsBehavior.