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 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
- The legacy old api have been removed.
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
- The frontend has a new dark and light mode. The dark mode is now the default mode.
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]: Removed legacy imports.
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
- Object.entries(device.state).forEach(([clusterName, clusterAttributes]) => {
834
- Object.entries(clusterAttributes).forEach(([attributeName, attributeValue]) => {
835
- if (typeof attributeValue === 'undefined')
836
- return;
837
- if (clusterName === 'onOff' && attributeName === 'onOff')
838
- attributes += `OnOff: ${attributeValue} `;
839
- if (clusterName === 'switch' && attributeName === 'currentPosition')
840
- attributes += `Position: ${attributeValue} `;
841
- if (clusterName === 'windowCovering' && attributeName === 'currentPositionLiftPercent100ths')
842
- attributes += `Cover position: ${attributeValue / 100}% `;
843
- if (clusterName === 'doorLock' && attributeName === 'lockState')
844
- attributes += `State: ${attributeValue === 1 ? 'Locked' : 'Not locked'} `;
845
- if (clusterName === 'thermostat' && attributeName === 'localTemperature')
846
- attributes += `Temperature: ${attributeValue / 100}°C `;
847
- if (clusterName === 'thermostat' && attributeName === 'occupiedHeatingSetpoint')
848
- attributes += `Heat to: ${attributeValue / 100}°C `;
849
- if (clusterName === 'thermostat' && attributeName === 'occupiedCoolingSetpoint')
850
- attributes += `Cool to: ${attributeValue / 100}°C `;
851
- if (clusterName === 'pumpConfigurationAndControl' && attributeName === 'operationMode')
852
- attributes += `Mode: ${attributeValue} `;
853
- if (clusterName === 'valveConfigurationAndControl' && attributeName === 'currentState')
854
- attributes += `State: ${attributeValue} `;
855
- if (clusterName === 'levelControl' && attributeName === 'currentLevel')
856
- attributes += `Level: ${attributeValue}% `;
857
- if (clusterName === 'colorControl' && attributeName === 'colorMode')
858
- attributes += `Mode: ${['HS', 'XY', 'CT'][attributeValue]} `;
859
- if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 0 && attributeName === 'currentHue')
860
- attributes += `Hue: ${Math.round(attributeValue)} `;
861
- if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 0 && attributeName === 'currentSaturation')
862
- attributes += `Saturation: ${Math.round(attributeValue)} `;
863
- if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 1 && attributeName === 'currentX')
864
- attributes += `X: ${Math.round(attributeValue)} `;
865
- if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 1 && attributeName === 'currentY')
866
- attributes += `Y: ${Math.round(attributeValue)} `;
867
- if (clusterName === 'colorControl' && getAttribute(device, 'colorControl', 'colorMode') === 2 && attributeName === 'colorTemperatureMireds')
868
- attributes += `ColorTemp: ${Math.round(attributeValue)} `;
869
- if (clusterName === 'booleanState' && attributeName === 'stateValue')
870
- attributes += `Contact: ${attributeValue} `;
871
- if (clusterName === 'booleanStateConfiguration' && attributeName === 'alarmsActive')
872
- attributes += `Active alarms: ${stringify(attributeValue)} `;
873
- if (clusterName === 'smokeCoAlarm' && attributeName === 'smokeState')
874
- attributes += `Smoke: ${attributeValue} `;
875
- if (clusterName === 'smokeCoAlarm' && attributeName === 'coState')
876
- attributes += `Co: ${attributeValue} `;
877
- if (clusterName === 'fanControl' && attributeName === 'fanMode')
878
- attributes += `Mode: ${attributeValue} `;
879
- if (clusterName === 'fanControl' && attributeName === 'percentCurrent')
880
- attributes += `Percent: ${attributeValue} `;
881
- if (clusterName === 'fanControl' && attributeName === 'speedCurrent')
882
- attributes += `Speed: ${attributeValue} `;
883
- if (clusterName === 'occupancySensing' && attributeName === 'occupancy')
884
- attributes += `Occupancy: ${attributeValue.occupied} `;
885
- if (clusterName === 'illuminanceMeasurement' && attributeName === 'measuredValue')
886
- attributes += `Illuminance: ${attributeValue} `;
887
- if (clusterName === 'airQuality' && attributeName === 'airQuality')
888
- attributes += `Air quality: ${attributeValue} `;
889
- if (clusterName === 'tvocMeasurement' && attributeName === 'measuredValue')
890
- attributes += `Voc: ${attributeValue} `;
891
- if (clusterName === 'temperatureMeasurement' && attributeName === 'measuredValue')
892
- attributes += `Temperature: ${attributeValue / 100}°C `;
893
- if (clusterName === 'relativeHumidityMeasurement' && attributeName === 'measuredValue')
894
- attributes += `Humidity: ${attributeValue / 100}% `;
895
- if (clusterName === 'pressureMeasurement' && attributeName === 'measuredValue')
896
- attributes += `Pressure: ${attributeValue} `;
897
- if (clusterName === 'flowMeasurement' && attributeName === 'measuredValue')
898
- attributes += `Flow: ${attributeValue} `;
899
- if (clusterName === 'fixedLabel' && attributeName === 'labelList')
900
- attributes += `${getFixedLabel(device)} `;
901
- if (clusterName === 'userLabel' && attributeName === 'labelList')
902
- attributes += `${getUserLabel(device)} `;
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
- return;
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);
@@ -1,6 +1,7 @@
1
- export * from '@matter/main';
2
- export { AggregatorEndpoint } from '@matter/main/endpoints';
3
- export * from '@matter/main/devices';
4
- export * from '@matter/main/behaviors';
5
- export { FabricAction, MdnsService, PaseClient } from '@matter/main/protocol';
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';