matterbridge 1.2.9 → 1.2.11
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/CHANGELOG.md +31 -0
- package/README.md +98 -5
- package/dist/matterbridge.d.ts +6 -2
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +86 -73
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeDevice.d.ts +19 -45
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +91 -51
- package/dist/matterbridgeDevice.js.map +1 -1
- package/frontend/build/asset-manifest.json +6 -6
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/css/main.1880392b.css +2 -0
- package/frontend/build/static/css/main.1880392b.css.map +1 -0
- package/frontend/build/static/js/{main.cf64bc64.js → main.60e6f24a.js} +3 -3
- package/frontend/build/static/js/main.60e6f24a.js.map +1 -0
- package/package.json +7 -3
- package/frontend/build/static/css/main.4c325919.css +0 -2
- package/frontend/build/static/css/main.4c325919.css.map +0 -1
- package/frontend/build/static/js/main.cf64bc64.js.map +0 -1
- /package/frontend/build/static/js/{main.cf64bc64.js.LICENSE.txt → main.60e6f24a.js.LICENSE.txt} +0 -0
|
@@ -62,7 +62,7 @@ export interface SerializedMatterbridgeDevice {
|
|
|
62
62
|
deviceName: string;
|
|
63
63
|
serialNumber: string;
|
|
64
64
|
uniqueId: string;
|
|
65
|
-
|
|
65
|
+
deviceTypes: AtLeastOne<DeviceTypeDefinition>;
|
|
66
66
|
endpoint: EndpointNumber | undefined;
|
|
67
67
|
endpointName: string;
|
|
68
68
|
clusterServersId: ClusterId[];
|
|
@@ -91,7 +91,7 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
91
91
|
* @param {DeviceTypeDefinition} definition - The DeviceTypeDefinition of the device.
|
|
92
92
|
* @returns MatterbridgeDevice instance.
|
|
93
93
|
*/
|
|
94
|
-
static loadInstance(definition: DeviceTypeDefinition): Promise<MatterbridgeDevice>;
|
|
94
|
+
static loadInstance(definition: DeviceTypeDefinition, options: EndpointOptions): Promise<MatterbridgeDevice>;
|
|
95
95
|
/**
|
|
96
96
|
* Adds a device type to the list of device types.
|
|
97
97
|
* If the device type is not already present in the list, it will be added.
|
|
@@ -99,6 +99,20 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
99
99
|
* @param {DeviceTypeDefinition} deviceType - The device type to add.
|
|
100
100
|
*/
|
|
101
101
|
addDeviceType(deviceType: DeviceTypeDefinition): void;
|
|
102
|
+
/**
|
|
103
|
+
* Adds one or more device types with the required cluster servers and the specified cluster servers.
|
|
104
|
+
*
|
|
105
|
+
* @param {AtLeastOne<DeviceTypeDefinition>} deviceTypes - The device types to add.
|
|
106
|
+
* @param {ClusterId[]} includeServerList - The list of cluster IDs to include.
|
|
107
|
+
*/
|
|
108
|
+
addDeviceTypeWithClusterServer(deviceTypes: AtLeastOne<DeviceTypeDefinition>, includeServerList: ClusterId[]): void;
|
|
109
|
+
/**
|
|
110
|
+
* Adds a child device type with cluster server.
|
|
111
|
+
*
|
|
112
|
+
* @param {AtLeastOne<DeviceTypeDefinition>} deviceTypes - The device types to add.
|
|
113
|
+
* @param {ClusterId[]} includeServerList - The list of cluster IDs to include.
|
|
114
|
+
* @returns {Endpoint} - The child endpoint that was added.
|
|
115
|
+
*/
|
|
102
116
|
addChildDeviceTypeWithClusterServer(deviceTypes: AtLeastOne<DeviceTypeDefinition>, includeServerList: ClusterId[]): Endpoint;
|
|
103
117
|
/**
|
|
104
118
|
* Serializes the Matterbridge device into a serialized object.
|
|
@@ -142,24 +156,12 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
142
156
|
readonly eveDoor: import("@project-chip/matter.js/schema").BitFlag;
|
|
143
157
|
readonly eveMotion: import("@project-chip/matter.js/schema").BitFlag;
|
|
144
158
|
readonly eveEnergy: import("@project-chip/matter.js/schema").BitFlag;
|
|
145
|
-
/**
|
|
146
|
-
* Creates a room Eve History Cluster Server.
|
|
147
|
-
*
|
|
148
|
-
* @param history - The MatterHistory object.
|
|
149
|
-
* @param log - The AnsiLogger object.
|
|
150
|
-
*/
|
|
151
159
|
readonly eveWeather: import("@project-chip/matter.js/schema").BitFlag;
|
|
152
160
|
readonly eveRoom: import("@project-chip/matter.js/schema").BitFlag;
|
|
153
|
-
}>>, "ConfigDataGet" | "ConfigDataSet" | "HistoryStatus" | "HistoryEntries" | "HistoryRequest" | "HistorySetTime" | "
|
|
161
|
+
}>>, "ConfigDataGet" | "ConfigDataSet" | "HistoryStatus" | "HistoryEntries" | "HistoryRequest" | "HistorySetTime" | "LastEvent" | "TimesOpened" | "ResetTotal" | "RLoc" | "MotionSensitivity" | "Voltage" | "Current" | "Consumption" | "TotalConsumption" | "EnergyUnknown" | "ChildLock" | "Elevation" | "AirPressure" | "WeatherTrend" | "TemperatureDisplayUnits" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
154
162
|
readonly eveDoor: import("@project-chip/matter.js/schema").BitFlag;
|
|
155
163
|
readonly eveMotion: import("@project-chip/matter.js/schema").BitFlag;
|
|
156
164
|
readonly eveEnergy: import("@project-chip/matter.js/schema").BitFlag;
|
|
157
|
-
/**
|
|
158
|
-
* Creates a room Eve History Cluster Server.
|
|
159
|
-
*
|
|
160
|
-
* @param history - The MatterHistory object.
|
|
161
|
-
* @param log - The AnsiLogger object.
|
|
162
|
-
*/
|
|
163
165
|
readonly eveWeather: import("@project-chip/matter.js/schema").BitFlag;
|
|
164
166
|
readonly eveRoom: import("@project-chip/matter.js/schema").BitFlag;
|
|
165
167
|
}>> & Omit<{
|
|
@@ -178,16 +180,10 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
178
180
|
readonly EnergyUnknown: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number, any>;
|
|
179
181
|
readonly ChildLock: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<boolean, any>;
|
|
180
182
|
readonly RLoc: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
181
|
-
}, "ConfigDataGet" | "ConfigDataSet" | "HistoryStatus" | "HistoryEntries" | "HistoryRequest" | "HistorySetTime" | "
|
|
183
|
+
}, "ConfigDataGet" | "ConfigDataSet" | "HistoryStatus" | "HistoryEntries" | "HistoryRequest" | "HistorySetTime" | "LastEvent" | "TimesOpened" | "ResetTotal" | "RLoc" | "MotionSensitivity" | "Voltage" | "Current" | "Consumption" | "TotalConsumption" | "EnergyUnknown" | "ChildLock" | "Elevation" | "AirPressure" | "WeatherTrend" | "TemperatureDisplayUnits" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
182
184
|
readonly eveDoor: import("@project-chip/matter.js/schema").BitFlag;
|
|
183
185
|
readonly eveMotion: import("@project-chip/matter.js/schema").BitFlag;
|
|
184
186
|
readonly eveEnergy: import("@project-chip/matter.js/schema").BitFlag;
|
|
185
|
-
/**
|
|
186
|
-
* Creates a room Eve History Cluster Server.
|
|
187
|
-
*
|
|
188
|
-
* @param history - The MatterHistory object.
|
|
189
|
-
* @param log - The AnsiLogger object.
|
|
190
|
-
*/
|
|
191
187
|
readonly eveWeather: import("@project-chip/matter.js/schema").BitFlag;
|
|
192
188
|
readonly eveRoom: import("@project-chip/matter.js/schema").BitFlag;
|
|
193
189
|
}>> & Omit<import("@project-chip/matter-node.js/util").Merge<{
|
|
@@ -216,24 +212,12 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
216
212
|
readonly eveDoor: import("@project-chip/matter.js/schema").BitFlag;
|
|
217
213
|
readonly eveMotion: import("@project-chip/matter.js/schema").BitFlag;
|
|
218
214
|
readonly eveEnergy: import("@project-chip/matter.js/schema").BitFlag;
|
|
219
|
-
/**
|
|
220
|
-
* Creates a room Eve History Cluster Server.
|
|
221
|
-
*
|
|
222
|
-
* @param history - The MatterHistory object.
|
|
223
|
-
* @param log - The AnsiLogger object.
|
|
224
|
-
*/
|
|
225
215
|
readonly eveWeather: import("@project-chip/matter.js/schema").BitFlag;
|
|
226
216
|
readonly eveRoom: import("@project-chip/matter.js/schema").BitFlag;
|
|
227
|
-
}>>, "ConfigDataGet" | "ConfigDataSet" | "HistoryStatus" | "HistoryEntries" | "HistoryRequest" | "HistorySetTime" | "
|
|
217
|
+
}>>, "ConfigDataGet" | "ConfigDataSet" | "HistoryStatus" | "HistoryEntries" | "HistoryRequest" | "HistorySetTime" | "LastEvent" | "TimesOpened" | "ResetTotal" | "RLoc" | "MotionSensitivity" | "Voltage" | "Current" | "Consumption" | "TotalConsumption" | "EnergyUnknown" | "ChildLock" | "Elevation" | "AirPressure" | "WeatherTrend" | "TemperatureDisplayUnits" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
228
218
|
readonly eveDoor: import("@project-chip/matter.js/schema").BitFlag;
|
|
229
219
|
readonly eveMotion: import("@project-chip/matter.js/schema").BitFlag;
|
|
230
220
|
readonly eveEnergy: import("@project-chip/matter.js/schema").BitFlag;
|
|
231
|
-
/**
|
|
232
|
-
* Creates a room Eve History Cluster Server.
|
|
233
|
-
*
|
|
234
|
-
* @param history - The MatterHistory object.
|
|
235
|
-
* @param log - The AnsiLogger object.
|
|
236
|
-
*/
|
|
237
221
|
readonly eveWeather: import("@project-chip/matter.js/schema").BitFlag;
|
|
238
222
|
readonly eveRoom: import("@project-chip/matter.js/schema").BitFlag;
|
|
239
223
|
}>>, Pick<{}, never> & Omit<{}, never>>;
|
|
@@ -841,11 +825,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
841
825
|
liftMovementReversed: import("@project-chip/matter.js/schema").BitFlag;
|
|
842
826
|
liftPositionAware: import("@project-chip/matter.js/schema").BitFlag;
|
|
843
827
|
tiltPositionAware: import("@project-chip/matter.js/schema").BitFlag;
|
|
844
|
-
/**
|
|
845
|
-
* Creates a default Pressure Measurement Cluster Server.
|
|
846
|
-
*
|
|
847
|
-
* @param measuredValue - The measured value for the pressure.
|
|
848
|
-
*/
|
|
849
828
|
liftEncoderControlled: import("@project-chip/matter.js/schema").BitFlag;
|
|
850
829
|
tiltEncoderControlled: import("@project-chip/matter.js/schema").BitFlag;
|
|
851
830
|
}>, any>;
|
|
@@ -906,11 +885,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
906
885
|
liftMovementReversed: import("@project-chip/matter.js/schema").BitFlag;
|
|
907
886
|
liftPositionAware: import("@project-chip/matter.js/schema").BitFlag;
|
|
908
887
|
tiltPositionAware: import("@project-chip/matter.js/schema").BitFlag;
|
|
909
|
-
/**
|
|
910
|
-
* Creates a default Pressure Measurement Cluster Server.
|
|
911
|
-
*
|
|
912
|
-
* @param measuredValue - The measured value for the pressure.
|
|
913
|
-
*/
|
|
914
888
|
liftEncoderControlled: import("@project-chip/matter.js/schema").BitFlag;
|
|
915
889
|
tiltEncoderControlled: import("@project-chip/matter.js/schema").BitFlag;
|
|
916
890
|
}>, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterbridgeDevice.d.ts","sourceRoot":"","sources":["../src/matterbridgeDevice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAML,qBAAqB,EACrB,YAAY,EAEZ,QAAQ,EAOR,QAAQ,EAIR,YAAY,EAEZ,gBAAgB,EAEhB,KAAK,EAEL,WAAW,EAYX,UAAU,EAIV,QAAQ,EAER,cAAc,EAKf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAiB,oBAAoB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC7H,OAAO,EAAE,UAAU,EAA8B,MAAM,mCAAmC,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAsD,MAAM,gBAAgB,CAAC;AAGnG,OAAO,EAAE,UAAU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AInF;;;;OAIG;IACH,sCAAsC,CAAC,aAAa,GAAE,MAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYhE;;;;OAIG;IACH,yCAAyC,CAAC,aAAa,GAAE,MAAU;IAInE;;;;;;;OAOG;IACH,iCAAiC,CAAC,gBAAgB,GAAE,MAAW,EAAE,uBAAuB,GAAE,MAAW,EAAE,uBAAuB,GAAE,MAAW,EAAE,mBAAmB,GAAE,MAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+B5K;;;;;;;OAOG;IACH,oCAAoC,CAAC,gBAAgB,GAAE,MAAW,EAAE,uBAAuB,GAAE,MAAW,EAAE,uBAAuB,GAAE,MAAW,EAAE,mBAAmB,GAAE,MAAU;IAI/K;;OAEG;IACH,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0B/B;;OAEG;IACH,kCAAkC;CAGnC"}
|
|
@@ -26,7 +26,7 @@ import { Device, DeviceClasses, DeviceTypeDefinition, Endpoint } from '@project-
|
|
|
26
26
|
import { extendPublicHandlerMethods } from '@project-chip/matter-node.js/util';
|
|
27
27
|
import { EveHistory, EveHistoryCluster } from 'matter-history';
|
|
28
28
|
import { AirQuality, AirQualityCluster } from './AirQualityCluster.js';
|
|
29
|
-
import { AnsiLogger } from 'node-ansi-logger';
|
|
29
|
+
import { AnsiLogger, db, hk, zb } from 'node-ansi-logger';
|
|
30
30
|
import { createHash } from 'crypto';
|
|
31
31
|
import { TvocMeasurement, TvocMeasurementCluster } from './TvocCluster.js';
|
|
32
32
|
// Custom device types
|
|
@@ -84,8 +84,8 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
84
84
|
* @param {DeviceTypeDefinition} definition - The DeviceTypeDefinition of the device.
|
|
85
85
|
* @returns MatterbridgeDevice instance.
|
|
86
86
|
*/
|
|
87
|
-
static async loadInstance(definition) {
|
|
88
|
-
return new MatterbridgeDevice(definition);
|
|
87
|
+
static async loadInstance(definition, options) {
|
|
88
|
+
return new MatterbridgeDevice(definition, options);
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Adds a device type to the list of device types.
|
|
@@ -100,58 +100,98 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
100
100
|
this.setDeviceTypes(deviceTypes);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Adds one or more device types with the required cluster servers and the specified cluster servers.
|
|
105
|
+
*
|
|
106
|
+
* @param {AtLeastOne<DeviceTypeDefinition>} deviceTypes - The device types to add.
|
|
107
|
+
* @param {ClusterId[]} includeServerList - The list of cluster IDs to include.
|
|
108
|
+
*/
|
|
109
|
+
addDeviceTypeWithClusterServer(deviceTypes, includeServerList) {
|
|
110
|
+
this.log.debug('addDeviceTypeWithClusterServer:');
|
|
111
|
+
deviceTypes.forEach((deviceType) => {
|
|
112
|
+
this.addDeviceType(deviceType);
|
|
113
|
+
this.log.debug(`- with deviceType: ${zb}${deviceType.code}${db}-${zb}${deviceType.name}${db}`);
|
|
114
|
+
deviceType.requiredServerClusters.forEach((clusterId) => {
|
|
115
|
+
if (!includeServerList.includes(clusterId))
|
|
116
|
+
includeServerList.push(clusterId);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
includeServerList.forEach((clusterId) => {
|
|
120
|
+
this.log.debug(`- with cluster: ${hk}${clusterId}${db}-${hk}${getClusterNameById(clusterId)}${db}`);
|
|
121
|
+
});
|
|
122
|
+
if (includeServerList.includes(Identify.Cluster.id))
|
|
123
|
+
this.addClusterServer(this.getDefaultIdentifyClusterServer());
|
|
124
|
+
if (includeServerList.includes(Groups.Cluster.id))
|
|
125
|
+
this.addClusterServer(this.getDefaultGroupsClusterServer());
|
|
126
|
+
if (includeServerList.includes(Scenes.Cluster.id))
|
|
127
|
+
this.addClusterServer(this.getDefaultScenesClusterServer());
|
|
128
|
+
if (includeServerList.includes(OnOff.Cluster.id))
|
|
129
|
+
this.addClusterServer(this.getDefaultOnOffClusterServer());
|
|
130
|
+
if (includeServerList.includes(TemperatureMeasurement.Cluster.id))
|
|
131
|
+
this.addClusterServer(this.getDefaultTemperatureMeasurementClusterServer());
|
|
132
|
+
if (includeServerList.includes(RelativeHumidityMeasurement.Cluster.id))
|
|
133
|
+
this.addClusterServer(this.getDefaultRelativeHumidityMeasurementClusterServer());
|
|
134
|
+
if (includeServerList.includes(PressureMeasurement.Cluster.id))
|
|
135
|
+
this.addClusterServer(this.getDefaultPressureMeasurementClusterServer());
|
|
136
|
+
if (includeServerList.includes(FlowMeasurement.Cluster.id))
|
|
137
|
+
this.addClusterServer(this.getDefaultFlowMeasurementClusterServer());
|
|
138
|
+
if (includeServerList.includes(BooleanState.Cluster.id))
|
|
139
|
+
this.addClusterServer(this.getDefaultBooleanStateClusterServer());
|
|
140
|
+
if (includeServerList.includes(OccupancySensing.Cluster.id))
|
|
141
|
+
this.addClusterServer(this.getDefaultOccupancySensingClusterServer());
|
|
142
|
+
if (includeServerList.includes(IlluminanceMeasurement.Cluster.id))
|
|
143
|
+
this.addClusterServer(this.getDefaultIlluminanceMeasurementClusterServer());
|
|
144
|
+
if (includeServerList.includes(EveHistory.Cluster.id))
|
|
145
|
+
this.addClusterServer(this.getDefaultStaticEveHistoryClusterServer());
|
|
146
|
+
if (includeServerList.includes(ElectricalMeasurement.Cluster.id))
|
|
147
|
+
this.addClusterServer(this.getDefaultElectricalMeasurementClusterServer());
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Adds a child device type with cluster server.
|
|
151
|
+
*
|
|
152
|
+
* @param {AtLeastOne<DeviceTypeDefinition>} deviceTypes - The device types to add.
|
|
153
|
+
* @param {ClusterId[]} includeServerList - The list of cluster IDs to include.
|
|
154
|
+
* @returns {Endpoint} - The child endpoint that was added.
|
|
155
|
+
*/
|
|
103
156
|
addChildDeviceTypeWithClusterServer(deviceTypes, includeServerList) {
|
|
104
157
|
this.log.debug('addChildDeviceTypeWithClusterServer:');
|
|
105
158
|
const child = new Endpoint(deviceTypes);
|
|
106
159
|
deviceTypes.forEach((deviceType) => {
|
|
107
|
-
this.log.debug(`- with deviceType: ${deviceType.code}-${deviceType.name}`);
|
|
160
|
+
this.log.debug(`- with deviceType: ${zb}${deviceType.code}${db}-${zb}${deviceType.name}${db}`);
|
|
108
161
|
deviceType.requiredServerClusters.forEach((clusterId) => {
|
|
109
162
|
if (!includeServerList.includes(clusterId))
|
|
110
163
|
includeServerList.push(clusterId);
|
|
111
164
|
});
|
|
112
165
|
});
|
|
113
166
|
includeServerList.forEach((clusterId) => {
|
|
114
|
-
this.log.debug(`- with cluster: ${clusterId}-${getClusterNameById(clusterId)}`);
|
|
167
|
+
this.log.debug(`- with cluster: ${hk}${clusterId}${db}-${hk}${getClusterNameById(clusterId)}${db}`);
|
|
115
168
|
});
|
|
116
|
-
if (includeServerList.includes(Identify.Cluster.id))
|
|
169
|
+
if (includeServerList.includes(Identify.Cluster.id))
|
|
117
170
|
child.addClusterServer(this.getDefaultIdentifyClusterServer());
|
|
118
|
-
|
|
119
|
-
if (includeServerList.includes(Groups.Cluster.id)) {
|
|
171
|
+
if (includeServerList.includes(Groups.Cluster.id))
|
|
120
172
|
child.addClusterServer(this.getDefaultGroupsClusterServer());
|
|
121
|
-
|
|
122
|
-
if (includeServerList.includes(Scenes.Cluster.id)) {
|
|
173
|
+
if (includeServerList.includes(Scenes.Cluster.id))
|
|
123
174
|
child.addClusterServer(this.getDefaultScenesClusterServer());
|
|
124
|
-
|
|
125
|
-
if (includeServerList.includes(OnOff.Cluster.id)) {
|
|
175
|
+
if (includeServerList.includes(OnOff.Cluster.id))
|
|
126
176
|
child.addClusterServer(this.getDefaultOnOffClusterServer());
|
|
127
|
-
|
|
128
|
-
if (includeServerList.includes(TemperatureMeasurement.Cluster.id)) {
|
|
177
|
+
if (includeServerList.includes(TemperatureMeasurement.Cluster.id))
|
|
129
178
|
child.addClusterServer(this.getDefaultTemperatureMeasurementClusterServer());
|
|
130
|
-
|
|
131
|
-
if (includeServerList.includes(RelativeHumidityMeasurement.Cluster.id)) {
|
|
179
|
+
if (includeServerList.includes(RelativeHumidityMeasurement.Cluster.id))
|
|
132
180
|
child.addClusterServer(this.getDefaultRelativeHumidityMeasurementClusterServer());
|
|
133
|
-
|
|
134
|
-
if (includeServerList.includes(PressureMeasurement.Cluster.id)) {
|
|
181
|
+
if (includeServerList.includes(PressureMeasurement.Cluster.id))
|
|
135
182
|
child.addClusterServer(this.getDefaultPressureMeasurementClusterServer());
|
|
136
|
-
|
|
137
|
-
if (includeServerList.includes(FlowMeasurement.Cluster.id)) {
|
|
183
|
+
if (includeServerList.includes(FlowMeasurement.Cluster.id))
|
|
138
184
|
child.addClusterServer(this.getDefaultFlowMeasurementClusterServer());
|
|
139
|
-
|
|
140
|
-
if (includeServerList.includes(BooleanState.Cluster.id)) {
|
|
185
|
+
if (includeServerList.includes(BooleanState.Cluster.id))
|
|
141
186
|
child.addClusterServer(this.getDefaultBooleanStateClusterServer());
|
|
142
|
-
|
|
143
|
-
if (includeServerList.includes(OccupancySensing.Cluster.id)) {
|
|
187
|
+
if (includeServerList.includes(OccupancySensing.Cluster.id))
|
|
144
188
|
child.addClusterServer(this.getDefaultOccupancySensingClusterServer());
|
|
145
|
-
|
|
146
|
-
if (includeServerList.includes(IlluminanceMeasurement.Cluster.id)) {
|
|
189
|
+
if (includeServerList.includes(IlluminanceMeasurement.Cluster.id))
|
|
147
190
|
child.addClusterServer(this.getDefaultIlluminanceMeasurementClusterServer());
|
|
148
|
-
|
|
149
|
-
if (includeServerList.includes(EveHistory.Cluster.id) && !this.hasClusterServer(EveHistory.Complete)) {
|
|
191
|
+
if (includeServerList.includes(EveHistory.Cluster.id) && !this.hasClusterServer(EveHistory.Complete))
|
|
150
192
|
child.addClusterServer(this.getDefaultStaticEveHistoryClusterServer());
|
|
151
|
-
|
|
152
|
-
if (includeServerList.includes(ElectricalMeasurement.Cluster.id) && !this.hasClusterServer(ElectricalMeasurement.Complete)) {
|
|
193
|
+
if (includeServerList.includes(ElectricalMeasurement.Cluster.id) && !this.hasClusterServer(ElectricalMeasurement.Complete))
|
|
153
194
|
child.addClusterServer(this.getDefaultElectricalMeasurementClusterServer());
|
|
154
|
-
}
|
|
155
195
|
this.addChildEndpoint(child);
|
|
156
196
|
return child;
|
|
157
197
|
}
|
|
@@ -167,7 +207,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
167
207
|
serialNumber: this.serialNumber,
|
|
168
208
|
deviceName: this.deviceName,
|
|
169
209
|
uniqueId: this.uniqueId,
|
|
170
|
-
|
|
210
|
+
deviceTypes: this.getDeviceTypes(),
|
|
171
211
|
endpoint: this.number,
|
|
172
212
|
endpointName: this.name,
|
|
173
213
|
clusterServersId: [],
|
|
@@ -619,17 +659,17 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
619
659
|
dataModelRevision: 1,
|
|
620
660
|
location: 'XX',
|
|
621
661
|
vendorId: VendorId(vendorId),
|
|
622
|
-
vendorName: vendorName,
|
|
662
|
+
vendorName: vendorName.slice(0, 32),
|
|
623
663
|
productId: productId,
|
|
624
|
-
productName: productName,
|
|
625
|
-
productLabel: deviceName,
|
|
626
|
-
nodeLabel: deviceName,
|
|
627
|
-
serialNumber,
|
|
664
|
+
productName: productName.slice(0, 32),
|
|
665
|
+
productLabel: deviceName.slice(0, 64),
|
|
666
|
+
nodeLabel: deviceName.slice(0, 32),
|
|
667
|
+
serialNumber: serialNumber.slice(0, 32),
|
|
628
668
|
uniqueId: this.createUniqueId(deviceName, serialNumber, vendorName, productName),
|
|
629
669
|
softwareVersion,
|
|
630
|
-
softwareVersionString,
|
|
670
|
+
softwareVersionString: softwareVersionString.slice(0, 64),
|
|
631
671
|
hardwareVersion,
|
|
632
|
-
hardwareVersionString,
|
|
672
|
+
hardwareVersionString: hardwareVersionString.slice(0, 64),
|
|
633
673
|
reachable: true,
|
|
634
674
|
capabilityMinima: { caseSessionsPerFabric: 3, subscriptionsPerFabric: 3 },
|
|
635
675
|
}, {}, {
|
|
@@ -679,16 +719,16 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
679
719
|
getDefaultBridgedDeviceBasicInformationClusterServer(deviceName, serialNumber, vendorId, vendorName, productName, softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0') {
|
|
680
720
|
return ClusterServer(BridgedDeviceBasicInformationCluster, {
|
|
681
721
|
vendorId: vendorId !== undefined ? VendorId(vendorId) : undefined, // 4874
|
|
682
|
-
vendorName: vendorName,
|
|
683
|
-
productName: productName,
|
|
684
|
-
productLabel: deviceName,
|
|
685
|
-
nodeLabel: deviceName,
|
|
686
|
-
serialNumber,
|
|
722
|
+
vendorName: vendorName.slice(0, 32),
|
|
723
|
+
productName: productName.slice(0, 32),
|
|
724
|
+
productLabel: deviceName.slice(0, 64),
|
|
725
|
+
nodeLabel: deviceName.slice(0, 32),
|
|
726
|
+
serialNumber: serialNumber.slice(0, 32),
|
|
687
727
|
uniqueId: this.createUniqueId(deviceName, serialNumber, vendorName, productName),
|
|
688
728
|
softwareVersion,
|
|
689
|
-
softwareVersionString,
|
|
729
|
+
softwareVersionString: softwareVersionString.slice(0, 64),
|
|
690
730
|
hardwareVersion,
|
|
691
|
-
hardwareVersionString,
|
|
731
|
+
hardwareVersionString: hardwareVersionString.slice(0, 64),
|
|
692
732
|
reachable: true,
|
|
693
733
|
}, {}, {
|
|
694
734
|
reachableChanged: true,
|
|
@@ -1033,7 +1073,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1033
1073
|
});
|
|
1034
1074
|
}
|
|
1035
1075
|
// eslint-disable-next-line no-console
|
|
1036
|
-
console.log(`Set WindowCovering initial currentPositionLiftPercent100ths and targetPositionLiftPercent100ths to ${position} and operationalStatus to Stopped.`);
|
|
1076
|
+
// console.log(`Set WindowCovering initial currentPositionLiftPercent100ths and targetPositionLiftPercent100ths to ${position} and operationalStatus to Stopped.`);
|
|
1037
1077
|
}
|
|
1038
1078
|
}
|
|
1039
1079
|
/**
|
|
@@ -1054,7 +1094,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1054
1094
|
});
|
|
1055
1095
|
}
|
|
1056
1096
|
// eslint-disable-next-line no-console
|
|
1057
|
-
console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${current}, targetPositionLiftPercent100ths: ${target} and operationalStatus: ${status}.`);
|
|
1097
|
+
// console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${current}, targetPositionLiftPercent100ths: ${target} and operationalStatus: ${status}.`);
|
|
1058
1098
|
}
|
|
1059
1099
|
/**
|
|
1060
1100
|
* Sets the status of the window covering.
|
|
@@ -1066,7 +1106,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1066
1106
|
return;
|
|
1067
1107
|
windowCovering.setOperationalStatusAttribute({ global: status, lift: status, tilt: 0 });
|
|
1068
1108
|
// eslint-disable-next-line no-console
|
|
1069
|
-
console.log(`Set WindowCovering operationalStatus: ${status}`);
|
|
1109
|
+
// console.log(`Set WindowCovering operationalStatus: ${status}`);
|
|
1070
1110
|
}
|
|
1071
1111
|
/**
|
|
1072
1112
|
* Retrieves the status of the window covering.
|
|
@@ -1078,7 +1118,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1078
1118
|
return undefined;
|
|
1079
1119
|
const status = windowCovering.getOperationalStatusAttribute();
|
|
1080
1120
|
// eslint-disable-next-line no-console
|
|
1081
|
-
console.log(`Get WindowCovering operationalStatus: ${status.global}`);
|
|
1121
|
+
// console.log(`Get WindowCovering operationalStatus: ${status.global}`);
|
|
1082
1122
|
return status.global;
|
|
1083
1123
|
}
|
|
1084
1124
|
/**
|
|
@@ -1093,7 +1133,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1093
1133
|
windowCovering.setCurrentPositionLiftPercent100thsAttribute(position);
|
|
1094
1134
|
windowCovering.setTargetPositionLiftPercent100thsAttribute(position);
|
|
1095
1135
|
// eslint-disable-next-line no-console
|
|
1096
|
-
console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${position} and targetPositionLiftPercent100ths: ${position}.`);
|
|
1136
|
+
// console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${position} and targetPositionLiftPercent100ths: ${position}.`);
|
|
1097
1137
|
}
|
|
1098
1138
|
/**
|
|
1099
1139
|
* Get a default door lock cluster server.
|