matterbridge 3.4.3-dev-20251209-e6cb85f → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/broadcastServer.d.ts +144 -0
- package/dist/broadcastServer.d.ts.map +1 -0
- package/dist/broadcastServer.js +119 -0
- package/dist/broadcastServer.js.map +1 -0
- package/dist/broadcastServerTypes.d.ts +841 -0
- package/dist/broadcastServerTypes.d.ts.map +1 -0
- package/dist/broadcastServerTypes.js +24 -0
- package/dist/broadcastServerTypes.js.map +1 -0
- package/dist/cli.d.ts +30 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +97 -1
- package/dist/cli.js.map +1 -0
- package/dist/cliEmitter.d.ts +50 -0
- package/dist/cliEmitter.d.ts.map +1 -0
- package/dist/cliEmitter.js +37 -0
- package/dist/cliEmitter.js.map +1 -0
- package/dist/cliHistory.d.ts +48 -0
- package/dist/cliHistory.d.ts.map +1 -0
- package/dist/cliHistory.js +38 -0
- package/dist/cliHistory.js.map +1 -0
- package/dist/clusters/export.d.ts +2 -0
- package/dist/clusters/export.d.ts.map +1 -0
- package/dist/clusters/export.js +2 -0
- package/dist/clusters/export.js.map +1 -0
- package/dist/deviceManager.d.ts +135 -0
- package/dist/deviceManager.d.ts.map +1 -0
- package/dist/deviceManager.js +113 -1
- package/dist/deviceManager.js.map +1 -0
- package/dist/devices/airConditioner.d.ts +98 -0
- package/dist/devices/airConditioner.d.ts.map +1 -0
- package/dist/devices/airConditioner.js +57 -0
- package/dist/devices/airConditioner.js.map +1 -0
- package/dist/devices/batteryStorage.d.ts +48 -0
- package/dist/devices/batteryStorage.d.ts.map +1 -0
- package/dist/devices/batteryStorage.js +48 -1
- package/dist/devices/batteryStorage.js.map +1 -0
- package/dist/devices/cooktop.d.ts +61 -0
- package/dist/devices/cooktop.d.ts.map +1 -0
- package/dist/devices/cooktop.js +56 -0
- package/dist/devices/cooktop.js.map +1 -0
- package/dist/devices/dishwasher.d.ts +71 -0
- package/dist/devices/dishwasher.d.ts.map +1 -0
- package/dist/devices/dishwasher.js +57 -0
- package/dist/devices/dishwasher.js.map +1 -0
- package/dist/devices/evse.d.ts +76 -0
- package/dist/devices/evse.d.ts.map +1 -0
- package/dist/devices/evse.js +74 -10
- package/dist/devices/evse.js.map +1 -0
- package/dist/devices/export.d.ts +17 -0
- package/dist/devices/export.d.ts.map +1 -0
- package/dist/devices/export.js +5 -0
- package/dist/devices/export.js.map +1 -0
- package/dist/devices/extractorHood.d.ts +46 -0
- package/dist/devices/extractorHood.d.ts.map +1 -0
- package/dist/devices/extractorHood.js +43 -0
- package/dist/devices/extractorHood.js.map +1 -0
- package/dist/devices/heatPump.d.ts +47 -0
- package/dist/devices/heatPump.d.ts.map +1 -0
- package/dist/devices/heatPump.js +50 -2
- package/dist/devices/heatPump.js.map +1 -0
- package/dist/devices/laundryDryer.d.ts +67 -0
- package/dist/devices/laundryDryer.d.ts.map +1 -0
- package/dist/devices/laundryDryer.js +62 -3
- package/dist/devices/laundryDryer.js.map +1 -0
- package/dist/devices/laundryWasher.d.ts +81 -0
- package/dist/devices/laundryWasher.d.ts.map +1 -0
- package/dist/devices/laundryWasher.js +70 -4
- package/dist/devices/laundryWasher.js.map +1 -0
- package/dist/devices/microwaveOven.d.ts +168 -0
- package/dist/devices/microwaveOven.d.ts.map +1 -0
- package/dist/devices/microwaveOven.js +88 -5
- package/dist/devices/microwaveOven.js.map +1 -0
- package/dist/devices/oven.d.ts +105 -0
- package/dist/devices/oven.d.ts.map +1 -0
- package/dist/devices/oven.js +85 -0
- package/dist/devices/oven.js.map +1 -0
- package/dist/devices/refrigerator.d.ts +118 -0
- package/dist/devices/refrigerator.d.ts.map +1 -0
- package/dist/devices/refrigerator.js +102 -0
- package/dist/devices/refrigerator.js.map +1 -0
- package/dist/devices/roboticVacuumCleaner.d.ts +112 -0
- package/dist/devices/roboticVacuumCleaner.d.ts.map +1 -0
- package/dist/devices/roboticVacuumCleaner.js +100 -9
- package/dist/devices/roboticVacuumCleaner.js.map +1 -0
- package/dist/devices/solarPower.d.ts +40 -0
- package/dist/devices/solarPower.d.ts.map +1 -0
- package/dist/devices/solarPower.js +38 -0
- package/dist/devices/solarPower.js.map +1 -0
- package/dist/devices/speaker.d.ts +87 -0
- package/dist/devices/speaker.d.ts.map +1 -0
- package/dist/devices/speaker.js +84 -0
- package/dist/devices/speaker.js.map +1 -0
- package/dist/devices/temperatureControl.d.ts +166 -0
- package/dist/devices/temperatureControl.d.ts.map +1 -0
- package/dist/devices/temperatureControl.js +24 -3
- package/dist/devices/temperatureControl.js.map +1 -0
- package/dist/devices/waterHeater.d.ts +111 -0
- package/dist/devices/waterHeater.d.ts.map +1 -0
- package/dist/devices/waterHeater.js +82 -2
- package/dist/devices/waterHeater.js.map +1 -0
- package/dist/dgram/coap.d.ts +205 -0
- package/dist/dgram/coap.d.ts.map +1 -0
- package/dist/dgram/coap.js +126 -13
- package/dist/dgram/coap.js.map +1 -0
- package/dist/dgram/dgram.d.ts +141 -0
- package/dist/dgram/dgram.d.ts.map +1 -0
- package/dist/dgram/dgram.js +114 -2
- package/dist/dgram/dgram.js.map +1 -0
- package/dist/dgram/mb_coap.d.ts +24 -0
- package/dist/dgram/mb_coap.d.ts.map +1 -0
- package/dist/dgram/mb_coap.js +41 -3
- package/dist/dgram/mb_coap.js.map +1 -0
- package/dist/dgram/mb_mdns.d.ts +24 -0
- package/dist/dgram/mb_mdns.d.ts.map +1 -0
- package/dist/dgram/mb_mdns.js +80 -15
- package/dist/dgram/mb_mdns.js.map +1 -0
- package/dist/dgram/mdns.d.ts +290 -0
- package/dist/dgram/mdns.d.ts.map +1 -0
- package/dist/dgram/mdns.js +299 -137
- package/dist/dgram/mdns.js.map +1 -0
- package/dist/dgram/multicast.d.ts +67 -0
- package/dist/dgram/multicast.d.ts.map +1 -0
- package/dist/dgram/multicast.js +62 -1
- package/dist/dgram/multicast.js.map +1 -0
- package/dist/dgram/unicast.d.ts +56 -0
- package/dist/dgram/unicast.d.ts.map +1 -0
- package/dist/dgram/unicast.js +54 -0
- package/dist/dgram/unicast.js.map +1 -0
- package/dist/frontend.d.ts +238 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +455 -35
- package/dist/frontend.js.map +1 -0
- package/dist/frontendTypes.d.ts +529 -0
- package/dist/frontendTypes.d.ts.map +1 -0
- package/dist/frontendTypes.js +45 -0
- package/dist/frontendTypes.js.map +1 -0
- package/dist/helpers.d.ts +48 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +53 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/jestutils/export.d.ts +2 -0
- package/dist/jestutils/export.d.ts.map +1 -0
- package/dist/jestutils/export.js +1 -0
- package/dist/jestutils/export.js.map +1 -0
- package/dist/jestutils/jestHelpers.d.ts +345 -0
- package/dist/jestutils/jestHelpers.d.ts.map +1 -0
- package/dist/jestutils/jestHelpers.js +371 -14
- package/dist/jestutils/jestHelpers.js.map +1 -0
- package/dist/logger/export.d.ts +2 -0
- package/dist/logger/export.d.ts.map +1 -0
- package/dist/logger/export.js +1 -0
- package/dist/logger/export.js.map +1 -0
- package/dist/matter/behaviors.d.ts +2 -0
- package/dist/matter/behaviors.d.ts.map +1 -0
- package/dist/matter/behaviors.js +2 -0
- package/dist/matter/behaviors.js.map +1 -0
- package/dist/matter/clusters.d.ts +2 -0
- package/dist/matter/clusters.d.ts.map +1 -0
- package/dist/matter/clusters.js +2 -0
- package/dist/matter/clusters.js.map +1 -0
- package/dist/matter/devices.d.ts +2 -0
- package/dist/matter/devices.d.ts.map +1 -0
- package/dist/matter/devices.js +2 -0
- package/dist/matter/devices.js.map +1 -0
- package/dist/matter/endpoints.d.ts +2 -0
- package/dist/matter/endpoints.d.ts.map +1 -0
- package/dist/matter/endpoints.js +2 -0
- package/dist/matter/endpoints.js.map +1 -0
- package/dist/matter/export.d.ts +5 -0
- package/dist/matter/export.d.ts.map +1 -0
- package/dist/matter/export.js +3 -0
- package/dist/matter/export.js.map +1 -0
- package/dist/matter/types.d.ts +3 -0
- package/dist/matter/types.d.ts.map +1 -0
- package/dist/matter/types.js +3 -0
- package/dist/matter/types.js.map +1 -0
- package/dist/matterNode.d.ts +342 -0
- package/dist/matterNode.d.ts.map +1 -0
- package/dist/matterNode.js +369 -8
- package/dist/matterNode.js.map +1 -0
- package/dist/matterbridge.d.ts +492 -0
- package/dist/matterbridge.d.ts.map +1 -0
- package/dist/matterbridge.js +811 -46
- package/dist/matterbridge.js.map +1 -0
- package/dist/matterbridgeAccessoryPlatform.d.ts +41 -0
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
- package/dist/matterbridgeAccessoryPlatform.js +38 -0
- package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
- package/dist/matterbridgeBehaviors.d.ts +2404 -0
- package/dist/matterbridgeBehaviors.d.ts.map +1 -0
- package/dist/matterbridgeBehaviors.js +68 -5
- package/dist/matterbridgeBehaviors.js.map +1 -0
- package/dist/matterbridgeDeviceTypes.d.ts +698 -0
- package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
- package/dist/matterbridgeDeviceTypes.js +635 -14
- package/dist/matterbridgeDeviceTypes.js.map +1 -0
- package/dist/matterbridgeDynamicPlatform.d.ts +41 -0
- package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
- package/dist/matterbridgeDynamicPlatform.js +38 -0
- package/dist/matterbridgeDynamicPlatform.js.map +1 -0
- package/dist/matterbridgeEndpoint.d.ts +1507 -0
- package/dist/matterbridgeEndpoint.d.ts.map +1 -0
- package/dist/matterbridgeEndpoint.js +1444 -53
- package/dist/matterbridgeEndpoint.js.map +1 -0
- package/dist/matterbridgeEndpointHelpers.d.ts +787 -0
- package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
- package/dist/matterbridgeEndpointHelpers.js +483 -20
- package/dist/matterbridgeEndpointHelpers.js.map +1 -0
- package/dist/matterbridgeEndpointTypes.d.ts +166 -0
- package/dist/matterbridgeEndpointTypes.d.ts.map +1 -0
- package/dist/matterbridgeEndpointTypes.js +25 -0
- package/dist/matterbridgeEndpointTypes.js.map +1 -0
- package/dist/matterbridgePlatform.d.ts +539 -0
- package/dist/matterbridgePlatform.d.ts.map +1 -0
- package/dist/matterbridgePlatform.js +451 -1
- package/dist/matterbridgePlatform.js.map +1 -0
- package/dist/matterbridgeTypes.d.ts +251 -0
- package/dist/matterbridgeTypes.d.ts.map +1 -0
- package/dist/matterbridgeTypes.js +26 -0
- package/dist/matterbridgeTypes.js.map +1 -0
- package/dist/pluginManager.d.ts +372 -0
- package/dist/pluginManager.d.ts.map +1 -0
- package/dist/pluginManager.js +341 -5
- package/dist/pluginManager.js.map +1 -0
- package/dist/shelly.d.ts +181 -0
- package/dist/shelly.d.ts.map +1 -0
- package/dist/shelly.js +178 -7
- package/dist/shelly.js.map +1 -0
- package/dist/storage/export.d.ts +2 -0
- package/dist/storage/export.d.ts.map +1 -0
- package/dist/storage/export.js +1 -0
- package/dist/storage/export.js.map +1 -0
- package/dist/update.d.ts +84 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +93 -1
- package/dist/update.js.map +1 -0
- package/dist/utils/colorUtils.d.ts +101 -0
- package/dist/utils/colorUtils.d.ts.map +1 -0
- package/dist/utils/colorUtils.js +97 -2
- package/dist/utils/colorUtils.js.map +1 -0
- package/dist/utils/commandLine.d.ts +66 -0
- package/dist/utils/commandLine.d.ts.map +1 -0
- package/dist/utils/commandLine.js +60 -0
- package/dist/utils/commandLine.js.map +1 -0
- package/dist/utils/copyDirectory.d.ts +35 -0
- package/dist/utils/copyDirectory.d.ts.map +1 -0
- package/dist/utils/copyDirectory.js +37 -0
- package/dist/utils/copyDirectory.js.map +1 -0
- package/dist/utils/createDirectory.d.ts +34 -0
- package/dist/utils/createDirectory.d.ts.map +1 -0
- package/dist/utils/createDirectory.js +33 -0
- package/dist/utils/createDirectory.js.map +1 -0
- package/dist/utils/createZip.d.ts +39 -0
- package/dist/utils/createZip.d.ts.map +1 -0
- package/dist/utils/createZip.js +47 -2
- package/dist/utils/createZip.js.map +1 -0
- package/dist/utils/deepCopy.d.ts +32 -0
- package/dist/utils/deepCopy.d.ts.map +1 -0
- package/dist/utils/deepCopy.js +39 -0
- package/dist/utils/deepCopy.js.map +1 -0
- package/dist/utils/deepEqual.d.ts +54 -0
- package/dist/utils/deepEqual.d.ts.map +1 -0
- package/dist/utils/deepEqual.js +72 -1
- package/dist/utils/deepEqual.js.map +1 -0
- package/dist/utils/error.d.ts +45 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +42 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/export.d.ts +13 -0
- package/dist/utils/export.d.ts.map +1 -0
- package/dist/utils/export.js +1 -0
- package/dist/utils/export.js.map +1 -0
- package/dist/utils/format.d.ts +53 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +49 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/hex.d.ts +89 -0
- package/dist/utils/hex.d.ts.map +1 -0
- package/dist/utils/hex.js +124 -0
- package/dist/utils/hex.js.map +1 -0
- package/dist/utils/inspector.d.ts +87 -0
- package/dist/utils/inspector.d.ts.map +1 -0
- package/dist/utils/inspector.js +69 -1
- package/dist/utils/inspector.js.map +1 -0
- package/dist/utils/isvalid.d.ts +103 -0
- package/dist/utils/isvalid.d.ts.map +1 -0
- package/dist/utils/isvalid.js +101 -0
- package/dist/utils/isvalid.js.map +1 -0
- package/dist/utils/network.d.ts +111 -0
- package/dist/utils/network.d.ts.map +1 -0
- package/dist/utils/network.js +96 -5
- package/dist/utils/network.js.map +1 -0
- package/dist/utils/spawn.d.ts +33 -0
- package/dist/utils/spawn.d.ts.map +1 -0
- package/dist/utils/spawn.js +71 -1
- package/dist/utils/spawn.js.map +1 -0
- package/dist/utils/tracker.d.ts +108 -0
- package/dist/utils/tracker.d.ts.map +1 -0
- package/dist/utils/tracker.js +64 -1
- package/dist/utils/tracker.js.map +1 -0
- package/dist/utils/wait.d.ts +54 -0
- package/dist/utils/wait.d.ts.map +1 -0
- package/dist/utils/wait.js +60 -8
- package/dist/utils/wait.js.map +1 -0
- package/dist/workerGlobalPrefix.d.ts +25 -0
- package/dist/workerGlobalPrefix.d.ts.map +1 -0
- package/dist/workerGlobalPrefix.js +37 -5
- package/dist/workerGlobalPrefix.js.map +1 -0
- package/dist/workerTypes.d.ts +52 -0
- package/dist/workerTypes.d.ts.map +1 -0
- package/dist/workerTypes.js +24 -0
- package/dist/workerTypes.js.map +1 -0
- package/dist/workers.d.ts +69 -0
- package/dist/workers.d.ts.map +1 -0
- package/dist/workers.js +68 -4
- package/dist/workers.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
- package/scripts/data_model.mjs +2058 -0
|
@@ -0,0 +1,1507 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the class MatterbridgeEndpoint that extends the Endpoint class from the Matter.js library.
|
|
3
|
+
*
|
|
4
|
+
* @file matterbridgeEndpoint.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2024-10-01
|
|
7
|
+
* @version 2.1.1
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
import { AnsiLogger, LogLevel } from 'node-ansi-logger';
|
|
25
|
+
import { NamedHandler, AtLeastOne } from '@matter/general';
|
|
26
|
+
import { ActionContext, Behavior, Endpoint, ServerNode } from '@matter/node';
|
|
27
|
+
import { ClusterType } from '@matter/types/cluster';
|
|
28
|
+
import { EndpointNumber, ClusterId } from '@matter/types/datatype';
|
|
29
|
+
import { Semtag } from '@matter/types/globals';
|
|
30
|
+
import { PowerSource } from '@matter/types/clusters/power-source';
|
|
31
|
+
import { Identify } from '@matter/types/clusters/identify';
|
|
32
|
+
import { OnOff } from '@matter/types/clusters/on-off';
|
|
33
|
+
import { ColorControl } from '@matter/types/clusters/color-control';
|
|
34
|
+
import { WindowCovering } from '@matter/types/clusters/window-covering';
|
|
35
|
+
import { FanControl } from '@matter/types/clusters/fan-control';
|
|
36
|
+
import { DoorLock } from '@matter/types/clusters/door-lock';
|
|
37
|
+
import { ModeSelect } from '@matter/types/clusters/mode-select';
|
|
38
|
+
import { ValveConfigurationAndControl } from '@matter/types/clusters/valve-configuration-and-control';
|
|
39
|
+
import { PumpConfigurationAndControl } from '@matter/types/clusters/pump-configuration-and-control';
|
|
40
|
+
import { SmokeCoAlarm } from '@matter/types/clusters/smoke-co-alarm';
|
|
41
|
+
import { AirQuality } from '@matter/types/clusters/air-quality';
|
|
42
|
+
import { ConcentrationMeasurement } from '@matter/types/clusters/concentration-measurement';
|
|
43
|
+
import { ThermostatUserInterfaceConfiguration } from '@matter/types/clusters/thermostat-user-interface-configuration';
|
|
44
|
+
import { OperationalState } from '@matter/types/clusters/operational-state';
|
|
45
|
+
import { DeviceEnergyManagement } from '@matter/types/clusters/device-energy-management';
|
|
46
|
+
import { DeviceEnergyManagementMode } from '@matter/types/clusters/device-energy-management-mode';
|
|
47
|
+
import { ResourceMonitoring } from '@matter/types/clusters/resource-monitoring';
|
|
48
|
+
import { DeviceTypeDefinition } from './matterbridgeDeviceTypes.js';
|
|
49
|
+
import { CommandHandlerFunction, MatterbridgeEndpointCommands, MatterbridgeEndpointOptions, SerializedMatterbridgeEndpoint } from './matterbridgeEndpointTypes.js';
|
|
50
|
+
export declare class MatterbridgeEndpoint extends Endpoint {
|
|
51
|
+
/** The default log level of the new MatterbridgeEndpoints */
|
|
52
|
+
static logLevel: LogLevel;
|
|
53
|
+
/**
|
|
54
|
+
* Activates a special mode for this endpoint.
|
|
55
|
+
* - 'server': it creates the device server node and add the device as Matter device that needs to be paired individually.
|
|
56
|
+
* In this case the bridge mode is not relevant. The device is autonomous. The main use case is a workaround for the Apple Home rvc issue.
|
|
57
|
+
*
|
|
58
|
+
* - 'matter': it adds the device directly to the bridge server node as Matter device. In this case the implementation must respect
|
|
59
|
+
* the 9.2.3. Disambiguation rule (i.e. use taglist if needed cause the device doesn't have nodeLabel).
|
|
60
|
+
* Furthermore the device will be a part of the bridge (i.e. will have the same name and will be in the same room).
|
|
61
|
+
* See 9.12.2.2. Native Matter functionality in Bridge.
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* Always use createDefaultBasicInformationClusterServer() to create the BasicInformation cluster server.
|
|
65
|
+
*/
|
|
66
|
+
mode: 'server' | 'matter' | undefined;
|
|
67
|
+
/** The server node of the endpoint, if it is a single not bridged endpoint */
|
|
68
|
+
serverNode: ServerNode<ServerNode.RootEndpoint> | undefined;
|
|
69
|
+
/** The logger instance for the MatterbridgeEndpoint */
|
|
70
|
+
log: AnsiLogger;
|
|
71
|
+
/** The plugin name this MatterbridgeEndpoint belongs to */
|
|
72
|
+
plugin: string | undefined;
|
|
73
|
+
/** The configuration URL of the device, if available */
|
|
74
|
+
configUrl: string | undefined;
|
|
75
|
+
deviceName: string | undefined;
|
|
76
|
+
serialNumber: string | undefined;
|
|
77
|
+
uniqueId: string | undefined;
|
|
78
|
+
vendorId: number | undefined;
|
|
79
|
+
vendorName: string | undefined;
|
|
80
|
+
productId: number | undefined;
|
|
81
|
+
productName: string | undefined;
|
|
82
|
+
softwareVersion: number | undefined;
|
|
83
|
+
softwareVersionString: string | undefined;
|
|
84
|
+
hardwareVersion: number | undefined;
|
|
85
|
+
hardwareVersionString: string | undefined;
|
|
86
|
+
productUrl: string;
|
|
87
|
+
/** The tagList of the descriptor cluster of the MatterbridgeEndpoint */
|
|
88
|
+
tagList?: Semtag[];
|
|
89
|
+
/** The original id (with spaces and .) of the MatterbridgeEndpoint constructor options */
|
|
90
|
+
originalId: string | undefined;
|
|
91
|
+
/** The name of the first device type of the MatterbridgeEndpoint */
|
|
92
|
+
name: string | undefined;
|
|
93
|
+
/** The code of the first device type of the MatterbridgeEndpoint */
|
|
94
|
+
deviceType: number | undefined;
|
|
95
|
+
/** Maps the DeviceTypeDefinitions of the MatterbridgeEndpoint keyed by their code */
|
|
96
|
+
readonly deviceTypes: Map<number, DeviceTypeDefinition>;
|
|
97
|
+
/** Command handler for the MatterbridgeEndpoint commands */
|
|
98
|
+
readonly commandHandler: NamedHandler<MatterbridgeEndpointCommands>;
|
|
99
|
+
/**
|
|
100
|
+
* Represents a MatterbridgeEndpoint.
|
|
101
|
+
*
|
|
102
|
+
* @class MatterbridgeEndpoint
|
|
103
|
+
* @param {DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>} definition - The DeviceTypeDefinition(s) of the endpoint.
|
|
104
|
+
* @param {MatterbridgeEndpointOptions} [options] - The options for the device.
|
|
105
|
+
* @param {boolean} [debug] - Debug flag.
|
|
106
|
+
*/
|
|
107
|
+
constructor(definition: DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>, options?: MatterbridgeEndpointOptions, debug?: boolean);
|
|
108
|
+
/**
|
|
109
|
+
* Loads an instance of the MatterbridgeEndpoint class.
|
|
110
|
+
*
|
|
111
|
+
* @param {DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>} definition - The DeviceTypeDefinition(s) of the device.
|
|
112
|
+
* @param {MatterbridgeEndpointOptions} [options] - The options for the device.
|
|
113
|
+
* @param {boolean} [debug] - Debug flag.
|
|
114
|
+
* @returns {Promise<MatterbridgeEndpoint>} MatterbridgeEndpoint instance.
|
|
115
|
+
*/
|
|
116
|
+
static loadInstance(definition: DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>, options?: MatterbridgeEndpointOptions, debug?: boolean): Promise<MatterbridgeEndpoint>;
|
|
117
|
+
/**
|
|
118
|
+
* Get all the device types of this endpoint.
|
|
119
|
+
*
|
|
120
|
+
* @returns {DeviceTypeDefinition[]} The device types of this endpoint.
|
|
121
|
+
*/
|
|
122
|
+
getDeviceTypes(): DeviceTypeDefinition[];
|
|
123
|
+
/**
|
|
124
|
+
* Checks if the provided cluster server is supported by this endpoint.
|
|
125
|
+
*
|
|
126
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to check.
|
|
127
|
+
* @returns {boolean} True if the cluster server is supported, false otherwise.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
*
|
|
131
|
+
* The following examples are all valid ways to check if the 'OnOff' cluster server is supported by the endpoint:
|
|
132
|
+
* ```typescript
|
|
133
|
+
* if(device.hasClusterServer(OnOffBehavior)) ...
|
|
134
|
+
* if(device.hasClusterServer(OnOffServer)) ...
|
|
135
|
+
* if(device.hasClusterServer(OnOffCluster)) ...
|
|
136
|
+
* if(device.hasClusterServer(OnOff.Cluster)) ...
|
|
137
|
+
* if(device.hasClusterServer(OnOff.Cluster.id)) ...
|
|
138
|
+
* if(device.hasClusterServer('OnOff')) ...
|
|
139
|
+
* ```
|
|
140
|
+
* The last has the advantage of being able to check for clusters without imports. Just use the name found in the Matter specs.
|
|
141
|
+
*/
|
|
142
|
+
hasClusterServer(cluster: Behavior.Type | ClusterType | ClusterId | string): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Checks if the provided attribute server is supported for a given cluster of this endpoint.
|
|
145
|
+
*
|
|
146
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to check.
|
|
147
|
+
* @param {string} attribute - The attribute name to check.
|
|
148
|
+
* @returns {boolean} True if the attribute server is supported, false otherwise.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
*
|
|
152
|
+
* The following examples are all valid ways to check if the 'onOff' attribute of the 'OnOff' cluster server is supported by the endpoint:
|
|
153
|
+
* ```typescript
|
|
154
|
+
* if(device.hasAttributeServer(OnOffBehavior, 'onOff')) ...
|
|
155
|
+
* if(device.hasAttributeServer(OnOffServer, 'onOff')) ...
|
|
156
|
+
* if(device.hasAttributeServer(OnOffCluster, 'onOff')) ...
|
|
157
|
+
* if(device.hasAttributeServer(OnOff.Cluster, 'onOff')) ...
|
|
158
|
+
* if(device.hasAttributeServer(OnOff.Cluster.id, 'onOff')) ...
|
|
159
|
+
* if(device.hasAttributeServer('OnOff', 'onOff')) ...
|
|
160
|
+
* ```
|
|
161
|
+
* The last has the advantage of being able to check for clusters attributes without imports. Just use the names found in the Matter specs.
|
|
162
|
+
*/
|
|
163
|
+
hasAttributeServer(cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Retrieves the initial options for the provided cluster server.
|
|
166
|
+
*
|
|
167
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to get options for.
|
|
168
|
+
* @returns {Record<string, boolean | number | bigint | string | object | null> | undefined} The options for the provided cluster server, or undefined if the cluster is not supported.
|
|
169
|
+
*/
|
|
170
|
+
getClusterServerOptions(cluster: Behavior.Type | ClusterType | ClusterId | string): Record<string, boolean | number | bigint | string | object | null> | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Retrieves the value of the provided attribute from the given cluster.
|
|
173
|
+
*
|
|
174
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to retrieve the attribute from.
|
|
175
|
+
* @param {string} attribute - The name of the attribute to retrieve.
|
|
176
|
+
* @param {AnsiLogger} [log] - Optional logger for error and info messages.
|
|
177
|
+
* @returns {any} The value of the attribute, or undefined if the attribute is not found.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
*
|
|
181
|
+
* The following examples are all valid ways to retrieve the 'onOff' attribute of the 'OnOff' cluster server:
|
|
182
|
+
* ```typescript
|
|
183
|
+
* device.getAttribute(OnOffBehavior, 'onOff')
|
|
184
|
+
* device.getAttribute(OnOffServer, 'onOff')
|
|
185
|
+
* device.getAttribute(OnOffCluster, 'onOff')
|
|
186
|
+
* device.getAttribute(OnOff.Cluster, 'onOff')
|
|
187
|
+
* device.getAttribute(OnOff.Cluster.id, 'onOff')
|
|
188
|
+
* device.getAttribute('OnOff', 'onOff')
|
|
189
|
+
* ```
|
|
190
|
+
* The last has the advantage of being able to retrieve cluster attributes without imports. Just use the names found in the Matter specs.
|
|
191
|
+
*/
|
|
192
|
+
getAttribute(cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, log?: AnsiLogger): any;
|
|
193
|
+
/**
|
|
194
|
+
* Sets the value of an attribute on a cluster server.
|
|
195
|
+
*
|
|
196
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} clusterId - The ID of the cluster.
|
|
197
|
+
* @param {string} attribute - The name of the attribute.
|
|
198
|
+
* @param {boolean | number | bigint | string | object | null} value - The value to set for the attribute.
|
|
199
|
+
* @param {AnsiLogger} [log] - (Optional) The logger to use for logging errors and information.
|
|
200
|
+
* @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the attribute was successfully set.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
*
|
|
204
|
+
* The following examples are all valid ways to set the 'onOff' attribute of the 'OnOff' cluster server:
|
|
205
|
+
* ```typescript
|
|
206
|
+
* await device.setAttribute(OnOffBehavior, 'onOff', true)
|
|
207
|
+
* await device.setAttribute(OnOffServer, 'onOff', true)
|
|
208
|
+
* await device.setAttribute(OnOffCluster, 'onOff', true)
|
|
209
|
+
* await device.setAttribute(OnOff.Cluster, 'onOff', true)
|
|
210
|
+
* await device.setAttribute(OnOff.Cluster.id, 'onOff', true)
|
|
211
|
+
* await device.setAttribute('OnOff', 'onOff', true)
|
|
212
|
+
* ```
|
|
213
|
+
* The last has the advantage of being able to set cluster attributes without imports. Just use the names found in the Matter specs.
|
|
214
|
+
*/
|
|
215
|
+
setAttribute(clusterId: Behavior.Type | ClusterType | ClusterId | string, attribute: string, value: boolean | number | bigint | string | object | null, log?: AnsiLogger): Promise<boolean>;
|
|
216
|
+
/**
|
|
217
|
+
* Update the value of an attribute on a cluster server only if the value is different.
|
|
218
|
+
*
|
|
219
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to set the attribute on.
|
|
220
|
+
* @param {string} attribute - The name of the attribute.
|
|
221
|
+
* @param {boolean | number | bigint | string | object | null} value - The value to set for the attribute.
|
|
222
|
+
* @param {AnsiLogger} [log] - (Optional) The logger to use for logging the update. Errors are logged to the endpoint logger.
|
|
223
|
+
* @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the attribute was successfully set.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
*
|
|
227
|
+
* The following examples are all valid ways to update the 'onOff' attribute of the 'OnOff' cluster server:
|
|
228
|
+
* ```typescript
|
|
229
|
+
* await device.updateAttribute(OnOffBehavior, 'onOff', true)
|
|
230
|
+
* await device.updateAttribute(OnOffServer, 'onOff', true)
|
|
231
|
+
* await device.updateAttribute(OnOffCluster, 'onOff', true)
|
|
232
|
+
* await device.updateAttribute(OnOff.Cluster, 'onOff', true)
|
|
233
|
+
* await device.updateAttribute(OnOff.Cluster.id, 'onOff', true)
|
|
234
|
+
* await device.updateAttribute('OnOff', 'onOff', true)
|
|
235
|
+
* ```
|
|
236
|
+
* The last has the advantage of being able to update cluster attributes without imports. Just use the names found in the Matter specs.
|
|
237
|
+
*/
|
|
238
|
+
updateAttribute(cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, value: boolean | number | bigint | string | object | null, log?: AnsiLogger): Promise<boolean>;
|
|
239
|
+
/**
|
|
240
|
+
* Subscribes to the provided attribute on a cluster.
|
|
241
|
+
*
|
|
242
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to subscribe the attribute to.
|
|
243
|
+
* @param {string} attribute - The name of the attribute to subscribe to.
|
|
244
|
+
* @param {(newValue: any, oldValue: any, context: ActionContext) => void} listener - A callback function that will be called when the attribute value changes. When context.offline === true then the change is locally generated and not from the controller.
|
|
245
|
+
* @param {AnsiLogger} [log] - Optional logger for logging errors and information.
|
|
246
|
+
* @returns {Promise<boolean>} - A boolean indicating whether the subscription was successful.
|
|
247
|
+
*
|
|
248
|
+
* @remarks
|
|
249
|
+
* The listener function (cannot be async!) will receive three parameters:
|
|
250
|
+
* - `newValue`: The new value of the attribute.
|
|
251
|
+
* - `oldValue`: The old value of the attribute.
|
|
252
|
+
* - `context`: The action context, which includes information about the action that triggered the change. When context.offline === true then the change is locally generated and not from the controller.
|
|
253
|
+
*/
|
|
254
|
+
subscribeAttribute(cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, listener: (newValue: any, oldValue: any, context: ActionContext) => void, log?: AnsiLogger): Promise<boolean>;
|
|
255
|
+
/**
|
|
256
|
+
* Triggers an event on the specified cluster.
|
|
257
|
+
*
|
|
258
|
+
* @param {ClusterId} cluster - The ID of the cluster.
|
|
259
|
+
* @param {string} event - The name of the event to trigger.
|
|
260
|
+
* @param {Record<string, boolean | number | bigint | string | object | undefined | null>} payload - The payload to pass to the event.
|
|
261
|
+
* @param {AnsiLogger} [log] - Optional logger for logging information.
|
|
262
|
+
* @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the event was successfully triggered.
|
|
263
|
+
*/
|
|
264
|
+
triggerEvent(cluster: Behavior.Type | ClusterType | ClusterId | string, event: string, payload: Record<string, boolean | number | bigint | string | object | undefined | null>, log?: AnsiLogger): Promise<boolean>;
|
|
265
|
+
/**
|
|
266
|
+
* Adds cluster servers from the provided server list.
|
|
267
|
+
*
|
|
268
|
+
* @param {ClusterId[]} serverList - The list of cluster IDs to add.
|
|
269
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
270
|
+
*/
|
|
271
|
+
addClusterServers(serverList: ClusterId[]): this;
|
|
272
|
+
/**
|
|
273
|
+
* Adds a fixed label to the FixedLabel cluster. If the cluster server is not present, it will be added.
|
|
274
|
+
*
|
|
275
|
+
* @param {string} label - The label to add.
|
|
276
|
+
* @param {string} value - The value of the label.
|
|
277
|
+
* @returns {Promise<this>} The current MatterbridgeEndpoint instance for chaining.
|
|
278
|
+
*/
|
|
279
|
+
addFixedLabel(label: string, value: string): Promise<this>;
|
|
280
|
+
/**
|
|
281
|
+
* Adds a user label to the UserLabel cluster. If the cluster server is not present, it will be added.
|
|
282
|
+
*
|
|
283
|
+
* @param {string} label - The label to add.
|
|
284
|
+
* @param {string} value - The value of the label.
|
|
285
|
+
* @returns {Promise<this>} The current MatterbridgeEndpoint instance for chaining.
|
|
286
|
+
*/
|
|
287
|
+
addUserLabel(label: string, value: string): Promise<this>;
|
|
288
|
+
/**
|
|
289
|
+
* Adds a command handler for the specified command.
|
|
290
|
+
*
|
|
291
|
+
* @param {keyof MatterbridgeEndpointCommands} command - The command to add the handler for.
|
|
292
|
+
* @param {CommandHandlerFunction} handler - The handler function to execute when the command is received.
|
|
293
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
294
|
+
*
|
|
295
|
+
* @remarks
|
|
296
|
+
* The handler function will receive an object with the following properties:
|
|
297
|
+
* - `request`: The request object sent with the command.
|
|
298
|
+
* - `cluster`: The id of the cluster that received the command (i.e. "onOff").
|
|
299
|
+
* - `attributes`: The current attributes of the cluster that received the command (i.e. { onOff: true}).
|
|
300
|
+
* - `endpoint`: The MatterbridgeEndpoint instance that received the command.
|
|
301
|
+
*/
|
|
302
|
+
addCommandHandler(command: keyof MatterbridgeEndpointCommands, handler: CommandHandlerFunction): this;
|
|
303
|
+
/**
|
|
304
|
+
* Execute the command handler for the specified command. Used ONLY in Jest tests.
|
|
305
|
+
*
|
|
306
|
+
* @param {keyof MatterbridgeEndpointCommands} command - The command to execute.
|
|
307
|
+
* @param {Record<string, boolean | number | bigint | string | object | null>} [request] - The optional request to pass to the handler function.
|
|
308
|
+
* @param {string} [cluster] - The optional cluster to pass to the handler function.
|
|
309
|
+
* @param {Record<string, boolean | number | bigint | string | object | null>} [attributes] - The optional attributes to pass to the handler function.
|
|
310
|
+
* @param {MatterbridgeEndpoint} [endpoint] - The optional MatterbridgeEndpoint instance to pass to the handler function
|
|
311
|
+
*
|
|
312
|
+
* @deprecated Used ONLY in Jest tests.
|
|
313
|
+
*/
|
|
314
|
+
executeCommandHandler(command: keyof MatterbridgeEndpointCommands, request?: Record<string, boolean | number | bigint | string | object | null>, cluster?: string, attributes?: Record<string, boolean | number | bigint | string | object | null>, endpoint?: MatterbridgeEndpoint): Promise<void>;
|
|
315
|
+
/**
|
|
316
|
+
* Invokes a behavior command on the specified cluster. Used ONLY in Jest tests.
|
|
317
|
+
*
|
|
318
|
+
* @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to invoke the command on.
|
|
319
|
+
* @param {string} command - The command to invoke.
|
|
320
|
+
* @param {Record<string, boolean | number | bigint | string | object | null>} [params] - The optional parameters to pass to the command.
|
|
321
|
+
*
|
|
322
|
+
* @deprecated Used ONLY in Jest tests.
|
|
323
|
+
*/
|
|
324
|
+
invokeBehaviorCommand(cluster: Behavior.Type | ClusterType | ClusterId | string, command: keyof MatterbridgeEndpointCommands, params?: Record<string, boolean | number | bigint | string | object | null>): Promise<void>;
|
|
325
|
+
/**
|
|
326
|
+
* Adds the required cluster servers (only if they are not present) for the device types of the specified endpoint.
|
|
327
|
+
*
|
|
328
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
329
|
+
*/
|
|
330
|
+
addRequiredClusterServers(): MatterbridgeEndpoint;
|
|
331
|
+
/**
|
|
332
|
+
* Adds the optional cluster servers (only if they are not present) for the device types of the specified endpoint.
|
|
333
|
+
*
|
|
334
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
335
|
+
*/
|
|
336
|
+
addOptionalClusterServers(): MatterbridgeEndpoint;
|
|
337
|
+
/**
|
|
338
|
+
* Retrieves all cluster servers.
|
|
339
|
+
*
|
|
340
|
+
* @returns {Behavior.Type[]} An array of all cluster servers.
|
|
341
|
+
*/
|
|
342
|
+
getAllClusterServers(): Behavior.Type[];
|
|
343
|
+
/**
|
|
344
|
+
* Retrieves the names of all cluster servers.
|
|
345
|
+
*
|
|
346
|
+
* @returns {string[]} An array of all cluster server names.
|
|
347
|
+
*/
|
|
348
|
+
getAllClusterServerNames(): string[];
|
|
349
|
+
/**
|
|
350
|
+
* Iterates over each attribute of each cluster server of the device state and calls the provided callback function.
|
|
351
|
+
*
|
|
352
|
+
* @param {Function} callback - The callback function to call with the cluster name, cluster id, attribute name, attribute id and attribute value.
|
|
353
|
+
*/
|
|
354
|
+
forEachAttribute(callback: (clusterName: string, clusterId: number, attributeName: string, attributeId: number, attributeValue: boolean | number | bigint | string | object | null | undefined) => void): void;
|
|
355
|
+
/**
|
|
356
|
+
* Adds a child endpoint with the specified device types and options.
|
|
357
|
+
* If the child endpoint is not already present, it will be created and added.
|
|
358
|
+
* If the child endpoint is already present, the existing child endpoint will be returned.
|
|
359
|
+
*
|
|
360
|
+
* @param {string} endpointName - The name of the new endpoint to add.
|
|
361
|
+
* @param {DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>} definition - The device types to add.
|
|
362
|
+
* @param {MatterbridgeEndpointOptions} [options] - The options for the endpoint.
|
|
363
|
+
* @param {boolean} [debug] - Whether to enable debug logging.
|
|
364
|
+
* @returns {MatterbridgeEndpoint} - The child endpoint that was found or added.
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```typescript
|
|
368
|
+
* const endpoint = device.addChildDeviceType('Temperature', [temperatureSensor], { tagList: [{ mfgCode: null, namespaceId: LocationTag.Indoor.namespaceId, tag: LocationTag.Indoor.tag, label: null }] }, true);
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
addChildDeviceType(endpointName: string, definition: DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>, options?: MatterbridgeEndpointOptions, debug?: boolean): MatterbridgeEndpoint;
|
|
372
|
+
/**
|
|
373
|
+
* Adds a child endpoint with one or more device types with the required cluster servers and the specified cluster servers.
|
|
374
|
+
* If the child endpoint is not already present in the childEndpoints, it will be added.
|
|
375
|
+
* If the child endpoint is already present in the childEndpoints, the device types and cluster servers will be added to the existing child endpoint.
|
|
376
|
+
*
|
|
377
|
+
* @param {string} endpointName - The name of the new enpoint to add.
|
|
378
|
+
* @param {DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>} definition - The device types to add.
|
|
379
|
+
* @param {ClusterId[]} [serverList] - The list of cluster IDs to include.
|
|
380
|
+
* @param {MatterbridgeEndpointOptions} [options] - The options for the device.
|
|
381
|
+
* @param {boolean} [debug] - Whether to enable debug logging.
|
|
382
|
+
* @returns {MatterbridgeEndpoint} - The child endpoint that was found or added.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```typescript
|
|
386
|
+
* const endpoint = device.addChildDeviceTypeWithClusterServer('Temperature', [temperatureSensor], [], { tagList: [{ mfgCode: null, namespaceId: LocationTag.Indoor.namespaceId, tag: LocationTag.Indoor.tag, label: null }] }, true);
|
|
387
|
+
* ```
|
|
388
|
+
*/
|
|
389
|
+
addChildDeviceTypeWithClusterServer(endpointName: string, definition: DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>, serverList?: ClusterId[], options?: MatterbridgeEndpointOptions, debug?: boolean): MatterbridgeEndpoint;
|
|
390
|
+
/**
|
|
391
|
+
* Retrieves a child endpoint by its name (id).
|
|
392
|
+
* Since the name is stored like id, the endpointName should be without spaces and dots.
|
|
393
|
+
* If case of not latin characters, the endpointName should be the generated unique id.
|
|
394
|
+
*
|
|
395
|
+
* @param {string} endpointName - The name of the endpoint to retrieve.
|
|
396
|
+
* @returns {Endpoint | undefined} The child endpoint with the specified name, or undefined if not found.
|
|
397
|
+
* @deprecated Use getChildEndpointById() or getChildEndpointByOriginalId() instead.
|
|
398
|
+
*/
|
|
399
|
+
getChildEndpointByName(endpointName: string): MatterbridgeEndpoint | undefined;
|
|
400
|
+
/**
|
|
401
|
+
* Retrieves a child endpoint by its id.
|
|
402
|
+
* Since the id of a child endpoint is the endpointName passed in the constructor, the id to retrieve it should be without spaces and dots.
|
|
403
|
+
* If case of not latin characters, the id is a generated unique id.
|
|
404
|
+
*
|
|
405
|
+
* @param {string} id - The id of the endpoint to retrieve.
|
|
406
|
+
* @returns {Endpoint | undefined} The child endpoint with the specified id, or undefined if not found.
|
|
407
|
+
*/
|
|
408
|
+
getChildEndpointById(id: string): MatterbridgeEndpoint | undefined;
|
|
409
|
+
/**
|
|
410
|
+
* Retrieves a child endpoint by its original id (the id of MatterbridgeEndpointOptions).
|
|
411
|
+
*
|
|
412
|
+
* @param {string} originalId - The original id of the endpoint to retrieve.
|
|
413
|
+
* @returns {Endpoint | undefined} The child endpoint with the specified originalId, or undefined if not found.
|
|
414
|
+
*/
|
|
415
|
+
getChildEndpointByOriginalId(originalId: string): MatterbridgeEndpoint | undefined;
|
|
416
|
+
/**
|
|
417
|
+
* Retrieves a child endpoint by its EndpointNumber.
|
|
418
|
+
*
|
|
419
|
+
* @param {EndpointNumber} endpointNumber - The EndpointNumber of the endpoint to retrieve.
|
|
420
|
+
* @returns {MatterbridgeEndpoint | undefined} The child endpoint with the specified EndpointNumber, or undefined if not found.
|
|
421
|
+
*/
|
|
422
|
+
getChildEndpoint(endpointNumber: EndpointNumber): MatterbridgeEndpoint | undefined;
|
|
423
|
+
/**
|
|
424
|
+
* Get all the child endpoints of this endpoint.
|
|
425
|
+
*
|
|
426
|
+
* @returns {MatterbridgeEndpoint[]} The child endpoints.
|
|
427
|
+
*/
|
|
428
|
+
getChildEndpoints(): MatterbridgeEndpoint[];
|
|
429
|
+
/**
|
|
430
|
+
* Serializes the Matterbridge device into a serialized object.
|
|
431
|
+
*
|
|
432
|
+
* @param {MatterbridgeEndpoint} device - The Matterbridge device to serialize.
|
|
433
|
+
*
|
|
434
|
+
* @returns {SerializedMatterbridgeEndpoint | undefined} The serialized Matterbridge device object.
|
|
435
|
+
*/
|
|
436
|
+
static serialize(device: MatterbridgeEndpoint): SerializedMatterbridgeEndpoint | undefined;
|
|
437
|
+
/**
|
|
438
|
+
* Deserializes the device into a serialized object.
|
|
439
|
+
*
|
|
440
|
+
* @param {SerializedMatterbridgeEndpoint} serializedDevice - The serialized Matterbridge device object.
|
|
441
|
+
* @returns {MatterbridgeEndpoint | undefined} The deserialized Matterbridge device.
|
|
442
|
+
*/
|
|
443
|
+
static deserialize(serializedDevice: SerializedMatterbridgeEndpoint): MatterbridgeEndpoint | undefined;
|
|
444
|
+
/** Utility Cluster Helpers */
|
|
445
|
+
/**
|
|
446
|
+
* Creates a default power source wired cluster server.
|
|
447
|
+
*
|
|
448
|
+
* @param {PowerSource.WiredCurrentType} wiredCurrentType - The type of wired current (default: PowerSource.WiredCurrentType.Ac)
|
|
449
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
450
|
+
*
|
|
451
|
+
* @remarks
|
|
452
|
+
* - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
|
|
453
|
+
* - description: The description of the power source is a fixed attribute that describes the power source type.
|
|
454
|
+
* - wiredCurrentType: The type of wired current is a fixed attribute that indicates the type of wired current used by the power source (AC or DC).
|
|
455
|
+
*/
|
|
456
|
+
createDefaultPowerSourceWiredClusterServer(wiredCurrentType?: PowerSource.WiredCurrentType): this;
|
|
457
|
+
/**
|
|
458
|
+
* Creates a default power source battery cluster server.
|
|
459
|
+
*
|
|
460
|
+
* @param {null | number} batPercentRemaining - The remaining battery percentage (default: null). The attribute is in the range 0-200.
|
|
461
|
+
* @param {PowerSource.BatChargeLevel} batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
462
|
+
* @param {null | number} batVoltage - The battery voltage (default: null).
|
|
463
|
+
* @param {PowerSource.BatReplaceability} batReplaceability - The replaceability of the battery (default: PowerSource.BatReplaceability.Unspecified).
|
|
464
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
465
|
+
*
|
|
466
|
+
* @remarks
|
|
467
|
+
* - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
|
|
468
|
+
* - description: The description of the power source is a fixed attribute that describes the power source type.
|
|
469
|
+
* - batReplaceability: The replaceability of the battery is a fixed attribute that indicates whether the battery is user-replaceable or not.
|
|
470
|
+
*/
|
|
471
|
+
createDefaultPowerSourceBatteryClusterServer(batPercentRemaining?: null | number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: null | number, batReplaceability?: PowerSource.BatReplaceability): this;
|
|
472
|
+
/**
|
|
473
|
+
* Creates a default power source replaceable battery cluster server.
|
|
474
|
+
*
|
|
475
|
+
* @param {number} batPercentRemaining - The remaining battery percentage (default: 100). The attribute is in the range 0-200.
|
|
476
|
+
* @param {PowerSource.BatChargeLevel} batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
477
|
+
* @param {number} batVoltage - The battery voltage (default: 1500).
|
|
478
|
+
* @param {string} batReplacementDescription - The description of the battery replacement (default: 'Battery type').
|
|
479
|
+
* @param {number} batQuantity - The quantity of the battery (default: 1).
|
|
480
|
+
* @param {PowerSource.BatReplaceability} batReplaceability - The replaceability of the battery (default: PowerSource.BatReplaceability.UserReplaceable).
|
|
481
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
482
|
+
*
|
|
483
|
+
* @remarks
|
|
484
|
+
* - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
|
|
485
|
+
* - description: The description of the power source is a fixed attribute that describes the power source type.
|
|
486
|
+
* - batReplaceability: The replaceability of the battery is a fixed attribute that indicates whether the battery is user-replaceable or not.
|
|
487
|
+
* - batReplacementDescription: The description of the battery replacement is a fixed attribute that describes the battery type.
|
|
488
|
+
* - batQuantity: The quantity of the battery is a fixed attribute that indicates how many batteries are present in the device.
|
|
489
|
+
*/
|
|
490
|
+
createDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplacementDescription?: string, batQuantity?: number, batReplaceability?: PowerSource.BatReplaceability): this;
|
|
491
|
+
/**
|
|
492
|
+
* Creates a default power source rechargeable battery cluster server.
|
|
493
|
+
*
|
|
494
|
+
* @param {number} [batPercentRemaining] - The remaining battery percentage (default: 100). The attribute is in the range 0-200.
|
|
495
|
+
* @param {PowerSource.BatChargeLevel} [batChargeLevel] - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
496
|
+
* @param {number} [batVoltage] - The battery voltage in mV (default: 1500).
|
|
497
|
+
* @param {PowerSource.BatReplaceability} [batReplaceability] - The replaceability of the battery (default: PowerSource.BatReplaceability.Unspecified).
|
|
498
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
499
|
+
*
|
|
500
|
+
* @remarks
|
|
501
|
+
* - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
|
|
502
|
+
* - description: The description of the power source is a fixed attribute that describes the power source type.
|
|
503
|
+
* - batReplaceability: The replaceability of the battery is a fixed attribute that indicates whether the battery is user-replaceable or not.
|
|
504
|
+
*/
|
|
505
|
+
createDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplaceability?: PowerSource.BatReplaceability): this;
|
|
506
|
+
/**
|
|
507
|
+
* Setup the default Basic Information Cluster Server attributes for the server node.
|
|
508
|
+
*
|
|
509
|
+
* This method sets the device name, serial number, unique ID, vendor ID, vendor name, product ID, product name, software version, software version string, hardware version and hardware version string.
|
|
510
|
+
*
|
|
511
|
+
* The actual BasicInformationClusterServer is created by the Matterbridge class for device.mode = 'server' and for the device of an AccessoryPlatform.
|
|
512
|
+
*
|
|
513
|
+
* @param {string} deviceName - The name of the device.
|
|
514
|
+
* @param {string} serialNumber - The serial number of the device.
|
|
515
|
+
* @param {number} [vendorId] - The vendor ID of the device. Default is 0xfff1 (Matter Test VendorId).
|
|
516
|
+
* @param {string} [vendorName] - The name of the vendor. Default is 'Matterbridge'.
|
|
517
|
+
* @param {number} [productId] - The product ID of the device. Default is 0x8000 (Matter Test ProductId).
|
|
518
|
+
* @param {string} [productName] - The name of the product. Default is 'Matterbridge device'.
|
|
519
|
+
* @param {number} [softwareVersion] - The software version of the device. Default is 1.
|
|
520
|
+
* @param {string} [softwareVersionString] - The software version string of the device. Default is '1.0.0'.
|
|
521
|
+
* @param {number} [hardwareVersion] - The hardware version of the device. Default is 1.
|
|
522
|
+
* @param {string} [hardwareVersionString] - The hardware version string of the device. Default is '1.0.0'.
|
|
523
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
524
|
+
*/
|
|
525
|
+
createDefaultBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId?: number, vendorName?: string, productId?: number, productName?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string): this;
|
|
526
|
+
/**
|
|
527
|
+
* Creates a default BridgedDeviceBasicInformationClusterServer for the aggregator endpoints.
|
|
528
|
+
*
|
|
529
|
+
* This method sets the device name, serial number, unique ID, vendor ID, vendor name, product name, software version, software version string, hardware version and hardware version string.
|
|
530
|
+
*
|
|
531
|
+
* @param {string} deviceName - The name of the device.
|
|
532
|
+
* @param {string} serialNumber - The serial number of the device.
|
|
533
|
+
* @param {number} [vendorId] - The vendor ID of the device. Default is 0xfff1 (Matter Test VendorId).
|
|
534
|
+
* @param {string} [vendorName] - The name of the vendor. Default is 'Matterbridge'.
|
|
535
|
+
* @param {string} [productName] - The name of the product. Default is 'Matterbridge device'.
|
|
536
|
+
* @param {number} [softwareVersion] - The software version of the device. Default is 1.
|
|
537
|
+
* @param {string} [softwareVersionString] - The software version string of the device. Default is '1.0.0'.
|
|
538
|
+
* @param {number} [hardwareVersion] - The hardware version of the device. Default is 1.
|
|
539
|
+
* @param {string} [hardwareVersionString] - The hardware version string of the device. Default is '1.0.0'.
|
|
540
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
541
|
+
*
|
|
542
|
+
* @remarks
|
|
543
|
+
* - The productId doesn't exist on the BridgedDeviceBasicInformation cluster.
|
|
544
|
+
* - The bridgedNode device type must be added to the deviceTypeList of the Descriptor cluster.
|
|
545
|
+
*/
|
|
546
|
+
createDefaultBridgedDeviceBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId?: number, vendorName?: string, productName?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string): this;
|
|
547
|
+
/**
|
|
548
|
+
* Creates a default Power Topology Cluster Server with feature TreeTopology (the endpoint provides or consumes power to/from itself and its child endpoints). Only needed for an electricalSensor device type.
|
|
549
|
+
*
|
|
550
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
551
|
+
*/
|
|
552
|
+
createDefaultPowerTopologyClusterServer(): this;
|
|
553
|
+
/**
|
|
554
|
+
* Creates a default Electrical Energy Measurement Cluster Server with features ImportedEnergy, ExportedEnergy, and CumulativeEnergy.
|
|
555
|
+
*
|
|
556
|
+
* @param {number} energyImported - The total consumption value in mW/h.
|
|
557
|
+
* @param {number} energyExported - The total production value in mW/h.
|
|
558
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
559
|
+
*/
|
|
560
|
+
createDefaultElectricalEnergyMeasurementClusterServer(energyImported?: number | bigint | null, energyExported?: number | bigint | null): this;
|
|
561
|
+
/**
|
|
562
|
+
* Creates a default Electrical Power Measurement Cluster Server with features AlternatingCurrent.
|
|
563
|
+
*
|
|
564
|
+
* @param {number} voltage - The voltage value in millivolts.
|
|
565
|
+
* @param {number} current - The current value in milliamperes.
|
|
566
|
+
* @param {number} power - The power value in milliwatts.
|
|
567
|
+
* @param {number} frequency - The frequency value in millihertz.
|
|
568
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
569
|
+
*/
|
|
570
|
+
createDefaultElectricalPowerMeasurementClusterServer(voltage?: number | bigint | null, current?: number | bigint | null, power?: number | bigint | null, frequency?: number | bigint | null): this;
|
|
571
|
+
/**
|
|
572
|
+
* Creates a default Electrical Apparent Power Measurement Cluster Server with features AlternatingCurrent.
|
|
573
|
+
*
|
|
574
|
+
* @param {number} voltage - The voltage value in millivolts.
|
|
575
|
+
* @param {number} apparentCurrent - The current value in milliamperes.
|
|
576
|
+
* @param {number} apparentPower - The apparent power value in millivoltamperes.
|
|
577
|
+
* @param {number} frequency - The frequency value in millihertz.
|
|
578
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
579
|
+
*/
|
|
580
|
+
createApparentElectricalPowerMeasurementClusterServer(voltage?: number | bigint | null, apparentCurrent?: number | bigint | null, apparentPower?: number | bigint | null, frequency?: number | bigint | null): this;
|
|
581
|
+
/**
|
|
582
|
+
* Creates a default Device Energy Management Cluster Server with feature PowerForecastReporting and with the specified ESA type, ESA canGenerate, ESA state, and power limits.
|
|
583
|
+
*
|
|
584
|
+
* @param {DeviceEnergyManagement.EsaType} [esaType] - The ESA type. Defaults to `DeviceEnergyManagement.EsaType.Other`.
|
|
585
|
+
* @param {boolean} [esaCanGenerate] - Indicates if the ESA can generate energy. Defaults to `false`.
|
|
586
|
+
* @param {DeviceEnergyManagement.EsaState} [esaState] - The ESA state. Defaults to `DeviceEnergyManagement.EsaState.Online`.
|
|
587
|
+
* @param {number} [absMinPower] - Indicate the minimum electrical power in mw that the ESA can consume when switched on. Defaults to `0` if not provided.
|
|
588
|
+
* @param {number} [absMaxPower] - Indicate the maximum electrical power in mw that the ESA can consume when switched on. Defaults to `0` if not provided.
|
|
589
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
590
|
+
*
|
|
591
|
+
* @remarks
|
|
592
|
+
* - The forecast attribute is set to null, indicating that there is no forecast currently available.
|
|
593
|
+
* - The ESA type and canGenerate attributes are fixed and cannot be changed after creation.
|
|
594
|
+
* - The ESA state is set to Online by default.
|
|
595
|
+
* - The absolute minimum and maximum power attributes are set to 0 by default.
|
|
596
|
+
* - For example, a battery storage inverter that can charge its battery at a maximum power of 2000W and can
|
|
597
|
+
* discharge the battery at a maximum power of 3000W, would have a absMinPower: -3000W, absMaxPower: 2000W.
|
|
598
|
+
*/
|
|
599
|
+
createDefaultDeviceEnergyManagementClusterServer(esaType?: DeviceEnergyManagement.EsaType, esaCanGenerate?: boolean, esaState?: DeviceEnergyManagement.EsaState, absMinPower?: number, absMaxPower?: number): this;
|
|
600
|
+
/**
|
|
601
|
+
* Creates a default EnergyManagementMode Cluster Server.
|
|
602
|
+
*
|
|
603
|
+
* @param {number} [currentMode] - The current mode of the EnergyManagementMode cluster. Defaults to mode 1 (DeviceEnergyManagementMode.ModeTag.NoOptimization).
|
|
604
|
+
* @param {EnergyManagementMode.ModeOption[]} [supportedModes] - The supported modes for the DeviceEnergyManagementMode cluster. The attribute is fixed and defaults to a predefined set of cluster modes.
|
|
605
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
606
|
+
*
|
|
607
|
+
* @remarks
|
|
608
|
+
* A few examples of Device Energy Management modes and their mode tags are provided below.
|
|
609
|
+
* - For the "No Energy Management (Forecast reporting only)" mode, tags: 0x4000 (NoOptimization).
|
|
610
|
+
* - For the "Device Energy Management" mode, tags: 0x4001 (DeviceOptimization).
|
|
611
|
+
* - For the "Home Energy Management" mode, tags: 0x4001 (DeviceOptimization), 0x4002 (LocalOptimization).
|
|
612
|
+
* - For the "Grid Energy Management" mode, tags: 0x4003 (GridOptimization).
|
|
613
|
+
* - For the "Full Energy Management" mode, tags: 0x4001 (DeviceOptimization), 0x4002 (LocalOptimization), 0x4003 (GridOptimization).
|
|
614
|
+
*/
|
|
615
|
+
createDefaultDeviceEnergyManagementModeClusterServer(currentMode?: number, supportedModes?: DeviceEnergyManagementMode.ModeOption[]): this;
|
|
616
|
+
/** Application Cluster Helpers */
|
|
617
|
+
/**
|
|
618
|
+
* Creates a default identify cluster server with the specified identify time and type.
|
|
619
|
+
*
|
|
620
|
+
* @param {number} [identifyTime] - The time to identify the server. Defaults to 0.
|
|
621
|
+
* @param {Identify.IdentifyType} [identifyType] - The type of identification. Defaults to Identify.IdentifyType.None.
|
|
622
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
623
|
+
*/
|
|
624
|
+
createDefaultIdentifyClusterServer(identifyTime?: number, identifyType?: Identify.IdentifyType): this;
|
|
625
|
+
/**
|
|
626
|
+
* Creates a default groups cluster server.
|
|
627
|
+
*
|
|
628
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
629
|
+
*/
|
|
630
|
+
createDefaultGroupsClusterServer(): this;
|
|
631
|
+
/**
|
|
632
|
+
* Creates a default scenes management cluster server.
|
|
633
|
+
*
|
|
634
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
635
|
+
*
|
|
636
|
+
* @remarks The scenes management cluster server is still provisional and so not yet implemented.
|
|
637
|
+
*/
|
|
638
|
+
createDefaultScenesClusterServer(): this;
|
|
639
|
+
/**
|
|
640
|
+
* Creates a default OnOff cluster server for light devices with feature Lighting.
|
|
641
|
+
*
|
|
642
|
+
* @param {boolean} [onOff] - The initial state of the OnOff cluster.
|
|
643
|
+
* @param {boolean} [globalSceneControl] - The global scene control state.
|
|
644
|
+
* @param {number} [onTime] - The on time value.
|
|
645
|
+
* @param {number} [offWaitTime] - The off wait time value.
|
|
646
|
+
* @param {OnOff.StartUpOnOff | null} [startUpOnOff] - The start-up OnOff state. Null means previous state.
|
|
647
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
648
|
+
*/
|
|
649
|
+
createDefaultOnOffClusterServer(onOff?: boolean, globalSceneControl?: boolean, onTime?: number, offWaitTime?: number, startUpOnOff?: OnOff.StartUpOnOff | null): this;
|
|
650
|
+
/**
|
|
651
|
+
* Creates an OnOff cluster server without features.
|
|
652
|
+
*
|
|
653
|
+
* @param {boolean} [onOff] - The initial state of the OnOff cluster.
|
|
654
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
655
|
+
*/
|
|
656
|
+
createOnOffClusterServer(onOff?: boolean): this;
|
|
657
|
+
/**
|
|
658
|
+
* Creates a DeadFront OnOff cluster server with feature DeadFrontBehavior.
|
|
659
|
+
*
|
|
660
|
+
* The "dead front" state is linked to the OnOff attribute
|
|
661
|
+
* in the On/Off cluster having the value False. Thus, the Off command of the On/Off cluster SHALL
|
|
662
|
+
* move the device into the "dead front" state, the On command of the On/Off cluster SHALL bring the
|
|
663
|
+
* device out of the "dead front" state, and the device SHALL adhere with the associated requirements
|
|
664
|
+
* on subscription handling and event reporting.
|
|
665
|
+
*
|
|
666
|
+
* @param {boolean} [onOff] - The initial state of the OnOff cluster.
|
|
667
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
668
|
+
*/
|
|
669
|
+
createDeadFrontOnOffClusterServer(onOff?: boolean): this;
|
|
670
|
+
/**
|
|
671
|
+
* Creates an OffOnly OnOff cluster server with feature OffOnly.
|
|
672
|
+
*
|
|
673
|
+
* @param {boolean} [onOff] - The initial state of the OnOff cluster.
|
|
674
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
675
|
+
*/
|
|
676
|
+
createOffOnlyOnOffClusterServer(onOff?: boolean): this;
|
|
677
|
+
/**
|
|
678
|
+
* Creates a default level control cluster server for light devices with feature OnOff and Lighting.
|
|
679
|
+
*
|
|
680
|
+
* @param {number} [currentLevel] - The current level (default: 254).
|
|
681
|
+
* @param {number} [minLevel] - The minimum level (default: 1).
|
|
682
|
+
* @param {number} [maxLevel] - The maximum level (default: 254).
|
|
683
|
+
* @param {number | null} [onLevel] - The on level (default: null).
|
|
684
|
+
* @param {number | null} [startUpCurrentLevel] - The startUp on level (default: null).
|
|
685
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
686
|
+
*
|
|
687
|
+
* @remarks OptionMasks and OptionOverride fields of moveToLevel and moveToLevelWithOnOff commands requests
|
|
688
|
+
*
|
|
689
|
+
* Each bit in the Options attribute SHALL determine the corresponding bit in the temporary Options
|
|
690
|
+
* bitmap, unless the OptionsMask field is present and has the corresponding bit set to 1, in which
|
|
691
|
+
* case the corresponding bit in the OptionsOverride field SHALL determine the corresponding bit in
|
|
692
|
+
* the temporary Options bitmap.
|
|
693
|
+
*
|
|
694
|
+
* @remarks 'With On/Off' Commands
|
|
695
|
+
*
|
|
696
|
+
* Before commencing any command that has the effect of setting the CurrentLevel attribute above
|
|
697
|
+
* the minimum level allowed by the device, the OnOff attribute of the On/Off cluster on the same endpoint, if implemented, SHALL be set to TRUE (‘On’).
|
|
698
|
+
*
|
|
699
|
+
* If any command that has the effect of setting the CurrentLevel attribute to the minimum level
|
|
700
|
+
* allowed by the device, the OnOff attribute of the On/Off cluster on the same endpoint, if implemented, SHALL be set to FALSE (‘Off’).
|
|
701
|
+
*/
|
|
702
|
+
createDefaultLevelControlClusterServer(currentLevel?: number, minLevel?: number, maxLevel?: number, onLevel?: number | null, startUpCurrentLevel?: number | null): this;
|
|
703
|
+
/**
|
|
704
|
+
* Creates a level control cluster server without features.
|
|
705
|
+
*
|
|
706
|
+
* @param {number} [currentLevel] - The current level (default: 254).
|
|
707
|
+
* @param {number | null} [onLevel] - The on level (default: null).
|
|
708
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
709
|
+
*/
|
|
710
|
+
createLevelControlClusterServer(currentLevel?: number, onLevel?: number | null): this;
|
|
711
|
+
/**
|
|
712
|
+
* Creates a default color control cluster server with features Xy, HueSaturation and ColorTemperature.
|
|
713
|
+
*
|
|
714
|
+
* @param {number} currentX - The current X value (range 0-65279).
|
|
715
|
+
* @param {number} currentY - The current Y value (range 0-65279).
|
|
716
|
+
* @param {number} currentHue - The current hue value (range: 0-254).
|
|
717
|
+
* @param {number} currentSaturation - The current saturation value (range: 0-254).
|
|
718
|
+
* @param {number} colorTemperatureMireds - The color temperature in mireds (range colorTempPhysicalMinMireds-colorTempPhysicalMaxMireds).
|
|
719
|
+
* @param {number} colorTempPhysicalMinMireds - The physical minimum color temperature in mireds (default 147).
|
|
720
|
+
* @param {number} colorTempPhysicalMaxMireds - The physical maximum color temperature in mireds (default 500).
|
|
721
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
722
|
+
*
|
|
723
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
724
|
+
* @remarks currentHue and currentSaturation persist across restarts.
|
|
725
|
+
* @remarks currentX and currentY persist across restarts.
|
|
726
|
+
* @remarks colorTemperatureMireds persists across restarts.
|
|
727
|
+
* @remarks startUpColorTemperatureMireds persists across restarts.
|
|
728
|
+
* @remarks coupleColorTempToLevelMinMireds persists across restarts.
|
|
729
|
+
*
|
|
730
|
+
* @remarks OptionMasks and OptionOverride fields of color control commands requests
|
|
731
|
+
*
|
|
732
|
+
* Each bit in the Options attribute SHALL determine the corresponding bit in the temporary Options
|
|
733
|
+
* bitmap, unless the OptionsMask field is present and has the corresponding bit set to 1, in which
|
|
734
|
+
* case the corresponding bit in the OptionsOverride field SHALL determine the corresponding bit in
|
|
735
|
+
* the temporary Options bitmap.
|
|
736
|
+
*
|
|
737
|
+
* @remarks CoupleColorTempToLevel
|
|
738
|
+
*
|
|
739
|
+
* If the CoupleColorTempToLevel bit of the Options attribute of the Level Control cluster is equal to 1
|
|
740
|
+
* and the ColorMode or EnhancedColorMode attribute is set to 2 (ColorTemperatureMireds) then a
|
|
741
|
+
* change in the CurrentLevel attribute SHALL affect the ColorTemperatureMireds attribute.
|
|
742
|
+
* This relationship is manufacturer specific, with the qualification that the maximum value of the CurrentLevel attribute
|
|
743
|
+
* SHALL correspond to a ColorTemperatureMired attribute value equal to the CoupleColorTempToLevelMinMireds attribute.
|
|
744
|
+
*/
|
|
745
|
+
createDefaultColorControlClusterServer(currentX?: number, currentY?: number, currentHue?: number, currentSaturation?: number, colorTemperatureMireds?: number, colorTempPhysicalMinMireds?: number, colorTempPhysicalMaxMireds?: number): this;
|
|
746
|
+
/**
|
|
747
|
+
* Creates a default color control cluster server with features Xy, HueSaturation, EnhancedHueSaturation and ColorTemperature.
|
|
748
|
+
*
|
|
749
|
+
* @param {number} currentX - The current X value (range 0-65279).
|
|
750
|
+
* @param {number} currentY - The current Y value (range 0-65279).
|
|
751
|
+
* @param {number} enhancedCurrentHue - The enhanced current hue value (range: 0-65535).
|
|
752
|
+
* @param {number} currentSaturation - The current saturation value (range: 0-254).
|
|
753
|
+
* @param {number} colorTemperatureMireds - The color temperature in mireds (range colorTempPhysicalMinMireds-colorTempPhysicalMaxMireds).
|
|
754
|
+
* @param {number} colorTempPhysicalMinMireds - The physical minimum color temperature in mireds (default 147).
|
|
755
|
+
* @param {number} colorTempPhysicalMaxMireds - The physical maximum color temperature in mireds (default 500).
|
|
756
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
757
|
+
*
|
|
758
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
759
|
+
* @remarks currentHue and currentSaturation persist across restarts.
|
|
760
|
+
* @remarks currentX and currentY persist across restarts.
|
|
761
|
+
* @remarks colorTemperatureMireds persists across restarts.
|
|
762
|
+
* @remarks startUpColorTemperatureMireds persists across restarts.
|
|
763
|
+
* @remarks coupleColorTempToLevelMinMireds persists across restarts.
|
|
764
|
+
*
|
|
765
|
+
* @remarks OptionMasks and OptionOverride field
|
|
766
|
+
*
|
|
767
|
+
* Each bit in the Options attribute SHALL determine the corresponding bit in the temporary Options
|
|
768
|
+
* bitmap, unless the OptionsMask field is present and has the corresponding bit set to 1, in which
|
|
769
|
+
* case the corresponding bit in the OptionsOverride field SHALL determine the corresponding bit in
|
|
770
|
+
* the temporary Options bitmap.
|
|
771
|
+
*
|
|
772
|
+
* @remarks CoupleColorTempToLevel
|
|
773
|
+
*
|
|
774
|
+
* If the CoupleColorTempToLevel bit of the Options attribute of the Level Control cluster is equal to 1
|
|
775
|
+
* and the ColorMode or EnhancedColorMode attribute is set to 2 (ColorTemperatureMireds) then a
|
|
776
|
+
* change in the CurrentLevel attribute SHALL affect the ColorTemperatureMireds attribute.
|
|
777
|
+
* This relationship is manufacturer specific, with the qualification that the maximum value of the CurrentLevel attribute
|
|
778
|
+
* SHALL correspond to a ColorTemperatureMired attribute value equal to the CoupleColorTempToLevelMinMireds attribute.
|
|
779
|
+
*/
|
|
780
|
+
createEnhancedColorControlClusterServer(currentX?: number, currentY?: number, enhancedCurrentHue?: number, currentSaturation?: number, colorTemperatureMireds?: number, colorTempPhysicalMinMireds?: number, colorTempPhysicalMaxMireds?: number): this;
|
|
781
|
+
/**
|
|
782
|
+
* Creates a Xy color control cluster server with feature Xy and ColorTemperature.
|
|
783
|
+
*
|
|
784
|
+
* @param {number} currentX - The current X value (range 0-65279).
|
|
785
|
+
* @param {number} currentY - The current Y value (range 0-65279).
|
|
786
|
+
* @param {number} colorTemperatureMireds - The color temperature in mireds (range colorTempPhysicalMinMireds-colorTempPhysicalMaxMireds).
|
|
787
|
+
* @param {number} colorTempPhysicalMinMireds - The physical minimum color temperature in mireds (default 147).
|
|
788
|
+
* @param {number} colorTempPhysicalMaxMireds - The physical maximum color temperature in mireds (default 500).
|
|
789
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
790
|
+
*
|
|
791
|
+
* @remarks
|
|
792
|
+
* From zigbee to matter = Math.max(Math.min(Math.round(x * 65536), 65279), 0)
|
|
793
|
+
*
|
|
794
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
795
|
+
* @remarks currentX and currentY persist across restarts.
|
|
796
|
+
* @remarks colorTemperatureMireds persists across restarts.
|
|
797
|
+
* @remarks startUpColorTemperatureMireds persists across restarts.
|
|
798
|
+
* @remarks coupleColorTempToLevelMinMireds persists across restarts.
|
|
799
|
+
*/
|
|
800
|
+
createXyColorControlClusterServer(currentX?: number, currentY?: number, colorTemperatureMireds?: number, colorTempPhysicalMinMireds?: number, colorTempPhysicalMaxMireds?: number): this;
|
|
801
|
+
/**
|
|
802
|
+
* Creates a default hue and saturation control cluster server with feature HueSaturation and ColorTemperature.
|
|
803
|
+
*
|
|
804
|
+
* @param {number} currentHue - The current hue value (range: 0-254).
|
|
805
|
+
* @param {number} currentSaturation - The current saturation value (range: 0-254).
|
|
806
|
+
* @param {number} colorTemperatureMireds - The color temperature in mireds (range colorTempPhysicalMinMireds-colorTempPhysicalMaxMireds).
|
|
807
|
+
* @param {number} colorTempPhysicalMinMireds - The physical minimum color temperature in mireds (default 147).
|
|
808
|
+
* @param {number} colorTempPhysicalMaxMireds - The physical maximum color temperature in mireds (default 500).
|
|
809
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
810
|
+
*
|
|
811
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
812
|
+
* @remarks currentHue and currentSaturation persist across restarts.
|
|
813
|
+
* @remarks colorTemperatureMireds persists across restarts.
|
|
814
|
+
* @remarks startUpColorTemperatureMireds persists across restarts.
|
|
815
|
+
* @remarks coupleColorTempToLevelMinMireds persists across restarts.
|
|
816
|
+
*/
|
|
817
|
+
createHsColorControlClusterServer(currentHue?: number, currentSaturation?: number, colorTemperatureMireds?: number, colorTempPhysicalMinMireds?: number, colorTempPhysicalMaxMireds?: number): this;
|
|
818
|
+
/**
|
|
819
|
+
* Creates a color temperature color control cluster server with feature ColorTemperature.
|
|
820
|
+
* This cluster server is used for devices that only support color temperature control.
|
|
821
|
+
*
|
|
822
|
+
* @param {number} colorTemperatureMireds - The color temperature in mireds (range colorTempPhysicalMinMireds-colorTempPhysicalMaxMireds).
|
|
823
|
+
* @param {number} colorTempPhysicalMinMireds - The physical minimum color temperature in mireds (default 147).
|
|
824
|
+
* @param {number} colorTempPhysicalMaxMireds - The physical maximum color temperature in mireds (default 500).
|
|
825
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
826
|
+
*
|
|
827
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
828
|
+
* @remarks colorTemperatureMireds persists across restarts.
|
|
829
|
+
* @remarks startUpColorTemperatureMireds persists across restarts.
|
|
830
|
+
* @remarks coupleColorTempToLevelMinMireds persists across restarts.
|
|
831
|
+
*/
|
|
832
|
+
createCtColorControlClusterServer(colorTemperatureMireds?: number, colorTempPhysicalMinMireds?: number, colorTempPhysicalMaxMireds?: number): this;
|
|
833
|
+
/**
|
|
834
|
+
* Configures the color control mode for the device.
|
|
835
|
+
*
|
|
836
|
+
* @param {ColorControl.ColorMode} colorMode - The color mode to set.
|
|
837
|
+
*
|
|
838
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
839
|
+
*/
|
|
840
|
+
configureColorControlMode(colorMode: ColorControl.ColorMode): Promise<void>;
|
|
841
|
+
/**
|
|
842
|
+
* Configures the enhanced color control mode for the device.
|
|
843
|
+
*
|
|
844
|
+
* @param {ColorControl.EnhancedColorMode} colorMode - The enhanced color mode to set.
|
|
845
|
+
*
|
|
846
|
+
* @remarks colorMode and enhancedColorMode persist across restarts.
|
|
847
|
+
*/
|
|
848
|
+
configureEnhancedColorControlMode(colorMode: ColorControl.EnhancedColorMode): Promise<void>;
|
|
849
|
+
/**
|
|
850
|
+
* Creates a default window covering cluster server with feature Lift and PositionAwareLift.
|
|
851
|
+
*
|
|
852
|
+
* @param {number} positionPercent100ths - The position percentage in 100ths (0-10000). Defaults to 0. Matter uses 10000 = fully closed 0 = fully opened.
|
|
853
|
+
* @param {WindowCovering.WindowCoveringType} type - The type of window covering (default: WindowCovering.WindowCoveringType.Rollershade). Must support feature Lift.
|
|
854
|
+
* @param {WindowCovering.EndProductType} endProductType - The end product type (default: WindowCovering.EndProductType.RollerShade). Must support feature Lift.
|
|
855
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
856
|
+
*
|
|
857
|
+
* @remarks mode attributes is writable and persists across restarts.
|
|
858
|
+
* currentPositionLiftPercent100ths persists across restarts.
|
|
859
|
+
* configStatus attributes persists across restarts.
|
|
860
|
+
*/
|
|
861
|
+
createDefaultWindowCoveringClusterServer(positionPercent100ths?: number, type?: WindowCovering.WindowCoveringType, endProductType?: WindowCovering.EndProductType): this;
|
|
862
|
+
/**
|
|
863
|
+
* Creates a default window covering cluster server with features Lift, PositionAwareLift, Tilt, PositionAwareTilt.
|
|
864
|
+
*
|
|
865
|
+
* @param {number} positionLiftPercent100ths - The lift position percentage in 100ths (0-10000). Defaults to 0. Matter uses 10000 = fully closed 0 = fully opened.
|
|
866
|
+
* @param {number} positionTiltPercent100ths - The tilt position percentage in 100ths (0-10000). Defaults to 0. Matter uses 10000 = fully closed 0 = fully opened.
|
|
867
|
+
* @param {WindowCovering.WindowCoveringType} type - The type of window covering (default: WindowCovering.WindowCoveringType.TiltBlindLift). Must support features Lift and Tilt.
|
|
868
|
+
* @param {WindowCovering.EndProductType} endProductType - The end product type (default: WindowCovering.EndProductType.InteriorBlind). Must support features Lift and Tilt.
|
|
869
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
870
|
+
*
|
|
871
|
+
* @remarks mode attributes is writable and persists across restarts.
|
|
872
|
+
* currentPositionTiltPercent100ths persists across restarts.
|
|
873
|
+
* configStatus attributes persists across restarts.
|
|
874
|
+
*/
|
|
875
|
+
createDefaultLiftTiltWindowCoveringClusterServer(positionLiftPercent100ths?: number, positionTiltPercent100ths?: number, type?: WindowCovering.WindowCoveringType, endProductType?: WindowCovering.EndProductType): this;
|
|
876
|
+
/**
|
|
877
|
+
* Sets the window covering lift target position as the current position and stops the movement.
|
|
878
|
+
*
|
|
879
|
+
*/
|
|
880
|
+
setWindowCoveringTargetAsCurrentAndStopped(): Promise<void>;
|
|
881
|
+
/**
|
|
882
|
+
* Sets the lift current and target position and the status of a window covering.
|
|
883
|
+
*
|
|
884
|
+
* @param {number} current - The current position of the window covering.
|
|
885
|
+
* @param {number} target - The target position of the window covering.
|
|
886
|
+
* @param {WindowCovering.MovementStatus} status - The movement status of the window covering.
|
|
887
|
+
*/
|
|
888
|
+
setWindowCoveringCurrentTargetStatus(current: number, target: number, status: WindowCovering.MovementStatus): Promise<void>;
|
|
889
|
+
/**
|
|
890
|
+
* Sets the status of the window covering.
|
|
891
|
+
*
|
|
892
|
+
* @param {WindowCovering.MovementStatus} status - The movement status to set.
|
|
893
|
+
*/
|
|
894
|
+
setWindowCoveringStatus(status: WindowCovering.MovementStatus): Promise<void>;
|
|
895
|
+
/**
|
|
896
|
+
* Retrieves the status of the window covering.
|
|
897
|
+
*
|
|
898
|
+
* @returns {WindowCovering.MovementStatus | undefined} The movement status of the window covering, or undefined if not available.
|
|
899
|
+
*/
|
|
900
|
+
getWindowCoveringStatus(): WindowCovering.MovementStatus | undefined;
|
|
901
|
+
/**
|
|
902
|
+
* Sets the lift target and current position of the window covering.
|
|
903
|
+
*
|
|
904
|
+
* @param {number} liftPosition - The position to set, specified as a number.
|
|
905
|
+
* @param {number} [tiltPosition] - The tilt position to set, specified as a number.
|
|
906
|
+
*/
|
|
907
|
+
setWindowCoveringTargetAndCurrentPosition(liftPosition: number, tiltPosition?: number): Promise<void>;
|
|
908
|
+
/**
|
|
909
|
+
* Creates a default thermostat cluster server with features **Heating**, **Cooling** and **AutoMode**.
|
|
910
|
+
*
|
|
911
|
+
* - When the occupied parameter is provided (either false or true), the **Occupancy** feature is also added (defaults to undefined).
|
|
912
|
+
* - When the outdoorTemperature parameter is provided (either null or a number), the outdoorTemperature attribute is also added (defaults to undefined).
|
|
913
|
+
*
|
|
914
|
+
* @param {number} [localTemperature] - The local temperature value in degrees Celsius. Defaults to 23°.
|
|
915
|
+
* @param {number} [occupiedHeatingSetpoint] - The occupied heating setpoint value in degrees Celsius. Defaults to 21°.
|
|
916
|
+
* @param {number} [occupiedCoolingSetpoint] - The occupied cooling setpoint value in degrees Celsius. Defaults to 25°.
|
|
917
|
+
* @param {number} [minSetpointDeadBand] - The minimum setpoint dead band value. Defaults to 1°.
|
|
918
|
+
* @param {number} [minHeatSetpointLimit] - The minimum heat setpoint limit value. Defaults to 0°.
|
|
919
|
+
* @param {number} [maxHeatSetpointLimit] - The maximum heat setpoint limit value. Defaults to 50°.
|
|
920
|
+
* @param {number} [minCoolSetpointLimit] - The minimum cool setpoint limit value. Defaults to 0°.
|
|
921
|
+
* @param {number} [maxCoolSetpointLimit] - The maximum cool setpoint limit value. Defaults to 50°.
|
|
922
|
+
* @param {number | undefined} [unoccupiedHeatingSetpoint] - The unoccupied heating setpoint value in degrees Celsius. Defaults to 19° (it will be ignored if occupied is not provided).
|
|
923
|
+
* @param {number | undefined} [unoccupiedCoolingSetpoint] - The unoccupied cooling setpoint value in degrees Celsius. Defaults to 27° (it will be ignored if occupied is not provided).
|
|
924
|
+
* @param {boolean | undefined} [occupied] - The occupancy status. Defaults to undefined (it will be ignored).
|
|
925
|
+
* @param {number | null | undefined} [outdoorTemperature] - The outdoor temperature value in degrees Celsius. Defaults to undefined (it will be ignored).
|
|
926
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
927
|
+
*/
|
|
928
|
+
createDefaultThermostatClusterServer(localTemperature?: number, occupiedHeatingSetpoint?: number, occupiedCoolingSetpoint?: number, minSetpointDeadBand?: number, minHeatSetpointLimit?: number, maxHeatSetpointLimit?: number, minCoolSetpointLimit?: number, maxCoolSetpointLimit?: number, unoccupiedHeatingSetpoint?: number | undefined, unoccupiedCoolingSetpoint?: number | undefined, occupied?: boolean | undefined, outdoorTemperature?: number | null | undefined): this;
|
|
929
|
+
/**
|
|
930
|
+
* Creates a default heating thermostat cluster server with feature **Heating**.
|
|
931
|
+
*
|
|
932
|
+
* - When the occupied parameter is provided (either false or true), the **Occupancy** feature is also added (defaults to undefined).
|
|
933
|
+
* - When the outdoorTemperature parameter is provided (either null or a number), the outdoorTemperature attribute is also added (defaults to undefined).
|
|
934
|
+
*
|
|
935
|
+
* @param {number} [localTemperature] - The local temperature value in degrees Celsius. Defaults to 23°.
|
|
936
|
+
* @param {number} [occupiedHeatingSetpoint] - The occupied heating setpoint value in degrees Celsius. Defaults to 21°.
|
|
937
|
+
* @param {number} [minHeatSetpointLimit] - The minimum heat setpoint limit value. Defaults to 0°.
|
|
938
|
+
* @param {number} [maxHeatSetpointLimit] - The maximum heat setpoint limit value. Defaults to 50°.
|
|
939
|
+
* @param {number | undefined} [unoccupiedHeatingSetpoint] - The unoccupied heating setpoint value in degrees Celsius. Defaults to 19° (it will be ignored if occupied is not provided).
|
|
940
|
+
* @param {boolean | undefined} [occupied] - The occupancy status. Defaults to undefined (it will be ignored).
|
|
941
|
+
* @param {number | null | undefined} [outdoorTemperature] - The outdoor temperature value in degrees Celsius. Defaults to undefined (it will be ignored).
|
|
942
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
943
|
+
*/
|
|
944
|
+
createDefaultHeatingThermostatClusterServer(localTemperature?: number, occupiedHeatingSetpoint?: number, minHeatSetpointLimit?: number, maxHeatSetpointLimit?: number, unoccupiedHeatingSetpoint?: number | undefined, occupied?: boolean | undefined, outdoorTemperature?: number | null | undefined): this;
|
|
945
|
+
/**
|
|
946
|
+
* Creates a default cooling thermostat cluster server with feature **Cooling**.
|
|
947
|
+
*
|
|
948
|
+
* - When the occupied parameter is provided (either false or true), the **Occupancy** feature is also added (defaults to undefined).
|
|
949
|
+
* - When the outdoorTemperature parameter is provided (either null or a number), the outdoorTemperature attribute is also added (defaults to undefined).
|
|
950
|
+
*
|
|
951
|
+
* @param {number} [localTemperature] - The local temperature value in degrees Celsius. Defaults to 23°.
|
|
952
|
+
* @param {number} [occupiedCoolingSetpoint] - The occupied cooling setpoint value in degrees Celsius. Defaults to 25°.
|
|
953
|
+
* @param {number} [minCoolSetpointLimit] - The minimum cool setpoint limit value. Defaults to 0°.
|
|
954
|
+
* @param {number} [maxCoolSetpointLimit] - The maximum cool setpoint limit value. Defaults to 50°.
|
|
955
|
+
* @param {number | undefined} [unoccupiedCoolingSetpoint] - The unoccupied cooling setpoint value in degrees Celsius. Defaults to 27° (it will be ignored if occupied is not provided).
|
|
956
|
+
* @param {boolean | undefined} [occupied] - The occupancy status. Defaults to undefined (it will be ignored).
|
|
957
|
+
* @param {number | null | undefined} [outdoorTemperature] - The outdoor temperature value in degrees Celsius. Defaults to undefined (it will be ignored).
|
|
958
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
959
|
+
*/
|
|
960
|
+
createDefaultCoolingThermostatClusterServer(localTemperature?: number, occupiedCoolingSetpoint?: number, minCoolSetpointLimit?: number, maxCoolSetpointLimit?: number, unoccupiedCoolingSetpoint?: number | undefined, occupied?: boolean | undefined, outdoorTemperature?: number | null | undefined): this;
|
|
961
|
+
/**
|
|
962
|
+
* Creates a default thermostat user interface configuration cluster server.
|
|
963
|
+
*
|
|
964
|
+
* @param {ThermostatUserInterfaceConfiguration.TemperatureDisplayMode} [temperatureDisplayMode] - The temperature display mode to set. Defaults to `ThermostatUserInterfaceConfiguration.TemperatureDisplayMode.Celsius`.
|
|
965
|
+
* @param {ThermostatUserInterfaceConfiguration.KeypadLockout} [keypadLockout] - The keypad lockout mode. Defaults to `ThermostatUserInterfaceConfiguration.KeypadLockout.NoLockout`.
|
|
966
|
+
* @param {ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility} [scheduleProgrammingVisibility] - The schedule programming visibility. Defaults to `ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility.ScheduleProgrammingPermitted`.
|
|
967
|
+
*
|
|
968
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
969
|
+
* @remarks
|
|
970
|
+
* The default values are:
|
|
971
|
+
* - temperatureDisplayMode: ThermostatUserInterfaceConfiguration.TemperatureDisplayMode.Celsius (writable).
|
|
972
|
+
* - keypadLockout: ThermostatUserInterfaceConfiguration.KeypadLockout.NoLockout (writable).
|
|
973
|
+
* - scheduleProgrammingVisibility: ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility.ScheduleProgrammingPermitted (writable).
|
|
974
|
+
*/
|
|
975
|
+
createDefaultThermostatUserInterfaceConfigurationClusterServer(temperatureDisplayMode?: ThermostatUserInterfaceConfiguration.TemperatureDisplayMode, keypadLockout?: ThermostatUserInterfaceConfiguration.KeypadLockout, scheduleProgrammingVisibility?: ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility): this;
|
|
976
|
+
/**
|
|
977
|
+
* Creates a default fan control cluster server with features Auto, and Step and mode Off Low Med High Auto.
|
|
978
|
+
*
|
|
979
|
+
* @param {FanControl.FanMode} [fanMode] - The fan mode to set. Defaults to `FanControl.FanMode.Off`.
|
|
980
|
+
* @param {FanControl.FanModeSequence} [fanModeSequence] - The fan mode sequence to set. Defaults to `FanControl.FanModeSequence.OffLowMedHighAuto`.
|
|
981
|
+
* @param {number} [percentSetting] - The initial percent setting. Defaults to 0.
|
|
982
|
+
* @param {number} [percentCurrent] - The initial percent current. Defaults to 0.
|
|
983
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
984
|
+
*
|
|
985
|
+
* @remarks
|
|
986
|
+
* - fanmode is writable and persists across reboots.
|
|
987
|
+
* - fanModeSequence is fixed.
|
|
988
|
+
* - percentSetting is writable.
|
|
989
|
+
*/
|
|
990
|
+
createDefaultFanControlClusterServer(fanMode?: FanControl.FanMode, fanModeSequence?: FanControl.FanModeSequence, percentSetting?: number, percentCurrent?: number): this;
|
|
991
|
+
/**
|
|
992
|
+
* Creates an On Off fan control cluster server without features and mode Off High.
|
|
993
|
+
*
|
|
994
|
+
* @param {FanControl.FanMode} [fanMode] - The fan mode to set. Defaults to `FanControl.FanMode.Off`.
|
|
995
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
996
|
+
*
|
|
997
|
+
* @remarks
|
|
998
|
+
* fanmode is writable and persists across reboots.
|
|
999
|
+
* fanModeSequence is fixed.
|
|
1000
|
+
* percentSetting is writable.
|
|
1001
|
+
*/
|
|
1002
|
+
createOnOffFanControlClusterServer(fanMode?: FanControl.FanMode): this;
|
|
1003
|
+
/**
|
|
1004
|
+
* Creates a base fan control cluster server without features and mode Off Low Med High.
|
|
1005
|
+
*
|
|
1006
|
+
* @param {FanControl.FanMode} [fanMode] - The fan mode to set. Defaults to `FanControl.FanMode.Off`.
|
|
1007
|
+
* @param {FanControl.FanModeSequence} [fanModeSequence] - The fan mode sequence to set. Defaults to `FanControl.FanModeSequence.OffLowMedHigh`.
|
|
1008
|
+
* @param {number} [percentSetting] - The initial percent setting. Defaults to 0.
|
|
1009
|
+
* @param {number} [percentCurrent] - The initial percent current. Defaults to 0.
|
|
1010
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1011
|
+
*
|
|
1012
|
+
* @remarks
|
|
1013
|
+
* fanmode is writable and persists across reboots.
|
|
1014
|
+
* fanModeSequence is fixed.
|
|
1015
|
+
* percentSetting is writable.
|
|
1016
|
+
*/
|
|
1017
|
+
createBaseFanControlClusterServer(fanMode?: FanControl.FanMode, fanModeSequence?: FanControl.FanModeSequence, percentSetting?: number, percentCurrent?: number): this;
|
|
1018
|
+
/**
|
|
1019
|
+
* Creates a fan control cluster server with features MultiSpeed, Auto, and Step and mode Off Low Med High Auto.
|
|
1020
|
+
*
|
|
1021
|
+
* @param {FanControl.FanMode} [fanMode] - The fan mode to set. Defaults to `FanControl.FanMode.Off`.
|
|
1022
|
+
* @param {FanControl.FanModeSequence} [fanModeSequence] - The fan mode sequence to set. Defaults to `FanControl.FanModeSequence.OffLowMedHighAuto`.
|
|
1023
|
+
* @param {number} [percentSetting] - The initial percent setting. Defaults to 0.
|
|
1024
|
+
* @param {number} [percentCurrent] - The initial percent current. Defaults to 0.
|
|
1025
|
+
* @param {number} [speedMax] - The maximum speed setting. Defaults to 10.
|
|
1026
|
+
* @param {number} [speedSetting] - The initial speed setting. Defaults to 0.
|
|
1027
|
+
* @param {number} [speedCurrent] - The initial speed current. Defaults to 0.
|
|
1028
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1029
|
+
*
|
|
1030
|
+
* @remarks
|
|
1031
|
+
* - fanmode is writable and persists across reboots.
|
|
1032
|
+
* - fanModeSequence is fixed.
|
|
1033
|
+
* - percentSetting is writable.
|
|
1034
|
+
* - speedMax is fixed.
|
|
1035
|
+
* - speedSetting is writable.
|
|
1036
|
+
*/
|
|
1037
|
+
createMultiSpeedFanControlClusterServer(fanMode?: FanControl.FanMode, fanModeSequence?: FanControl.FanModeSequence, percentSetting?: number, percentCurrent?: number, speedMax?: number, speedSetting?: number, speedCurrent?: number): this;
|
|
1038
|
+
/**
|
|
1039
|
+
* Creates a fan control cluster server with features MultiSpeed, Auto, Step, Rock, Wind and AirflowDirection and mode Off Low Med High Auto.
|
|
1040
|
+
*
|
|
1041
|
+
* @param {FanControl.FanMode} [fanMode] - The fan mode to set. Defaults to `FanControl.FanMode.Off`.
|
|
1042
|
+
* @param {FanControl.FanModeSequence} [fanModeSequence] - The fan mode sequence to set. Defaults to `FanControl.FanModeSequence.OffLowMedHighAuto`.
|
|
1043
|
+
* @param {number} [percentSetting] - The initial percent setting. Defaults to 0.
|
|
1044
|
+
* @param {number} [percentCurrent] - The initial percent current. Defaults to 0.
|
|
1045
|
+
* @param {number} [speedMax] - The maximum speed setting. Defaults to 10.
|
|
1046
|
+
* @param {number} [speedSetting] - The initial speed setting. Defaults to 0.
|
|
1047
|
+
* @param {number} [speedCurrent] - The initial speed current. Defaults to 0.
|
|
1048
|
+
* @param {object} [rockSupport] - The rock support configuration.
|
|
1049
|
+
* @param {boolean} rockSupport.rockLeftRight - Indicates support for rocking left to right. Defaults to true.
|
|
1050
|
+
* @param {boolean} rockSupport.rockUpDown - Indicates support for rocking up and down. Defaults to true.
|
|
1051
|
+
* @param {boolean} rockSupport.rockRound - Indicates support for round rocking. Defaults to true.
|
|
1052
|
+
* @param {object} [rockSetting] - The rock setting configuration.
|
|
1053
|
+
* @param {boolean} rockSetting.rockLeftRight - Indicates the current setting for rocking left to right. Defaults to true.
|
|
1054
|
+
* @param {boolean} rockSetting.rockUpDown - Indicates the current setting for rocking up and down. Defaults to true.
|
|
1055
|
+
* @param {boolean} rockSetting.rockRound - Indicates the current setting for round rocking. Defaults to true.
|
|
1056
|
+
* @param {object} [windSupport] - The wind support configuration.
|
|
1057
|
+
* @param {boolean} windSupport.sleepWind - Indicates support for sleep wind. Defaults to true.
|
|
1058
|
+
* @param {boolean} windSupport.naturalWind - Indicates support for natural wind. Defaults to true.
|
|
1059
|
+
* @param {object} [windSetting] - The wind setting configuration.
|
|
1060
|
+
* @param {boolean} windSetting.sleepWind - Indicates the current setting for sleep wind. Defaults to false.
|
|
1061
|
+
* @param {boolean} windSetting.naturalWind - Indicates the current setting for natural wind. Defaults to true.
|
|
1062
|
+
* @param {FanControl.AirflowDirection} [airflowDirection] - The airflow direction. Defaults to `FanControl.AirflowDirection.Forward`.
|
|
1063
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1064
|
+
*
|
|
1065
|
+
* @remarks
|
|
1066
|
+
* - fanmode is writable and persists across reboots.
|
|
1067
|
+
* - fanModeSequence is fixed.
|
|
1068
|
+
* - percentSetting is writable.
|
|
1069
|
+
* - speedMax is fixed.
|
|
1070
|
+
* - speedSetting is writable.
|
|
1071
|
+
* - rockSupport is fixed.
|
|
1072
|
+
* - rockSetting is writable.
|
|
1073
|
+
* - windSupport is fixed.
|
|
1074
|
+
* - windSetting is writable.
|
|
1075
|
+
* - airflowDirection is writable.
|
|
1076
|
+
*/
|
|
1077
|
+
createCompleteFanControlClusterServer(fanMode?: FanControl.FanMode, fanModeSequence?: FanControl.FanModeSequence, percentSetting?: number, percentCurrent?: number, speedMax?: number, speedSetting?: number, speedCurrent?: number, rockSupport?: {
|
|
1078
|
+
rockLeftRight: boolean;
|
|
1079
|
+
rockUpDown: boolean;
|
|
1080
|
+
rockRound: boolean;
|
|
1081
|
+
}, rockSetting?: {
|
|
1082
|
+
rockLeftRight: boolean;
|
|
1083
|
+
rockUpDown: boolean;
|
|
1084
|
+
rockRound: boolean;
|
|
1085
|
+
}, windSupport?: {
|
|
1086
|
+
sleepWind: boolean;
|
|
1087
|
+
naturalWind: boolean;
|
|
1088
|
+
}, windSetting?: {
|
|
1089
|
+
sleepWind: boolean;
|
|
1090
|
+
naturalWind: boolean;
|
|
1091
|
+
}, airflowDirection?: FanControl.AirflowDirection): this;
|
|
1092
|
+
/**
|
|
1093
|
+
* Creates a default HEPA Filter Monitoring Cluster Server with features Condition and ReplacementProductList.
|
|
1094
|
+
* It supports ResourceMonitoring.Feature.Condition, ResourceMonitoring.Feature.Warning, and ResourceMonitoring.Feature.ReplacementProductList.
|
|
1095
|
+
*
|
|
1096
|
+
* @param {number} condition - The initial condition value (range 0-100). Default is 100.
|
|
1097
|
+
* @param {ResourceMonitoring.ChangeIndication} changeIndication - The initial change indication. Default is ResourceMonitoring.ChangeIndication.Ok.
|
|
1098
|
+
* @param {boolean | undefined} inPlaceIndicator - The in-place indicator. Default is true.
|
|
1099
|
+
* @param {number | undefined} lastChangedTime - The last changed time (EpochS). Default is null.
|
|
1100
|
+
* @param {ResourceMonitoring.ReplacementProduct[]} replacementProductList - The list of replacement products. Default is an empty array. It is a fixed attribute.
|
|
1101
|
+
*
|
|
1102
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1103
|
+
*
|
|
1104
|
+
* @remarks
|
|
1105
|
+
* The HEPA Filter Monitoring Cluster Server is used to monitor the status of HEPA filters.
|
|
1106
|
+
* It provides information about the condition of the filter, whether it is in place, and the last time it was changed.
|
|
1107
|
+
* The change indication can be used to indicate if the filter needs to be replaced or serviced.
|
|
1108
|
+
* The replacement product list can be used to provide a list of replacement products for the filter.
|
|
1109
|
+
* The condition attribute is fixed at 100, indicating a healthy filter.
|
|
1110
|
+
* The degradation direction is fixed at ResourceMonitoring.DegradationDirection.Down, indicating that a lower value indicates a worse condition.
|
|
1111
|
+
* The replacement product list is initialized as an empty array.
|
|
1112
|
+
*/
|
|
1113
|
+
createDefaultHepaFilterMonitoringClusterServer(condition?: number, changeIndication?: ResourceMonitoring.ChangeIndication, inPlaceIndicator?: boolean | undefined, lastChangedTime?: number | null | undefined, replacementProductList?: ResourceMonitoring.ReplacementProduct[]): this;
|
|
1114
|
+
/**
|
|
1115
|
+
* Creates a default Activated Carbon Filter Monitoring Cluster Server with features Condition and ReplacementProductList.
|
|
1116
|
+
* It supports ResourceMonitoring.Feature.Condition, ResourceMonitoring.Feature.Warning, and ResourceMonitoring.Feature.ReplacementProductList.
|
|
1117
|
+
*
|
|
1118
|
+
* @param {number} condition - The initial condition value (range 0-100). Default is 100.
|
|
1119
|
+
* @param {ResourceMonitoring.ChangeIndication} changeIndication - The initial change indication. Default is ResourceMonitoring.ChangeIndication.Ok.
|
|
1120
|
+
* @param {boolean | undefined} inPlaceIndicator - The in-place indicator. Default is undefined.
|
|
1121
|
+
* @param {number | undefined} lastChangedTime - The last changed time (EpochS). Default is undefined.
|
|
1122
|
+
* @param {ResourceMonitoring.ReplacementProduct[]} replacementProductList - The list of replacement products. Default is an empty array. It is a fixed attribute.
|
|
1123
|
+
*
|
|
1124
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1125
|
+
*
|
|
1126
|
+
* @remarks
|
|
1127
|
+
* The Activated Carbon Filter Monitoring Cluster Server is used to monitor the status of activated carbon filters.
|
|
1128
|
+
* It provides information about the condition of the filter, whether it is in place, and the last time it was changed.
|
|
1129
|
+
* The change indication can be used to indicate if the filter needs to be replaced or serviced.
|
|
1130
|
+
* The replacement product list can be used to provide a list of replacement products for the filter.
|
|
1131
|
+
* The condition attribute is fixed at 100, indicating a healthy filter.
|
|
1132
|
+
* The degradation direction is fixed at ResourceMonitoring.DegradationDirection.Down, indicating that a lower value indicates a worse condition.
|
|
1133
|
+
* The replacement product list is initialized as an empty array.
|
|
1134
|
+
*/
|
|
1135
|
+
createDefaultActivatedCarbonFilterMonitoringClusterServer(condition?: number, changeIndication?: ResourceMonitoring.ChangeIndication, inPlaceIndicator?: boolean | undefined, lastChangedTime?: number | null | undefined, replacementProductList?: ResourceMonitoring.ReplacementProduct[]): this;
|
|
1136
|
+
/**
|
|
1137
|
+
* Creates a default door lock cluster server.
|
|
1138
|
+
*
|
|
1139
|
+
* @param {DoorLock.LockState} [lockState] - The initial state of the lock (default: Locked).
|
|
1140
|
+
* @param {DoorLock.LockType} [lockType] - The type of the lock (default: DeadBolt).
|
|
1141
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1142
|
+
*
|
|
1143
|
+
* @remarks
|
|
1144
|
+
* All operating modes NOT supported by a lock SHALL be set to one. The value of the OperatingMode enumeration defines the related bit to be set.
|
|
1145
|
+
*/
|
|
1146
|
+
createDefaultDoorLockClusterServer(lockState?: DoorLock.LockState, lockType?: DoorLock.LockType): this;
|
|
1147
|
+
/**
|
|
1148
|
+
* Creates a default Mode Select cluster server.
|
|
1149
|
+
*
|
|
1150
|
+
* @param {string} description - The description of the mode select cluster.
|
|
1151
|
+
* @param {ModeSelect.ModeOption[]} supportedModes - The list of supported modes.
|
|
1152
|
+
* @param {number} [currentMode] - The current mode (default: 0).
|
|
1153
|
+
* @param {number} [startUpMode] - The startup mode (default: 0).
|
|
1154
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1155
|
+
*
|
|
1156
|
+
* @remarks
|
|
1157
|
+
* endpoint.createDefaultModeSelectClusterServer('Night mode', [{ label: 'Led ON', mode: 0, semanticTags: [] }, { label: 'Led OFF', mode: 1, semanticTags: [] }], 0, 0);
|
|
1158
|
+
*/
|
|
1159
|
+
createDefaultModeSelectClusterServer(description: string, supportedModes: ModeSelect.ModeOption[], currentMode?: number, startUpMode?: number): this;
|
|
1160
|
+
/**
|
|
1161
|
+
* Creates the default Valve Configuration And Control cluster server with features Level.
|
|
1162
|
+
*
|
|
1163
|
+
* @param {ValveConfigurationAndControl.ValveState} [valveState] - The valve state to set. Defaults to `ValveConfigurationAndControl.ValveState.Closed`.
|
|
1164
|
+
* @param {number} [valveLevel] - The valve level to set. Defaults to 0.
|
|
1165
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1166
|
+
*/
|
|
1167
|
+
createDefaultValveConfigurationAndControlClusterServer(valveState?: ValveConfigurationAndControl.ValveState, valveLevel?: number): this;
|
|
1168
|
+
/**
|
|
1169
|
+
* Creates the default PumpConfigurationAndControl cluster server with features ConstantSpeed.
|
|
1170
|
+
*
|
|
1171
|
+
* @param {PumpConfigurationAndControl.OperationMode} [pumpMode] - The pump mode to set. Defaults to `PumpConfigurationAndControl.OperationMode.Normal`.
|
|
1172
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1173
|
+
*/
|
|
1174
|
+
createDefaultPumpConfigurationAndControlClusterServer(pumpMode?: PumpConfigurationAndControl.OperationMode): this;
|
|
1175
|
+
/**
|
|
1176
|
+
* Creates the default SmokeCOAlarm Cluster Server with features SmokeAlarm and CoAlarm.
|
|
1177
|
+
*
|
|
1178
|
+
* @param {SmokeCoAlarm.AlarmState} smokeState - The state of the smoke alarm. Defaults to SmokeCoAlarm.AlarmState.Normal.
|
|
1179
|
+
* @param {SmokeCoAlarm.AlarmState} coState - The state of the CO alarm. Defaults to SmokeCoAlarm.AlarmState.Normal.
|
|
1180
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1181
|
+
*/
|
|
1182
|
+
createDefaultSmokeCOAlarmClusterServer(smokeState?: SmokeCoAlarm.AlarmState, coState?: SmokeCoAlarm.AlarmState): this;
|
|
1183
|
+
/**
|
|
1184
|
+
* Creates a smoke only SmokeCOAlarm Cluster Server with features SmokeAlarm.
|
|
1185
|
+
*
|
|
1186
|
+
* @param {SmokeCoAlarm.AlarmState} smokeState - The state of the smoke alarm. Defaults to SmokeCoAlarm.AlarmState.Normal.
|
|
1187
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1188
|
+
*/
|
|
1189
|
+
createSmokeOnlySmokeCOAlarmClusterServer(smokeState?: SmokeCoAlarm.AlarmState): this;
|
|
1190
|
+
/**
|
|
1191
|
+
* Creates a co only SmokeCOAlarm Cluster Server with features CoAlarm.
|
|
1192
|
+
*
|
|
1193
|
+
* @param {SmokeCoAlarm.AlarmState} coState - The state of the CO alarm. Defaults to SmokeCoAlarm.AlarmState.Normal.
|
|
1194
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1195
|
+
*/
|
|
1196
|
+
createCoOnlySmokeCOAlarmClusterServer(coState?: SmokeCoAlarm.AlarmState): this;
|
|
1197
|
+
/**
|
|
1198
|
+
* Creates a default momentary switch cluster server with features MomentarySwitch, MomentarySwitchRelease, MomentarySwitchLongPress and MomentarySwitchMultiPress
|
|
1199
|
+
* and events initialPress, longPress, shortRelease, longRelease, multiPressOngoing, multiPressComplete.
|
|
1200
|
+
*
|
|
1201
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1202
|
+
*
|
|
1203
|
+
* @remarks
|
|
1204
|
+
* This method adds a cluster server with default momentary switch features and configuration suitable for (AppleHome) Single Double Long automations.
|
|
1205
|
+
*/
|
|
1206
|
+
createDefaultSwitchClusterServer(): this;
|
|
1207
|
+
/**
|
|
1208
|
+
* Creates a default momentary switch cluster server with feature MomentarySwitch and event initialPress.
|
|
1209
|
+
*
|
|
1210
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1211
|
+
*
|
|
1212
|
+
* @remarks
|
|
1213
|
+
* This method adds a cluster server with default momentary switch features and configuration suitable for a Single press automations.
|
|
1214
|
+
* It is supported by the Home app.
|
|
1215
|
+
*/
|
|
1216
|
+
createDefaultMomentarySwitchClusterServer(): this;
|
|
1217
|
+
/**
|
|
1218
|
+
* Creates a default latching switch cluster server with features LatchingSwitch.
|
|
1219
|
+
*
|
|
1220
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1221
|
+
*
|
|
1222
|
+
* @remarks
|
|
1223
|
+
* This method adds a cluster server with default latching switch features and configuration suitable for a latching switch with 2 positions.
|
|
1224
|
+
*/
|
|
1225
|
+
createDefaultLatchingSwitchClusterServer(): this;
|
|
1226
|
+
/**
|
|
1227
|
+
* Triggers a switch event on the specified endpoint.
|
|
1228
|
+
* We usually use get from real devices something like 'single', 'double', 'long'.
|
|
1229
|
+
* Here we convert it to the Matter sequence of events (taken from Matter specs).
|
|
1230
|
+
*
|
|
1231
|
+
* @param {string} event - The type of event to trigger. Possible values are 'Single', 'Double', 'Long' for momentarySwitch and 'Press', 'Release' for latchingSwitch.
|
|
1232
|
+
* @param {AnsiLogger} log - Optional logger to log the event.
|
|
1233
|
+
* @returns {boolean} - A boolean indicating whether the event was successfully triggered.
|
|
1234
|
+
*/
|
|
1235
|
+
triggerSwitchEvent(event: 'Single' | 'Double' | 'Long' | 'Press' | 'Release', log?: AnsiLogger): Promise<boolean>;
|
|
1236
|
+
/**
|
|
1237
|
+
* Creates a default OperationalState Cluster Server.
|
|
1238
|
+
*
|
|
1239
|
+
* @param {OperationalState.OperationalStateEnum} operationalState - The initial operational state id.
|
|
1240
|
+
*
|
|
1241
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1242
|
+
*
|
|
1243
|
+
* @remarks
|
|
1244
|
+
* This method adds a cluster server with a default operational state configuration:
|
|
1245
|
+
* - { operationalStateId: OperationalState.OperationalStateEnum.Stopped, operationalStateLabel: 'Stopped' },
|
|
1246
|
+
* - { operationalStateId: OperationalState.OperationalStateEnum.Running, operationalStateLabel: 'Running' },
|
|
1247
|
+
* - { operationalStateId: OperationalState.OperationalStateEnum.Paused, operationalStateLabel: 'Paused' },
|
|
1248
|
+
* - { operationalStateId: OperationalState.OperationalStateEnum.Error, operationalStateLabel: 'Error' },
|
|
1249
|
+
*/
|
|
1250
|
+
createDefaultOperationalStateClusterServer(operationalState?: OperationalState.OperationalStateEnum): this;
|
|
1251
|
+
/**
|
|
1252
|
+
* Creates a default boolean state cluster server.
|
|
1253
|
+
* The stateChange event is enabled.
|
|
1254
|
+
*
|
|
1255
|
+
* @param {boolean} contact - The state of the cluster. Defaults to true (true = contact).
|
|
1256
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1257
|
+
*
|
|
1258
|
+
* @remarks
|
|
1259
|
+
* Water Leak Detector: true = leak, false = no leak
|
|
1260
|
+
* Water Freeze Detector: true = freeze, false = no freeze
|
|
1261
|
+
* Rain Sensor: true = rain, false = no rain
|
|
1262
|
+
* Contact Sensor: true = closed or contact, false = open or no contact
|
|
1263
|
+
*/
|
|
1264
|
+
createDefaultBooleanStateClusterServer(contact?: boolean): this;
|
|
1265
|
+
/**
|
|
1266
|
+
* Creates a default boolean state configuration cluster server to be used with the waterFreezeDetector, waterLeakDetector, and rainSensor device types.
|
|
1267
|
+
*
|
|
1268
|
+
* Features:
|
|
1269
|
+
* - Visual
|
|
1270
|
+
* - Audible
|
|
1271
|
+
* - SensitivityLevel
|
|
1272
|
+
*
|
|
1273
|
+
* @remarks Supports the enableDisableAlarm command.
|
|
1274
|
+
*
|
|
1275
|
+
* @param {boolean} [sensorFault] - Optional boolean value indicating the sensor fault state. Defaults to `false` if not provided.
|
|
1276
|
+
* @param {number} [currentSensitivityLevel] - The current sensitivity level. Defaults to `0` if not provided.
|
|
1277
|
+
* @param {number} [supportedSensitivityLevels] - The number of supported sensitivity levels. Defaults to `2` if not provided (min 2, max 10).
|
|
1278
|
+
* @param {number} [defaultSensitivityLevel] - The default sensitivity level. Defaults to `0` if not provided.
|
|
1279
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1280
|
+
*/
|
|
1281
|
+
createDefaultBooleanStateConfigurationClusterServer(sensorFault?: boolean, currentSensitivityLevel?: number, supportedSensitivityLevels?: number, defaultSensitivityLevel?: number): this;
|
|
1282
|
+
/**
|
|
1283
|
+
* Creates a default TemperatureMeasurement cluster server.
|
|
1284
|
+
*
|
|
1285
|
+
* @param {number | null} measuredValue - The measured value of the temperature x 100.
|
|
1286
|
+
* @param {number | null} minMeasuredValue - The minimum measured value of the temperature x 100.
|
|
1287
|
+
* @param {number | null} maxMeasuredValue - The maximum measured value of the temperature x 100.
|
|
1288
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1289
|
+
*/
|
|
1290
|
+
createDefaultTemperatureMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): this;
|
|
1291
|
+
/**
|
|
1292
|
+
* Creates a default RelativeHumidityMeasurement cluster server.
|
|
1293
|
+
*
|
|
1294
|
+
* @param {number | null} measuredValue - The measured value of the relative humidity x 100.
|
|
1295
|
+
* @param {number | null} minMeasuredValue - The minimum measured value of the relative humidity x 100.
|
|
1296
|
+
* @param {number | null} maxMeasuredValue - The maximum measured value of the relative humidity x 100.
|
|
1297
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1298
|
+
*/
|
|
1299
|
+
createDefaultRelativeHumidityMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): this;
|
|
1300
|
+
/**
|
|
1301
|
+
* Creates a default PressureMeasurement cluster server.
|
|
1302
|
+
*
|
|
1303
|
+
* @param {number | null} measuredValue - The measured value for the pressure in kPa x 10.
|
|
1304
|
+
* @param {number | null} minMeasuredValue - The minimum measured value for the pressure in kPa x 10.
|
|
1305
|
+
* @param {number | null} maxMeasuredValue - The maximum measured value for the pressure in kPa x 10.
|
|
1306
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1307
|
+
*
|
|
1308
|
+
* @remarks
|
|
1309
|
+
* - MeasuredValue = 10 x Pressure in kPa
|
|
1310
|
+
* - MeasuredValue = 1 x Pressure in hPa
|
|
1311
|
+
* - MeasuredValue = 33.8639 x Pressure in inHg
|
|
1312
|
+
*
|
|
1313
|
+
* Conversion:
|
|
1314
|
+
* - 1 kPa = 10 hPa
|
|
1315
|
+
* - 1 inHg = 33.8639 hPa
|
|
1316
|
+
*/
|
|
1317
|
+
createDefaultPressureMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): this;
|
|
1318
|
+
/**
|
|
1319
|
+
* Creates a default IlluminanceMeasurement cluster server.
|
|
1320
|
+
*
|
|
1321
|
+
* @param {number | null} measuredValue - The measured value of illuminance.
|
|
1322
|
+
* @param {number | null} minMeasuredValue - The minimum measured value of illuminance.
|
|
1323
|
+
* @param {number | null} maxMeasuredValue - The maximum measured value of illuminance.
|
|
1324
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1325
|
+
*
|
|
1326
|
+
* @remarks
|
|
1327
|
+
*
|
|
1328
|
+
* The default value for the illuminance measurement is null.
|
|
1329
|
+
*
|
|
1330
|
+
* This attribute SHALL indicate the illuminance in Lux (symbol lx) as follows:
|
|
1331
|
+
* • MeasuredValue = 10,000 x log10(illuminance) + 1,
|
|
1332
|
+
* where 1 lx <= illuminance <= 3.576 Mlx, corresponding to a MeasuredValue in the range 1 to 0xFFFE.
|
|
1333
|
+
* • 0 indicates a value of illuminance that is too low to be measured
|
|
1334
|
+
* • null indicates that the illuminance measurement is invalid.
|
|
1335
|
+
*
|
|
1336
|
+
* - Lux to matter = Math.round(Math.max(Math.min(10000 * Math.log10(lux), 0xfffe), 0))
|
|
1337
|
+
* - Matter to Lux = Math.round(Math.max(Math.pow(10, value / 10000), 0))
|
|
1338
|
+
*/
|
|
1339
|
+
createDefaultIlluminanceMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): this;
|
|
1340
|
+
/**
|
|
1341
|
+
* Creates a default FlowMeasurement cluster server.
|
|
1342
|
+
*
|
|
1343
|
+
* @param {number | null} measuredValue - The measured value of the flow in 10 x m3/h.
|
|
1344
|
+
* @param {number | null} minMeasuredValue - The minimum measured value of the flow in 10 x m3/h.
|
|
1345
|
+
* @param {number | null} maxMeasuredValue - The maximum measured value of the flow in 10 x m3/h.
|
|
1346
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1347
|
+
*/
|
|
1348
|
+
createDefaultFlowMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): this;
|
|
1349
|
+
/**
|
|
1350
|
+
* Creates a default OccupancySensing cluster server with feature PassiveInfrared.
|
|
1351
|
+
*
|
|
1352
|
+
* @param {boolean} occupied - A boolean indicating whether the occupancy is occupied or not. Default is false.
|
|
1353
|
+
* @param {number} holdTime - The hold time in seconds. Default is 30.
|
|
1354
|
+
* @param {number} holdTimeMin - The minimum hold time in seconds. Default is 1.
|
|
1355
|
+
* @param {number} holdTimeMax - The maximum hold time in seconds. Default is 300.
|
|
1356
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1357
|
+
*
|
|
1358
|
+
* @remarks The default value for the occupancy sensor type is PIR.
|
|
1359
|
+
*/
|
|
1360
|
+
createDefaultOccupancySensingClusterServer(occupied?: boolean, holdTime?: number, holdTimeMin?: number, holdTimeMax?: number): this;
|
|
1361
|
+
/**
|
|
1362
|
+
* Creates a default AirQuality cluster server.
|
|
1363
|
+
*
|
|
1364
|
+
* @param {AirQuality.AirQualityEnum} airQuality The air quality level. Defaults to `AirQuality.AirQualityType.Unknown`.
|
|
1365
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1366
|
+
*/
|
|
1367
|
+
createDefaultAirQualityClusterServer(airQuality?: AirQuality.AirQualityEnum): this;
|
|
1368
|
+
/**
|
|
1369
|
+
* Creates a default TotalVolatileOrganicCompoundsConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1370
|
+
*
|
|
1371
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1372
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ugm3).
|
|
1373
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1374
|
+
* @param {number} [uncertainty] - The uncertainty value (optional).
|
|
1375
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1376
|
+
*
|
|
1377
|
+
* @remarks
|
|
1378
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1379
|
+
* Apple Home requires Ugm3 for TotalVolatileOrganicCompoundsConcentrationMeasurement cluster.
|
|
1380
|
+
*/
|
|
1381
|
+
createDefaultTvocMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium, uncertainty?: number): this;
|
|
1382
|
+
/**
|
|
1383
|
+
* Creates a default TotalVolatileOrganicCompoundsConcentrationMeasurement cluster server with feature LevelIndication, MediumLevel and CriticalLevel.
|
|
1384
|
+
*
|
|
1385
|
+
* @param {ConcentrationMeasurement.LevelValue} levelValue - The level value of the measurement (default to ConcentrationMeasurement.LevelValue.Unknown).
|
|
1386
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The measurement medium (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1387
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1388
|
+
*
|
|
1389
|
+
* @remarks
|
|
1390
|
+
* The measurementMedium attribute is fixed and cannot be changed after creation.
|
|
1391
|
+
*/
|
|
1392
|
+
createLevelTvocMeasurementClusterServer(levelValue?: ConcentrationMeasurement.LevelValue, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1393
|
+
/**
|
|
1394
|
+
* Create a default CarbonMonoxideConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1395
|
+
*
|
|
1396
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1397
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ppm).
|
|
1398
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1399
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1400
|
+
*
|
|
1401
|
+
* @remarks
|
|
1402
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1403
|
+
*/
|
|
1404
|
+
createDefaultCarbonMonoxideConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1405
|
+
/**
|
|
1406
|
+
* Create a default CarbonDioxideConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1407
|
+
*
|
|
1408
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1409
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ppm).
|
|
1410
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1411
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1412
|
+
*
|
|
1413
|
+
* @remarks
|
|
1414
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1415
|
+
*/
|
|
1416
|
+
createDefaultCarbonDioxideConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1417
|
+
/**
|
|
1418
|
+
* Create a default FormaldehydeConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1419
|
+
*
|
|
1420
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1421
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Mgm3).
|
|
1422
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1423
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1424
|
+
*
|
|
1425
|
+
* @remarks
|
|
1426
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1427
|
+
* Apple Home doesn't support FormaldehydeConcentrationMeasurement cluster.
|
|
1428
|
+
*/
|
|
1429
|
+
createDefaultFormaldehydeConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1430
|
+
/**
|
|
1431
|
+
* Create a default Pm1ConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1432
|
+
*
|
|
1433
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1434
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ugm3).
|
|
1435
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1436
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1437
|
+
*
|
|
1438
|
+
* @remarks
|
|
1439
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1440
|
+
* Apple Home doesn't support Pm1ConcentrationMeasurement cluster.
|
|
1441
|
+
*/
|
|
1442
|
+
createDefaultPm1ConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1443
|
+
/**
|
|
1444
|
+
* Create a default Pm25ConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1445
|
+
*
|
|
1446
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1447
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ugm3).
|
|
1448
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1449
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1450
|
+
*
|
|
1451
|
+
* @remarks
|
|
1452
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1453
|
+
* Apple Home requires Ugm3 for Pm25ConcentrationMeasurement cluster.
|
|
1454
|
+
*/
|
|
1455
|
+
createDefaultPm25ConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1456
|
+
/**
|
|
1457
|
+
* Create a default Pm10ConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1458
|
+
*
|
|
1459
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1460
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ugm3).
|
|
1461
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1462
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1463
|
+
*
|
|
1464
|
+
* @remarks
|
|
1465
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1466
|
+
* Apple Home requires Ugm3 for Pm10ConcentrationMeasurement cluster.
|
|
1467
|
+
*/
|
|
1468
|
+
createDefaultPm10ConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1469
|
+
/**
|
|
1470
|
+
* Create a default OzoneConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1471
|
+
*
|
|
1472
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1473
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ugm3).
|
|
1474
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1475
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1476
|
+
*
|
|
1477
|
+
* @remarks
|
|
1478
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1479
|
+
*/
|
|
1480
|
+
createDefaultOzoneConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1481
|
+
/**
|
|
1482
|
+
* Create a default RadonConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1483
|
+
*
|
|
1484
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1485
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Bqm3).
|
|
1486
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1487
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1488
|
+
*
|
|
1489
|
+
* @remarks
|
|
1490
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1491
|
+
* Apple Home doesn't support RadonConcentrationMeasurement cluster.
|
|
1492
|
+
*/
|
|
1493
|
+
createDefaultRadonConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1494
|
+
/**
|
|
1495
|
+
* Create a default NitrogenDioxideConcentrationMeasurement cluster server with feature NumericMeasurement.
|
|
1496
|
+
*
|
|
1497
|
+
* @param {number | null} measuredValue - The measured value of the concentration.
|
|
1498
|
+
* @param {ConcentrationMeasurement.MeasurementUnit} measurementUnit - The unit of measurement (default to ConcentrationMeasurement.MeasurementUnit.Ugm3).
|
|
1499
|
+
* @param {ConcentrationMeasurement.MeasurementMedium} measurementMedium - The unit of measurement (default to ConcentrationMeasurement.MeasurementMedium.Air).
|
|
1500
|
+
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
|
|
1501
|
+
*
|
|
1502
|
+
* @remarks
|
|
1503
|
+
* The measurementUnit and the measurementMedium attributes are fixed and cannot be changed after creation.
|
|
1504
|
+
*/
|
|
1505
|
+
createDefaultNitrogenDioxideConcentrationMeasurementClusterServer(measuredValue?: number | null, measurementUnit?: ConcentrationMeasurement.MeasurementUnit, measurementMedium?: ConcentrationMeasurement.MeasurementMedium): this;
|
|
1506
|
+
}
|
|
1507
|
+
//# sourceMappingURL=matterbridgeEndpoint.d.ts.map
|