matterbridge 2.1.0-dev.3 → 2.1.0-dev.5
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 +7 -7
- package/dist/frontend.js +82 -73
- package/dist/matter/export.js +6 -5
- package/dist/matterbridgeEndpoint.js +45 -396
- package/dist/matterbridgeEndpointHelpers.js +513 -0
- package/npm-shrinkwrap.json +5 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,12 +16,12 @@ Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord
|
|
|
16
16
|
### Breaking Changes
|
|
17
17
|
|
|
18
18
|
Starting from v. 2.0.0 Matterbridge is running only in mode edge (no parameter needed and no badge in the frontend).
|
|
19
|
-
|
|
19
|
+
With this release v. 2.1.0, the legacy old api of matter.js have been completely removed from Matterbridge and from all plugins.
|
|
20
|
+
For this reason there is no compatibility for old versions of the plugins.
|
|
21
|
+
You need to update all plugins you use and Matterbridge in the same moment.
|
|
22
|
+
I suggest to first update all plugins without restarting and then to update Matterbridge so when it restarts, all versions will be the latest.
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
It is possible to change the mode (Classic, Dark or Light) in Settings, Matterbridge settings.
|
|
23
|
-
|
|
24
|
-
## [2.1.0.dev.3] - 2025-01-27
|
|
24
|
+
## [2.1.0.dev.5] - 2025-01-29
|
|
25
25
|
|
|
26
26
|
### Added
|
|
27
27
|
|
|
@@ -31,10 +31,10 @@ It is possible to change the mode (Classic, Dark or Light) in Settings, Matterbr
|
|
|
31
31
|
|
|
32
32
|
### Changed
|
|
33
33
|
|
|
34
|
+
- [package]: Removed legacy imports.
|
|
34
35
|
- [package]: Update dependencies.
|
|
35
|
-
- [package]: Update matter.js to 0.12.1.
|
|
36
36
|
- [package]: Update matter.js to 0.12.0.
|
|
37
|
-
- [package]:
|
|
37
|
+
- [package]: Update matter.js to 0.12.1.
|
|
38
38
|
|
|
39
39
|
### Fixed
|
|
40
40
|
|
package/dist/frontend.js
CHANGED
|
@@ -830,77 +830,83 @@ export class Frontend {
|
|
|
830
830
|
return '';
|
|
831
831
|
};
|
|
832
832
|
let attributes = '';
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
833
|
+
device.forEachAttribute((clusterName, clusterId, attributeName, attributeId, attributeValue) => {
|
|
834
|
+
if (typeof attributeValue === 'undefined')
|
|
835
|
+
return;
|
|
836
|
+
if (clusterName === 'onOff' && attributeName === 'onOff')
|
|
837
|
+
attributes += `OnOff: ${attributeValue} `;
|
|
838
|
+
if (clusterName === 'switch' && attributeName === 'currentPosition')
|
|
839
|
+
attributes += `Position: ${attributeValue} `;
|
|
840
|
+
if (clusterName === 'windowCovering' && attributeName === 'currentPositionLiftPercent100ths' && isValidNumber(attributeValue, 0, 10000))
|
|
841
|
+
attributes += `Cover position: ${attributeValue / 100}% `;
|
|
842
|
+
if (clusterName === 'doorLock' && attributeName === 'lockState')
|
|
843
|
+
attributes += `State: ${attributeValue === 1 ? 'Locked' : 'Not locked'} `;
|
|
844
|
+
if (clusterName === 'thermostat' && attributeName === 'localTemperature' && isValidNumber(attributeValue))
|
|
845
|
+
attributes += `Temperature: ${attributeValue / 100}°C `;
|
|
846
|
+
if (clusterName === 'thermostat' && attributeName === 'occupiedHeatingSetpoint' && isValidNumber(attributeValue))
|
|
847
|
+
attributes += `Heat to: ${attributeValue / 100}°C `;
|
|
848
|
+
if (clusterName === 'thermostat' && attributeName === 'occupiedCoolingSetpoint' && isValidNumber(attributeValue))
|
|
849
|
+
attributes += `Cool to: ${attributeValue / 100}°C `;
|
|
850
|
+
if (clusterName === 'pumpConfigurationAndControl' && attributeName === 'operationMode')
|
|
851
|
+
attributes += `Mode: ${attributeValue} `;
|
|
852
|
+
if (clusterName === 'valveConfigurationAndControl' && attributeName === 'currentState')
|
|
853
|
+
attributes += `State: ${attributeValue} `;
|
|
854
|
+
if (clusterName === 'levelControl' && attributeName === 'currentLevel')
|
|
855
|
+
attributes += `Level: ${attributeValue} `;
|
|
856
|
+
if (clusterName === 'colorControl' && attributeName === 'colorMode' && isValidNumber(attributeValue, 0, 2))
|
|
857
|
+
attributes += `Mode: ${['HS', 'XY', 'CT'][attributeValue]} `;
|
|
858
|
+
if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 0 && attributeName === 'currentHue' && isValidNumber(attributeValue))
|
|
859
|
+
attributes += `Hue: ${Math.round(attributeValue)} `;
|
|
860
|
+
if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 0 && attributeName === 'currentSaturation' && isValidNumber(attributeValue))
|
|
861
|
+
attributes += `Saturation: ${Math.round(attributeValue)} `;
|
|
862
|
+
if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 1 && attributeName === 'currentX' && isValidNumber(attributeValue))
|
|
863
|
+
attributes += `X: ${Math.round(attributeValue / 655.36) / 100} `;
|
|
864
|
+
if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 1 && attributeName === 'currentY' && isValidNumber(attributeValue))
|
|
865
|
+
attributes += `Y: ${Math.round(attributeValue / 655.36) / 100} `;
|
|
866
|
+
if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 2 && attributeName === 'colorTemperatureMireds' && isValidNumber(attributeValue))
|
|
867
|
+
attributes += `ColorTemp: ${Math.round(attributeValue)} `;
|
|
868
|
+
if (clusterName === 'booleanState' && attributeName === 'stateValue')
|
|
869
|
+
attributes += `Contact: ${attributeValue} `;
|
|
870
|
+
if (clusterName === 'booleanStateConfiguration' && attributeName === 'alarmsActive' && isValidObject(attributeValue))
|
|
871
|
+
attributes += `Active alarms: ${stringify(attributeValue)} `;
|
|
872
|
+
if (clusterName === 'smokeCoAlarm' && attributeName === 'smokeState')
|
|
873
|
+
attributes += `Smoke: ${attributeValue} `;
|
|
874
|
+
if (clusterName === 'smokeCoAlarm' && attributeName === 'coState')
|
|
875
|
+
attributes += `Co: ${attributeValue} `;
|
|
876
|
+
if (clusterName === 'fanControl' && attributeName === 'fanMode')
|
|
877
|
+
attributes += `Mode: ${attributeValue} `;
|
|
878
|
+
if (clusterName === 'fanControl' && attributeName === 'percentCurrent')
|
|
879
|
+
attributes += `Percent: ${attributeValue} `;
|
|
880
|
+
if (clusterName === 'fanControl' && attributeName === 'speedCurrent')
|
|
881
|
+
attributes += `Speed: ${attributeValue} `;
|
|
882
|
+
if (clusterName === 'occupancySensing' && attributeName === 'occupancy' && isValidObject(attributeValue, 1))
|
|
883
|
+
attributes += `Occupancy: ${attributeValue.occupied} `;
|
|
884
|
+
if (clusterName === 'illuminanceMeasurement' && attributeName === 'measuredValue')
|
|
885
|
+
attributes += `Illuminance: ${attributeValue} `;
|
|
886
|
+
if (clusterName === 'airQuality' && attributeName === 'airQuality')
|
|
887
|
+
attributes += `Air quality: ${attributeValue} `;
|
|
888
|
+
if (clusterName === 'totalVolatileOrganicCompoundsConcentrationMeasurement' && attributeName === 'measuredValue')
|
|
889
|
+
attributes += `Voc: ${attributeValue} `;
|
|
890
|
+
if (clusterName === 'pm1ConcentrationMeasurement' && attributeName === 'measuredValue')
|
|
891
|
+
attributes += `Pm1: ${attributeValue} `;
|
|
892
|
+
if (clusterName === 'pm25ConcentrationMeasurement' && attributeName === 'measuredValue')
|
|
893
|
+
attributes += `Pm2.5: ${attributeValue} `;
|
|
894
|
+
if (clusterName === 'pm10ConcentrationMeasurement' && attributeName === 'measuredValue')
|
|
895
|
+
attributes += `Pm10: ${attributeValue} `;
|
|
896
|
+
if (clusterName === 'formaldehydeConcentrationMeasurement' && attributeName === 'measuredValue')
|
|
897
|
+
attributes += `CH₂O: ${attributeValue} `;
|
|
898
|
+
if (clusterName === 'temperatureMeasurement' && attributeName === 'measuredValue' && isValidNumber(attributeValue))
|
|
899
|
+
attributes += `Temperature: ${attributeValue / 100}°C `;
|
|
900
|
+
if (clusterName === 'relativeHumidityMeasurement' && attributeName === 'measuredValue' && isValidNumber(attributeValue))
|
|
901
|
+
attributes += `Humidity: ${attributeValue / 100}% `;
|
|
902
|
+
if (clusterName === 'pressureMeasurement' && attributeName === 'measuredValue')
|
|
903
|
+
attributes += `Pressure: ${attributeValue} `;
|
|
904
|
+
if (clusterName === 'flowMeasurement' && attributeName === 'measuredValue')
|
|
905
|
+
attributes += `Flow: ${attributeValue} `;
|
|
906
|
+
if (clusterName === 'fixedLabel' && attributeName === 'labelList')
|
|
907
|
+
attributes += `${getFixedLabel(device)} `;
|
|
908
|
+
if (clusterName === 'userLabel' && attributeName === 'labelList')
|
|
909
|
+
attributes += `${getUserLabel(device)} `;
|
|
904
910
|
});
|
|
905
911
|
return attributes.trimStart().trimEnd();
|
|
906
912
|
}
|
|
@@ -1066,8 +1072,11 @@ export class Frontend {
|
|
|
1066
1072
|
const clusterServers = endpointServer.getAllClusterServers();
|
|
1067
1073
|
clusterServers.forEach((clusterServer) => {
|
|
1068
1074
|
Object.entries(clusterServer.attributes).forEach(([key, value]) => {
|
|
1069
|
-
if (clusterServer.name === 'EveHistory')
|
|
1070
|
-
|
|
1075
|
+
if (clusterServer.name === 'EveHistory') {
|
|
1076
|
+
if (['configDataGet', 'configDataSet', 'historyStatus', 'historyEntries', 'historyRequest', 'historySetTime', 'rLoc'].includes(key)) {
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1071
1080
|
if (clusterServer.name === 'Descriptor' && key === 'deviceTypeList') {
|
|
1072
1081
|
value.getLocal().forEach((deviceType) => {
|
|
1073
1082
|
deviceTypes.push(deviceType.deviceType);
|
package/dist/matter/export.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { AggregatorEndpoint } from '@matter/
|
|
3
|
-
export * from '@matter/
|
|
4
|
-
export * from '@matter/
|
|
5
|
-
export
|
|
1
|
+
export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, Endpoint, ClusterBehavior, Val, Behavior, ServerNode, LogLevel, LogFormat, } from '@matter/main';
|
|
2
|
+
export { AggregatorEndpoint, PowerSourceEndpoint, ElectricalSensorEndpoint } from '@matter/node/endpoints';
|
|
3
|
+
export * from '@matter/node/devices';
|
|
4
|
+
export * from '@matter/node/behaviors';
|
|
5
|
+
export * from '@matter/types/clusters';
|
|
6
|
+
export { FabricAction, MdnsService, PaseClient, logEndpoint } from '@matter/main/protocol';
|
|
6
7
|
export { AttributeElement, ClusterElement, ClusterModel, CommandElement, EventElement, FieldElement } from '@matter/main/model';
|