matterbridge-example-dynamic-platform 2.0.13 → 2.0.14-dev-20260319-16c2334
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 +11 -0
- package/dist/module.js +31 -44
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,17 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
26
26
|
|
|
27
27
|
<a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
|
|
28
28
|
|
|
29
|
+
## [2.0.14] - Dev branch
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- [package]: Update dependencies.
|
|
34
|
+
- [package]: Bump package to `automator` v.3.1.2.
|
|
35
|
+
- [package]: Bump `eslint` to v.10.0.3.
|
|
36
|
+
- [package]: Bump `typescript-eslint` to v.8.57.1.
|
|
37
|
+
|
|
38
|
+
<a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
|
|
39
|
+
|
|
29
40
|
## [2.0.13] - 2026-03-06
|
|
30
41
|
|
|
31
42
|
### Dev Breaking Changes
|
package/dist/module.js
CHANGED
|
@@ -685,14 +685,14 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
685
685
|
const lookupSetpointAdjustMode = ['Heat', 'Cool', 'Both'];
|
|
686
686
|
this.thermoAuto?.log.info(`Command setpointRaiseLower called with mode: ${lookupSetpointAdjustMode[mode]} amount: ${amount / 10}`);
|
|
687
687
|
});
|
|
688
|
-
await this.thermoAuto?.subscribeAttribute(
|
|
688
|
+
await this.thermoAuto?.subscribeAttribute(Thermostat.CompleteInstance, 'systemMode', (value) => {
|
|
689
689
|
const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
|
|
690
690
|
this.thermoAuto?.log.info('Subscribe systemMode called with:', lookupSystemMode[value]);
|
|
691
691
|
}, this.thermoAuto.log);
|
|
692
|
-
await this.thermoAuto?.subscribeAttribute(
|
|
692
|
+
await this.thermoAuto?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating), 'occupiedHeatingSetpoint', (value) => {
|
|
693
693
|
this.thermoAuto?.log.info('Subscribe occupiedHeatingSetpoint called with:', value / 100);
|
|
694
694
|
}, this.thermoAuto.log);
|
|
695
|
-
await this.thermoAuto?.subscribeAttribute(
|
|
695
|
+
await this.thermoAuto?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Cooling), 'occupiedCoolingSetpoint', (value) => {
|
|
696
696
|
this.thermoAuto?.log.info('Subscribe occupiedCoolingSetpoint called with:', value / 100);
|
|
697
697
|
}, this.thermoAuto.log);
|
|
698
698
|
this.thermoAutoOccupancy = new MatterbridgeEndpoint([thermostatDevice, bridgedNode, powerSource], { id: 'Thermostat (AutoModeOccupancy)' }, this.config.debug)
|
|
@@ -702,20 +702,20 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
702
702
|
.createDefaultPowerSourceWiredClusterServer()
|
|
703
703
|
.addRequiredClusterServers();
|
|
704
704
|
this.thermoAutoOccupancy = await this.addDevice(this.thermoAutoOccupancy);
|
|
705
|
-
await this.thermoAutoOccupancy?.subscribeAttribute(
|
|
705
|
+
await this.thermoAutoOccupancy?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating), 'systemMode', (value) => {
|
|
706
706
|
const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
|
|
707
707
|
this.thermoAutoOccupancy?.log.info('Subscribe systemMode called with:', lookupSystemMode[value]);
|
|
708
708
|
}, this.thermoAutoOccupancy.log);
|
|
709
|
-
await this.thermoAutoOccupancy?.subscribeAttribute(
|
|
709
|
+
await this.thermoAutoOccupancy?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating), 'occupiedHeatingSetpoint', (value) => {
|
|
710
710
|
this.thermoAutoOccupancy?.log.info('Subscribe occupiedHeatingSetpoint called with:', value / 100);
|
|
711
711
|
}, this.thermoAutoOccupancy.log);
|
|
712
|
-
await this.thermoAutoOccupancy?.subscribeAttribute(
|
|
712
|
+
await this.thermoAutoOccupancy?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Cooling), 'occupiedCoolingSetpoint', (value) => {
|
|
713
713
|
this.thermoAutoOccupancy?.log.info('Subscribe occupiedCoolingSetpoint called with:', value / 100);
|
|
714
714
|
}, this.thermoAutoOccupancy.log);
|
|
715
|
-
await this.thermoAutoOccupancy?.subscribeAttribute(
|
|
715
|
+
await this.thermoAutoOccupancy?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating, Thermostat.Feature.Occupancy), 'unoccupiedHeatingSetpoint', (value) => {
|
|
716
716
|
this.thermoAutoOccupancy?.log.info('Subscribe unoccupiedHeatingSetpoint called with:', value / 100);
|
|
717
717
|
}, this.thermoAutoOccupancy.log);
|
|
718
|
-
await this.thermoAutoOccupancy?.subscribeAttribute(
|
|
718
|
+
await this.thermoAutoOccupancy?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Cooling, Thermostat.Feature.Occupancy), 'unoccupiedCoolingSetpoint', (value) => {
|
|
719
719
|
this.thermoAutoOccupancy?.log.info('Subscribe unoccupiedCoolingSetpoint called with:', value / 100);
|
|
720
720
|
}, this.thermoAutoOccupancy.log);
|
|
721
721
|
const presets_List = [
|
|
@@ -846,36 +846,23 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
846
846
|
this.thermoAutoPresets?.log.info(`Command setpointRaiseLower called with mode: ${lookupSetpointAdjustMode[mode]} amount: ${amount / 10}`);
|
|
847
847
|
});
|
|
848
848
|
this.thermoAutoPresets?.addCommandHandler('setActivePresetRequest', async ({ request: { presetHandle } }) => {
|
|
849
|
-
|
|
850
|
-
const preset = presets_List.find((p) => p.presetHandle.length === handle.length && p.presetHandle.every((v, i) => v === handle[i]));
|
|
851
|
-
if (!preset) {
|
|
852
|
-
this.thermoAutoPresets?.log.error(`Command setActivePresetRequest received unknown presetHandle: ${Array.from(handle).join(',')}`);
|
|
853
|
-
return;
|
|
854
|
-
}
|
|
855
|
-
await this.thermoAutoPresets?.setAttribute(ThermostatCluster.id, 'activePresetHandle', handle, this.thermoAutoPresets?.log);
|
|
856
|
-
if (preset.heatingSetpoint !== undefined) {
|
|
857
|
-
await this.thermoAutoPresets?.setAttribute(ThermostatCluster.id, 'occupiedHeatingSetpoint', preset.heatingSetpoint, this.thermoAutoPresets?.log);
|
|
858
|
-
}
|
|
859
|
-
if (preset.coolingSetpoint !== undefined) {
|
|
860
|
-
await this.thermoAutoPresets?.setAttribute(ThermostatCluster.id, 'occupiedCoolingSetpoint', preset.coolingSetpoint, this.thermoAutoPresets?.log);
|
|
861
|
-
}
|
|
862
|
-
this.thermoAutoPresets?.log.info(`Command setActivePresetRequest applied. Active preset is now '${preset.name}' (handle ${Array.from(handle).join(',')}) with heating setpoint ${preset.heatingSetpoint / 100}°C and cooling setpoint ${preset.coolingSetpoint / 100}°C.`);
|
|
849
|
+
this.thermoAutoPresets?.log.info(`Command setActivePresetRequest called with presetHandle: ${presetHandle ? `0x${Buffer.from(presetHandle).toString('hex')}` : 'null'}`);
|
|
863
850
|
});
|
|
864
|
-
await this.thermoAutoPresets?.subscribeAttribute(
|
|
851
|
+
await this.thermoAutoPresets?.subscribeAttribute(Thermostat.CompleteInstance, 'systemMode', (newValue, oldValue) => {
|
|
865
852
|
const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
|
|
866
|
-
this.thermoAutoPresets?.log.info(
|
|
853
|
+
this.thermoAutoPresets?.log.info(`Subscribe systemMode called with: ${lookupSystemMode[newValue]} (old value: ${lookupSystemMode[oldValue]})`);
|
|
867
854
|
}, this.thermoAutoPresets.log);
|
|
868
|
-
await this.thermoAutoPresets?.subscribeAttribute(
|
|
869
|
-
this.thermoAutoPresets?.log.info(
|
|
855
|
+
await this.thermoAutoPresets?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating), 'occupiedHeatingSetpoint', (newValue, oldValue) => {
|
|
856
|
+
this.thermoAutoPresets?.log.info(`Subscribe occupiedHeatingSetpoint called with: ${newValue / 100} (old value: ${oldValue / 100})`);
|
|
870
857
|
}, this.thermoAutoPresets.log);
|
|
871
|
-
await this.thermoAutoPresets?.subscribeAttribute(
|
|
872
|
-
this.thermoAutoPresets?.log.info(
|
|
858
|
+
await this.thermoAutoPresets?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Cooling), 'occupiedCoolingSetpoint', (newValue, oldValue) => {
|
|
859
|
+
this.thermoAutoPresets?.log.info(`Subscribe occupiedCoolingSetpoint called with: ${newValue / 100} (old value: ${oldValue / 100})`);
|
|
873
860
|
}, this.thermoAutoPresets.log);
|
|
874
|
-
await this.thermoAutoPresets?.subscribeAttribute(
|
|
875
|
-
this.thermoAutoPresets?.log.info(
|
|
861
|
+
await this.thermoAutoPresets?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating, Thermostat.Feature.Cooling, Thermostat.Feature.Presets), 'activePresetHandle', (newValue, oldValue) => {
|
|
862
|
+
this.thermoAutoPresets?.log.info(`Subscribe activePresetHandle called with: ${newValue ? `0x${Buffer.from(newValue).toString('hex')}` : 'null'} (old value: ${oldValue ? `0x${Buffer.from(oldValue).toString('hex')}` : 'null'})`);
|
|
876
863
|
}, this.thermoAutoPresets.log);
|
|
877
|
-
await this.thermoAutoPresets?.subscribeAttribute(
|
|
878
|
-
this.thermoAutoPresets?.log.info(
|
|
864
|
+
await this.thermoAutoPresets?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating, Thermostat.Feature.Cooling, Thermostat.Feature.Presets), 'presets', (newValue, oldValue) => {
|
|
865
|
+
this.thermoAutoPresets?.log.info(`Subscribe presets called with: ${debugStringify(newValue)} (old value: ${debugStringify(oldValue)})`);
|
|
879
866
|
}, this.thermoAutoPresets.log);
|
|
880
867
|
this.thermoHeat = new MatterbridgeEndpoint([thermostatDevice, bridgedNode, powerSource], { id: 'Thermostat (Heat)' }, this.config.debug)
|
|
881
868
|
.createDefaultIdentifyClusterServer()
|
|
@@ -908,11 +895,11 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
908
895
|
this.thermoHeat?.addCommandHandler('triggerEffect', async ({ request: { effectIdentifier, effectVariant } }) => {
|
|
909
896
|
this.thermoHeat?.log.info(`Command identify called effectIdentifier ${effectIdentifier} effectVariant ${effectVariant}`);
|
|
910
897
|
});
|
|
911
|
-
await this.thermoHeat?.subscribeAttribute(
|
|
898
|
+
await this.thermoHeat?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating), 'systemMode', (value) => {
|
|
912
899
|
const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
|
|
913
900
|
this.thermoHeat?.log.info('Subscribe systemMode called with:', lookupSystemMode[value]);
|
|
914
901
|
}, this.thermoHeat.log);
|
|
915
|
-
await this.thermoHeat?.subscribeAttribute(
|
|
902
|
+
await this.thermoHeat?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Heating), 'occupiedHeatingSetpoint', (value) => {
|
|
916
903
|
this.thermoHeat?.log.info('Subscribe occupiedHeatingSetpoint called with:', value / 100);
|
|
917
904
|
}, this.thermoHeat.log);
|
|
918
905
|
this.thermoCool = new MatterbridgeEndpoint([thermostatDevice, bridgedNode, powerSource], { id: 'Thermostat (Cool)' }, this.config.debug)
|
|
@@ -928,11 +915,11 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
928
915
|
this.thermoCool?.addCommandHandler('triggerEffect', async ({ request: { effectIdentifier, effectVariant } }) => {
|
|
929
916
|
this.thermoCool?.log.info(`Command identify called effectIdentifier ${effectIdentifier} effectVariant ${effectVariant}`);
|
|
930
917
|
});
|
|
931
|
-
await this.thermoCool?.subscribeAttribute(
|
|
918
|
+
await this.thermoCool?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Cooling), 'systemMode', (value) => {
|
|
932
919
|
const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
|
|
933
920
|
this.thermoCool?.log.info('Subscribe systemMode called with:', lookupSystemMode[value]);
|
|
934
921
|
}, this.thermoCool.log);
|
|
935
|
-
await this.thermoCool?.subscribeAttribute(
|
|
922
|
+
await this.thermoCool?.subscribeAttribute(Thermostat.Cluster.with(Thermostat.Feature.Cooling), 'occupiedCoolingSetpoint', (value) => {
|
|
936
923
|
this.thermoCool?.log.info('Subscribe occupiedCoolingSetpoint called with:', value / 100);
|
|
937
924
|
}, this.thermoCool.log);
|
|
938
925
|
this.airPurifier = new MatterbridgeEndpoint([airPurifier, bridgedNode, powerSource], { id: 'Air purifier' }, this.config.debug)
|
|
@@ -1523,28 +1510,28 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1523
1510
|
this.basicVideoPlayer = new BasicVideoPlayer('BasicVideoPlayer', 'BVP00062');
|
|
1524
1511
|
this.basicVideoPlayer = (await this.addDevice(this.basicVideoPlayer));
|
|
1525
1512
|
this.basicVideoPlayer
|
|
1526
|
-
?.addCommandHandler('play', async () => {
|
|
1513
|
+
?.addCommandHandler('MediaPlayback.play', async () => {
|
|
1527
1514
|
this.basicVideoPlayer?.log.info(`Command play called`);
|
|
1528
1515
|
})
|
|
1529
|
-
.addCommandHandler('pause', async () => {
|
|
1516
|
+
.addCommandHandler('MediaPlayback.pause', async () => {
|
|
1530
1517
|
this.basicVideoPlayer?.log.info(`Command pause called`);
|
|
1531
1518
|
})
|
|
1532
|
-
.addCommandHandler('stop', async () => {
|
|
1519
|
+
.addCommandHandler('MediaPlayback.stop', async () => {
|
|
1533
1520
|
this.basicVideoPlayer?.log.info(`Command stop called`);
|
|
1534
1521
|
})
|
|
1535
|
-
.addCommandHandler('previous', async () => {
|
|
1522
|
+
.addCommandHandler('MediaPlayback.previous', async () => {
|
|
1536
1523
|
this.basicVideoPlayer?.log.info(`Command previous called`);
|
|
1537
1524
|
})
|
|
1538
|
-
.addCommandHandler('next', async () => {
|
|
1525
|
+
.addCommandHandler('MediaPlayback.next', async () => {
|
|
1539
1526
|
this.basicVideoPlayer?.log.info(`Command next called`);
|
|
1540
1527
|
})
|
|
1541
|
-
.addCommandHandler('skipForward', async () => {
|
|
1528
|
+
.addCommandHandler('MediaPlayback.skipForward', async () => {
|
|
1542
1529
|
this.basicVideoPlayer?.log.info(`Command skipForward called`);
|
|
1543
1530
|
})
|
|
1544
|
-
.addCommandHandler('skipBackward', async () => {
|
|
1531
|
+
.addCommandHandler('MediaPlayback.skipBackward', async () => {
|
|
1545
1532
|
this.basicVideoPlayer?.log.info(`Command skipBackward called`);
|
|
1546
1533
|
})
|
|
1547
|
-
.addCommandHandler('sendKey', async ({ request: { keyCode } }) => {
|
|
1534
|
+
.addCommandHandler('KeypadInput.sendKey', async ({ request: { keyCode } }) => {
|
|
1548
1535
|
this.basicVideoPlayer?.log.info(`Command sendKey with ${keyCode} called`);
|
|
1549
1536
|
});
|
|
1550
1537
|
this.speaker = new Speaker('Speaker', 'SPE00057', false, 100);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14-dev-20260319-16c2334",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
|
9
|
-
"version": "2.0.
|
|
9
|
+
"version": "2.0.14-dev-20260319-16c2334",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"node-ansi-logger": "3.2.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14-dev-20260319-16c2334",
|
|
4
4
|
"description": "Matterbridge dynamic plugin",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"node-persist-manager": "2.0.1"
|
|
72
72
|
},
|
|
73
73
|
"overrides": {
|
|
74
|
-
"eslint": "10.0.
|
|
74
|
+
"eslint": "10.0.3",
|
|
75
75
|
"@eslint/js": "10.0.1"
|
|
76
76
|
}
|
|
77
77
|
}
|