matterbridge-test 0.0.13 → 0.0.15
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 +20 -0
- package/dist/platform.d.ts +7 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +58 -13
- package/dist/platform.js.map +1 -1
- package/matterbridge-test.schema.json +15 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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.14] - 2024-09-06
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed unit of measurements for ElectricalPowerMeasurementCluster and ElectricalEnergyMeasurementCluster.
|
|
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
|
+
|
|
17
|
+
## [0.0.13] - 2024-09-05
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Update to Matter 1.3
|
|
22
|
+
|
|
23
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
24
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
25
|
+
</a>
|
|
26
|
+
|
|
7
27
|
## [0.0.12] - 2024-09-04
|
|
8
28
|
|
|
9
29
|
### Added
|
package/dist/platform.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Matterbridge, MatterbridgeDynamicPlatform, PlatformConfig } from 'matterbridge';
|
|
1
|
+
import { Matterbridge, MatterbridgeDevice, MatterbridgeDynamicPlatform, PlatformConfig } from 'matterbridge';
|
|
2
2
|
import { AnsiLogger } from 'matterbridge/logger';
|
|
3
3
|
export declare class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
4
4
|
private noDevices;
|
|
@@ -10,8 +10,14 @@ export declare class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
10
10
|
private throwStart;
|
|
11
11
|
private throwConfigure;
|
|
12
12
|
private throwShutdown;
|
|
13
|
+
private enableElectrical;
|
|
14
|
+
private enableModeSelect;
|
|
15
|
+
private enablePowerSource;
|
|
13
16
|
constructor(matterbridge: Matterbridge, log: AnsiLogger, config: PlatformConfig);
|
|
14
17
|
onStart(reason?: string): Promise<void>;
|
|
18
|
+
addElectricalMeasurements(device: MatterbridgeDevice): void;
|
|
19
|
+
addModeSelect(device: MatterbridgeDevice, description: string): void;
|
|
20
|
+
addPowerSource(device: MatterbridgeDevice): void;
|
|
15
21
|
onConfigure(): Promise<void>;
|
|
16
22
|
onShutdown(reason?: string): Promise<void>;
|
|
17
23
|
}
|
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,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,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;IAC9B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc;IAuBhE,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8DtD,yBAAyB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAQ3D,aAAa,CAAC,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAcpE,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAIjC,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,4 +1,4 @@
|
|
|
1
|
-
import { MatterbridgeDevice, MatterbridgeDynamicPlatform, bridgedNode, electricalSensor,
|
|
1
|
+
import { MatterbridgeDevice, MatterbridgeDynamicPlatform, bridgedNode, electricalSensor, ElectricalPowerMeasurement, ElectricalEnergyMeasurement, onOffSwitch, onOffLight, onOffOutlet, ElectricalPowerMeasurementCluster, ElectricalEnergyMeasurementCluster, PowerSource, } from 'matterbridge';
|
|
2
2
|
import { waiter } from 'matterbridge/utils';
|
|
3
3
|
export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
4
4
|
// Config
|
|
@@ -11,6 +11,9 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
11
11
|
throwStart = false;
|
|
12
12
|
throwConfigure = false;
|
|
13
13
|
throwShutdown = false;
|
|
14
|
+
enableElectrical = false;
|
|
15
|
+
enableModeSelect = false;
|
|
16
|
+
enablePowerSource = false;
|
|
14
17
|
constructor(matterbridge, log, config) {
|
|
15
18
|
super(matterbridge, log, config);
|
|
16
19
|
this.log.info('Initializing platform:', this.config.name);
|
|
@@ -18,6 +21,12 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
18
21
|
this.noDevices = config.noDevices;
|
|
19
22
|
if (config.delayStart)
|
|
20
23
|
this.delayStart = config.delayStart;
|
|
24
|
+
if (config.enableElectrical)
|
|
25
|
+
this.enableElectrical = config.enableElectrical;
|
|
26
|
+
if (config.enableModeSelect)
|
|
27
|
+
this.enableModeSelect = config.enableModeSelect;
|
|
28
|
+
if (config.enablePowerSource)
|
|
29
|
+
this.enablePowerSource = config.enablePowerSource;
|
|
21
30
|
if (config.loadSwitches)
|
|
22
31
|
this.loadSwitches = config.loadSwitches;
|
|
23
32
|
if (config.loadOutlets)
|
|
@@ -48,6 +57,12 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
48
57
|
const switchDevice = new MatterbridgeDevice([onOffSwitch, bridgedNode], undefined, this.config.debug);
|
|
49
58
|
switchDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Switch ' + i, 'serial_switch_' + i, 0xfff1, 'Test plugin', 'Matterbridge');
|
|
50
59
|
switchDevice.addDeviceTypeWithClusterServer([onOffSwitch], []);
|
|
60
|
+
if (this.enableElectrical)
|
|
61
|
+
this.addElectricalMeasurements(switchDevice);
|
|
62
|
+
if (this.enablePowerSource)
|
|
63
|
+
this.addPowerSource(switchDevice);
|
|
64
|
+
if (this.enableModeSelect)
|
|
65
|
+
this.addModeSelect(switchDevice, 'Switch ' + i);
|
|
51
66
|
if (!this.noDevices)
|
|
52
67
|
await this.registerDevice(switchDevice);
|
|
53
68
|
}
|
|
@@ -55,6 +70,12 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
55
70
|
const outletDevice = new MatterbridgeDevice([onOffOutlet, bridgedNode], undefined, this.config.debug);
|
|
56
71
|
outletDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Outlet ' + i, 'serial_outlet_' + i, 0xfff1, 'Test plugin', 'Matterbridge');
|
|
57
72
|
outletDevice.addDeviceTypeWithClusterServer([onOffOutlet], []);
|
|
73
|
+
if (this.enableElectrical)
|
|
74
|
+
this.addElectricalMeasurements(outletDevice);
|
|
75
|
+
if (this.enablePowerSource)
|
|
76
|
+
this.addPowerSource(outletDevice);
|
|
77
|
+
if (this.enableModeSelect)
|
|
78
|
+
this.addModeSelect(outletDevice, 'Outlet ' + i);
|
|
58
79
|
if (!this.noDevices)
|
|
59
80
|
await this.registerDevice(outletDevice);
|
|
60
81
|
}
|
|
@@ -62,27 +83,51 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
62
83
|
const lightDevice = new MatterbridgeDevice([onOffLight, bridgedNode], undefined, this.config.debug);
|
|
63
84
|
lightDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Light ' + i, 'serial_light_' + i, 0xfff1, 'Test plugin', 'Matterbridge');
|
|
64
85
|
lightDevice.addDeviceTypeWithClusterServer([onOffLight], []);
|
|
86
|
+
if (this.enableElectrical)
|
|
87
|
+
this.addElectricalMeasurements(lightDevice);
|
|
88
|
+
if (this.enablePowerSource)
|
|
89
|
+
this.addPowerSource(lightDevice);
|
|
90
|
+
if (this.enableModeSelect)
|
|
91
|
+
this.addModeSelect(lightDevice, 'Light ' + i);
|
|
65
92
|
if (!this.noDevices)
|
|
66
93
|
await this.registerDevice(lightDevice);
|
|
67
94
|
}
|
|
68
|
-
|
|
95
|
+
/*
|
|
96
|
+
const electrical = new MatterbridgeDevice([electricalSensor, bridgedNode], undefined, this.config.debug as boolean);
|
|
69
97
|
electrical.createDefaultBridgedDeviceBasicInformationClusterServer('Electrical sensor', 'serial_98745631226', 0xfff1, 'Test plugin', 'electricalSensor', 2, '2.1.1');
|
|
70
98
|
electrical.addDeviceTypeWithClusterServer([electricalSensor], [ElectricalPowerMeasurement.Cluster.id, ElectricalEnergyMeasurement.Cluster.id]);
|
|
71
|
-
electrical.setAttribute(ElectricalPowerMeasurementCluster.id, 'voltage', 220, electrical.log);
|
|
72
|
-
electrical.setAttribute(ElectricalPowerMeasurementCluster.id, 'activeCurrent', 2.5, electrical.log);
|
|
73
|
-
electrical.setAttribute(ElectricalPowerMeasurementCluster.id, 'activePower', 220 * 2.5, electrical.log);
|
|
74
|
-
electrical.setAttribute(ElectricalEnergyMeasurementCluster.id, 'cumulativeEnergyImported', { energy: 1.2 }, electrical.log);
|
|
75
|
-
if (!this.noDevices)
|
|
76
|
-
|
|
77
|
-
|
|
99
|
+
electrical.setAttribute(ElectricalPowerMeasurementCluster.id, 'voltage', 220 * 1000, electrical.log);
|
|
100
|
+
electrical.setAttribute(ElectricalPowerMeasurementCluster.id, 'activeCurrent', 2.5 * 1000, electrical.log);
|
|
101
|
+
electrical.setAttribute(ElectricalPowerMeasurementCluster.id, 'activePower', 220 * 2.5 * 1000, electrical.log);
|
|
102
|
+
electrical.setAttribute(ElectricalEnergyMeasurementCluster.id, 'cumulativeEnergyImported', { energy: 1.2 * 1000 }, electrical.log);
|
|
103
|
+
if (!this.noDevices) await this.registerDevice(electrical);
|
|
104
|
+
*/
|
|
105
|
+
/*
|
|
106
|
+
const energy = new MatterbridgeDevice([deviceEnergyManagement, bridgedNode], undefined, this.config.debug as boolean);
|
|
78
107
|
energy.createDefaultBridgedDeviceBasicInformationClusterServer('Device Energy Management', 'serial_98745631227', 0xfff1, 'Test plugin', 'deviceEnergyManagement', 2, '2.1.1');
|
|
79
108
|
energy.addDeviceTypeWithClusterServer([deviceEnergyManagement], [DeviceEnergyManagement.Cluster.id, DeviceEnergyManagementMode.Cluster.id]);
|
|
80
109
|
energy.addCommandHandler('changeToMode', async ({ request: { newMode }, attributes: { currentMode } }) => {
|
|
81
|
-
|
|
82
|
-
|
|
110
|
+
this.log.info('Received changeToMode command with mode:', newMode, 'current mode:', currentMode.getLocal());
|
|
111
|
+
energy.setAttribute(DeviceEnergyManagementModeCluster.id, 'currentMode', newMode, energy.log);
|
|
83
112
|
});
|
|
84
|
-
if (!this.noDevices)
|
|
85
|
-
|
|
113
|
+
if (!this.noDevices) await this.registerDevice(energy);
|
|
114
|
+
*/
|
|
115
|
+
}
|
|
116
|
+
addElectricalMeasurements(device) {
|
|
117
|
+
device.addDeviceTypeWithClusterServer([electricalSensor], [ElectricalPowerMeasurement.Cluster.id, ElectricalEnergyMeasurement.Cluster.id]);
|
|
118
|
+
device.setAttribute(ElectricalPowerMeasurementCluster.id, 'voltage', 220 * 1000, device.log);
|
|
119
|
+
device.setAttribute(ElectricalPowerMeasurementCluster.id, 'activeCurrent', 2.5 * 1000, device.log);
|
|
120
|
+
device.setAttribute(ElectricalPowerMeasurementCluster.id, 'activePower', 220 * 2.5 * 1000, device.log);
|
|
121
|
+
device.setAttribute(ElectricalEnergyMeasurementCluster.id, 'cumulativeEnergyImported', { energy: 1500 * 1000 }, device.log);
|
|
122
|
+
}
|
|
123
|
+
addModeSelect(device, description) {
|
|
124
|
+
device.addClusterServer(device.getDefaultModeSelectClusterServer(description, [
|
|
125
|
+
{ label: 'Led ON', mode: 1, semanticTags: [] },
|
|
126
|
+
{ label: 'Led OFF', mode: 2, semanticTags: [] },
|
|
127
|
+
], 1, 1));
|
|
128
|
+
}
|
|
129
|
+
addPowerSource(device) {
|
|
130
|
+
device.addClusterServer(device.getDefaultPowerSourceWiredClusterServer(PowerSource.WiredCurrentType.Ac));
|
|
86
131
|
}
|
|
87
132
|
async onConfigure() {
|
|
88
133
|
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,EAEL,kBAAkB,EAClB,2BAA2B,EAE3B,WAAW,EACX,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EAClB,2BAA2B,EAE3B,WAAW,EACX,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,W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W,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3G,CAAC;IAEQ,KAAK,CAAC,WAAW;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"}
|
|
@@ -43,6 +43,21 @@
|
|
|
43
43
|
"type": "number",
|
|
44
44
|
"default": 1
|
|
45
45
|
},
|
|
46
|
+
"enableElectrical": {
|
|
47
|
+
"description": "Add electrical measurements to the devices (development only)",
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"default": false
|
|
50
|
+
},
|
|
51
|
+
"enablePowerSource": {
|
|
52
|
+
"description": "Add power source to the devices (development only)",
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": false
|
|
55
|
+
},
|
|
56
|
+
"enableModeSelect": {
|
|
57
|
+
"description": "Add mode select to the devices (development only)",
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"default": false
|
|
60
|
+
},
|
|
46
61
|
"throwLoad": {
|
|
47
62
|
"description": "Throw on load (development only)",
|
|
48
63
|
"type": "boolean",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-test",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Matterbridge test plugin",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -97,4 +97,4 @@
|
|
|
97
97
|
"node-ansi-logger": "^3.0.0",
|
|
98
98
|
"node-persist-manager": "^1.0.8"
|
|
99
99
|
}
|
|
100
|
-
}
|
|
100
|
+
}
|