matterbridge-test 0.0.6-dev.1 → 0.0.7
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 +10 -0
- package/dist/platform.d.ts +3 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +34 -85
- package/dist/platform.js.map +1 -1
- package/matterbridge-test.schema.json +16 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-mqtt and sponsoring it.
|
|
6
6
|
|
|
7
|
+
## [0.0.6] - 2024-09-04
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Update to Matter 1.3
|
|
12
|
+
|
|
13
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
14
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
15
|
+
</a>
|
|
16
|
+
|
|
7
17
|
## [0.0.4] - 2024-08-28
|
|
8
18
|
|
|
9
19
|
### Added
|
package/dist/platform.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { AnsiLogger } from 'matterbridge/logger';
|
|
|
3
3
|
export declare class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
4
4
|
private noDevices;
|
|
5
5
|
private delayStart;
|
|
6
|
+
private loadSwitches;
|
|
7
|
+
private loadOutlets;
|
|
8
|
+
private loadLights;
|
|
6
9
|
private throwLoad;
|
|
7
10
|
private throwStart;
|
|
8
11
|
private throwConfigure;
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,2BAA2B,EAC3B,cAAc,EAWf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,qBAAa,YAAa,SAAQ,2BAA2B;IAE3D,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,aAAa,CAAS;gBAElB,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc;IAoBhE,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCvC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAI1D"}
|
package/dist/platform.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BooleanStateConfiguration, ElectricalPowerMeasurement, ElectricalEnergyMeasurement, CarbonMonoxideConcentrationMeasurement, CarbonDioxideConcentrationMeasurement, NitrogenDioxideConcentrationMeasurement, OzoneConcentrationMeasurement, FormaldehydeConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm25ConcentrationMeasurement, Pm10ConcentrationMeasurement, RadonConcentrationMeasurement, TvocMeasurement, AirQuality, } from 'matterbridge/cluster';
|
|
1
|
+
import { MatterbridgeDevice, MatterbridgeDynamicPlatform, bridgedNode, electricalSensor, deviceEnergyManagement, ElectricalPowerMeasurement, ElectricalEnergyMeasurement, DeviceEnergyManagement, DeviceEnergyManagementMode, onOffSwitch, onOffLight, onOffOutlet, } from 'matterbridge';
|
|
3
2
|
import { waiter } from 'matterbridge/utils';
|
|
4
3
|
export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
5
4
|
// Config
|
|
6
5
|
noDevices = false;
|
|
7
6
|
delayStart = false;
|
|
7
|
+
loadSwitches = 0;
|
|
8
|
+
loadOutlets = 0;
|
|
9
|
+
loadLights = 0;
|
|
8
10
|
throwLoad = false;
|
|
9
11
|
throwStart = false;
|
|
10
12
|
throwConfigure = false;
|
|
@@ -16,6 +18,12 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
16
18
|
this.noDevices = config.noDevices;
|
|
17
19
|
if (config.delayStart)
|
|
18
20
|
this.delayStart = config.delayStart;
|
|
21
|
+
if (config.loadSwitches)
|
|
22
|
+
this.loadSwitches = config.loadSwitches;
|
|
23
|
+
if (config.loadOutlets)
|
|
24
|
+
this.loadOutlets = config.loadOutlets;
|
|
25
|
+
if (config.loadLights)
|
|
26
|
+
this.loadLights = config.loadLights;
|
|
19
27
|
if (config.throwLoad)
|
|
20
28
|
this.throwLoad = config.throwLoad;
|
|
21
29
|
if (config.throwStart)
|
|
@@ -36,96 +44,37 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
36
44
|
await waiter('Delay start', () => false, false, 20000, 1000);
|
|
37
45
|
if (this.config.longDelayStart)
|
|
38
46
|
await waiter('Delay start', () => false, false, 60000, 1000);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Pm1ConcentrationMeasurement.Cluster.id,
|
|
62
|
-
Pm25ConcentrationMeasurement.Cluster.id,
|
|
63
|
-
Pm10ConcentrationMeasurement.Cluster.id,
|
|
64
|
-
RadonConcentrationMeasurement.Cluster.id,
|
|
65
|
-
TvocMeasurement.Cluster.id,
|
|
66
|
-
]);
|
|
67
|
-
airQuality.getClusterServerById(AirQuality.Cluster.id)?.setAirQualityAttribute(AirQuality.AirQualityType.Good);
|
|
68
|
-
airQuality.getClusterServerById(TemperatureMeasurement.Cluster.id)?.setMeasuredValueAttribute(2150);
|
|
69
|
-
airQuality.getClusterServerById(RelativeHumidityMeasurement.Cluster.id)?.setMeasuredValueAttribute(5500);
|
|
70
|
-
if (!this.noDevices)
|
|
71
|
-
await this.registerDevice(airQuality);
|
|
72
|
-
const waterLeak = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
73
|
-
waterLeak.createDefaultBridgedDeviceBasicInformationClusterServer('Water leak detector', 'serial_98745631222', 0xfff1, 'Test plugin', 'waterLeakDetector', 2, '2.1.1');
|
|
74
|
-
waterLeak.addDeviceTypeWithClusterServer([waterLeakDetector], [BooleanStateConfiguration.Cluster.id]);
|
|
75
|
-
waterLeak.getClusterServerById(BooleanState.Cluster.id)?.setStateValueAttribute(false);
|
|
76
|
-
if (!this.noDevices)
|
|
77
|
-
await this.registerDevice(waterLeak);
|
|
78
|
-
const waterFreeze = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
79
|
-
waterFreeze.createDefaultBridgedDeviceBasicInformationClusterServer('Water freeze detector', 'serial_98745631223', 0xfff1, 'Test plugin', 'waterFreezeDetector', 2, '2.1.1');
|
|
80
|
-
waterFreeze.addDeviceTypeWithClusterServer([waterFreezeDetector], [BooleanStateConfiguration.Cluster.id]);
|
|
81
|
-
waterFreeze.getClusterServerById(BooleanState.Cluster.id)?.setStateValueAttribute(false);
|
|
82
|
-
if (!this.noDevices)
|
|
83
|
-
await this.registerDevice(waterFreeze);
|
|
84
|
-
const rain = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
85
|
-
rain.createDefaultBridgedDeviceBasicInformationClusterServer('Rain sensor', 'serial_98745631224', 0xfff1, 'Test plugin', 'rainSensor', 2, '2.1.1');
|
|
86
|
-
rain.addDeviceTypeWithClusterServer([rainSensor], [BooleanStateConfiguration.Cluster.id]);
|
|
87
|
-
rain.getClusterServerById(BooleanState.Cluster.id)?.setStateValueAttribute(false);
|
|
88
|
-
if (!this.noDevices)
|
|
89
|
-
await this.registerDevice(rain);
|
|
90
|
-
const smoke = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
91
|
-
smoke.createDefaultBridgedDeviceBasicInformationClusterServer('Smoke alarm sensor', 'serial_98745631225', 0xfff1, 'Test plugin', 'smokeCoAlarm', 2, '2.1.1');
|
|
92
|
-
smoke.addDeviceTypeWithClusterServer([smokeCoAlarm], [CarbonMonoxideConcentrationMeasurement.Cluster.id]);
|
|
93
|
-
if (!this.noDevices)
|
|
94
|
-
await this.registerDevice(smoke);
|
|
95
|
-
const electrical = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
47
|
+
for (let i = 0; i < this.loadSwitches; i++) {
|
|
48
|
+
const switchDevice = new MatterbridgeDevice([onOffSwitch, bridgedNode], undefined, this.config.debug);
|
|
49
|
+
switchDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Switch ' + i, 'serial_switch_' + i, 0xfff1, 'Test plugin', 'Matterbridge');
|
|
50
|
+
switchDevice.addDeviceTypeWithClusterServer([onOffSwitch], []);
|
|
51
|
+
if (!this.noDevices)
|
|
52
|
+
await this.registerDevice(switchDevice);
|
|
53
|
+
}
|
|
54
|
+
for (let i = 0; i < this.loadOutlets; i++) {
|
|
55
|
+
const outletDevice = new MatterbridgeDevice([onOffOutlet, bridgedNode], undefined, this.config.debug);
|
|
56
|
+
outletDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Outlet ' + i, 'serial_outlet_' + i, 0xfff1, 'Test plugin', 'Matterbridge');
|
|
57
|
+
outletDevice.addDeviceTypeWithClusterServer([onOffOutlet], []);
|
|
58
|
+
if (!this.noDevices)
|
|
59
|
+
await this.registerDevice(outletDevice);
|
|
60
|
+
}
|
|
61
|
+
for (let i = 0; i < this.loadLights; i++) {
|
|
62
|
+
const lightDevice = new MatterbridgeDevice([onOffLight, bridgedNode], undefined, this.config.debug);
|
|
63
|
+
lightDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Light ' + i, 'serial_light_' + i, 0xfff1, 'Test plugin', 'Matterbridge');
|
|
64
|
+
lightDevice.addDeviceTypeWithClusterServer([onOffLight], []);
|
|
65
|
+
if (!this.noDevices)
|
|
66
|
+
await this.registerDevice(lightDevice);
|
|
67
|
+
}
|
|
68
|
+
const electrical = new MatterbridgeDevice([electricalSensor, bridgedNode], undefined, this.config.debug);
|
|
96
69
|
electrical.createDefaultBridgedDeviceBasicInformationClusterServer('Electrical sensor', 'serial_98745631226', 0xfff1, 'Test plugin', 'electricalSensor', 2, '2.1.1');
|
|
97
70
|
electrical.addDeviceTypeWithClusterServer([electricalSensor], [ElectricalPowerMeasurement.Cluster.id, ElectricalEnergyMeasurement.Cluster.id]);
|
|
98
71
|
if (!this.noDevices)
|
|
99
72
|
await this.registerDevice(electrical);
|
|
100
|
-
const energy = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
73
|
+
const energy = new MatterbridgeDevice([deviceEnergyManagement, bridgedNode], undefined, this.config.debug);
|
|
101
74
|
energy.createDefaultBridgedDeviceBasicInformationClusterServer('Device Energy Management', 'serial_98745631227', 0xfff1, 'Test plugin', 'deviceEnergyManagement', 2, '2.1.1');
|
|
102
|
-
energy.addDeviceTypeWithClusterServer([deviceEnergyManagement], []);
|
|
75
|
+
energy.addDeviceTypeWithClusterServer([deviceEnergyManagement], [DeviceEnergyManagement.Cluster.id, DeviceEnergyManagementMode.Cluster.id]);
|
|
103
76
|
if (!this.noDevices)
|
|
104
77
|
await this.registerDevice(energy);
|
|
105
|
-
const fan = new MatterbridgeDevice(bridgedNode, undefined, this.config.debug);
|
|
106
|
-
fan.createDefaultBridgedDeviceBasicInformationClusterServer('Fan', 'serial_98745631228', 0xfff1, 'Test plugin', 'Test fan device', 2, '2.1.1');
|
|
107
|
-
fan.addDeviceTypeWithClusterServer([DeviceTypes.FAN], []);
|
|
108
|
-
if (!this.noDevices)
|
|
109
|
-
await this.registerDevice(fan);
|
|
110
|
-
const fcc = fan.getClusterServer(FanControlCluster.with(FanControl.Feature.MultiSpeed, FanControl.Feature.Auto));
|
|
111
|
-
if (fcc) {
|
|
112
|
-
const fanModeLookup = ['Off', 'Low', 'Medium', 'High', 'On', 'Auto', 'Smart'];
|
|
113
|
-
fcc.subscribeFanModeAttribute((newValue, oldValue) => {
|
|
114
|
-
this.log.info(`Fan mode changed from ${fanModeLookup[oldValue]} to ${fanModeLookup[newValue]}`);
|
|
115
|
-
});
|
|
116
|
-
fcc.subscribePercentSettingAttribute((newValue, oldValue) => {
|
|
117
|
-
this.log.info(`Percent setting changed from ${oldValue} to ${newValue}`);
|
|
118
|
-
});
|
|
119
|
-
fcc.subscribePercentCurrentAttribute((newValue, oldValue) => {
|
|
120
|
-
this.log.info(`Percent current changed from ${oldValue} to ${newValue}`);
|
|
121
|
-
});
|
|
122
|
-
fcc.subscribeSpeedSettingAttribute((newValue, oldValue) => {
|
|
123
|
-
this.log.info(`Speed setting changed from ${oldValue} to ${newValue}`);
|
|
124
|
-
});
|
|
125
|
-
fcc.subscribeSpeedCurrentAttribute((newValue, oldValue) => {
|
|
126
|
-
this.log.info(`Speed current changed from ${oldValue} to ${newValue}`);
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
78
|
}
|
|
130
79
|
async onConfigure() {
|
|
131
80
|
this.log.info('onConfigure called');
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EA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W;QACxB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACpC,IAAI,IAAI,CAAC,cAAc;YAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC1E,CAAC;IAEQ,KAAK,CAAC,UAAU,CAAC,MAAe;QACvC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gCAAgC,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC;QAClE,IAAI,IAAI,CAAC,aAAa;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -28,6 +28,21 @@
|
|
|
28
28
|
"type": "boolean",
|
|
29
29
|
"default": false
|
|
30
30
|
},
|
|
31
|
+
"loadSwitches": {
|
|
32
|
+
"description": "Load a defined number of switches (development only)",
|
|
33
|
+
"type": "number",
|
|
34
|
+
"default": 1
|
|
35
|
+
},
|
|
36
|
+
"loadOutlets": {
|
|
37
|
+
"description": "Load a defined number of outlets (development only)",
|
|
38
|
+
"type": "number",
|
|
39
|
+
"default": 1
|
|
40
|
+
},
|
|
41
|
+
"loadLights": {
|
|
42
|
+
"description": "Load a defined number of lights (development only)",
|
|
43
|
+
"type": "number",
|
|
44
|
+
"default": 1
|
|
45
|
+
},
|
|
31
46
|
"throwLoad": {
|
|
32
47
|
"description": "Throw on load (development only)",
|
|
33
48
|
"type": "boolean",
|
|
@@ -59,4 +74,4 @@
|
|
|
59
74
|
"default": false
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
|
-
}
|
|
77
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-test",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Matterbridge test plugin",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@eslint/js": "^9.9.1",
|
|
81
81
|
"@types/eslint__js": "^8.42.3",
|
|
82
82
|
"@types/jest": "^29.5.12",
|
|
83
|
-
"@types/node": "^22.5.
|
|
83
|
+
"@types/node": "^22.5.3",
|
|
84
84
|
"eslint": "^9.9.1",
|
|
85
85
|
"eslint-config-prettier": "^9.1.0",
|
|
86
|
-
"eslint-plugin-jest": "^28.8.
|
|
86
|
+
"eslint-plugin-jest": "^28.8.2",
|
|
87
87
|
"eslint-plugin-prettier": "^5.2.1",
|
|
88
88
|
"install": "^0.13.0",
|
|
89
89
|
"jest": "^29.7.0",
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"rimraf": "^6.0.1",
|
|
92
92
|
"ts-jest": "^29.2.5",
|
|
93
93
|
"typescript": "^5.5.4",
|
|
94
|
-
"typescript-eslint": "^8.
|
|
94
|
+
"typescript-eslint": "^8.4.0"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"node-ansi-logger": "^3.0.0",
|
|
98
98
|
"node-persist-manager": "^1.0.8"
|
|
99
99
|
}
|
|
100
|
-
}
|
|
100
|
+
}
|