matterbridge 1.6.6-dev.15 → 1.6.6-dev.17

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
@@ -14,7 +14,7 @@ If you want to run Matterbridge in Home Assistant please use the official add-on
14
14
 
15
15
  Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord group: https://discord.gg/QX58CDe6hd.
16
16
 
17
- ## [1.6.6-dev.13] - 2024-12-10
17
+ ## [1.6.6-dev.16] - 2024-12-12
18
18
 
19
19
  ### Added
20
20
 
@@ -39,6 +39,7 @@ Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord
39
39
  - [package]: Update dependencies.
40
40
  - [onOff]: Set default to OnOff.Feature.Lighting.
41
41
  - [levelControl]: Set default to LevelControl.Feature.Lighting.
42
+ - [colorControl]: Set default cluster helpers to have ColorTemperature.
42
43
  - [lightSensor]: Refactor lightSensor removing Group optional cluster server.
43
44
  - [jest]: Update Jest tests.
44
45
 
@@ -763,17 +763,22 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
763
763
  createDefaultColorControlClusterServer(currentX = 0, currentY = 0, currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
764
764
  this.addClusterServer(this.getDefaultColorControlClusterServer(currentX, currentY, currentHue, currentSaturation, colorTemperatureMireds, colorTempPhysicalMinMireds, colorTempPhysicalMaxMireds));
765
765
  }
766
- getXyColorControlClusterServer(currentX = 0, currentY = 0) {
767
- return ClusterServer(ColorControlCluster.with(ColorControl.Feature.Xy), {
766
+ getXyColorControlClusterServer(currentX = 0, currentY = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
767
+ return ClusterServer(ColorControlCluster.with(ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature), {
768
768
  colorMode: ColorControl.ColorMode.CurrentXAndCurrentY,
769
769
  enhancedColorMode: ColorControl.EnhancedColorMode.CurrentXAndCurrentY,
770
- colorCapabilities: { xy: true, hueSaturation: false, colorLoop: false, enhancedHue: false, colorTemperature: false },
770
+ colorCapabilities: { xy: true, hueSaturation: false, colorLoop: false, enhancedHue: false, colorTemperature: true },
771
771
  options: {
772
772
  executeIfOff: false,
773
773
  },
774
774
  numberOfPrimaries: null,
775
775
  currentX,
776
776
  currentY,
777
+ colorTemperatureMireds,
778
+ colorTempPhysicalMinMireds,
779
+ colorTempPhysicalMaxMireds,
780
+ coupleColorTempToLevelMinMireds: colorTempPhysicalMinMireds,
781
+ startUpColorTemperatureMireds: null,
777
782
  remainingTime: 0,
778
783
  }, {
779
784
  moveToColor: async (data) => {
@@ -789,22 +794,37 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
789
794
  stopMoveStep: async () => {
790
795
  this.log.error('Matter command: stopMoveStep not implemented');
791
796
  },
797
+ moveToColorTemperature: async ({ request, attributes, endpoint }) => {
798
+ this.log.debug('Matter command: moveToColorTemperature request:', request, 'attributes.colorTemperatureMireds:', attributes.colorTemperatureMireds.getLocal());
799
+ this.commandHandler.executeHandler('moveToColorTemperature', { request, attributes, endpoint });
800
+ },
801
+ moveColorTemperature: async () => {
802
+ this.log.error('Matter command: moveColorTemperature not implemented');
803
+ },
804
+ stepColorTemperature: async () => {
805
+ this.log.error('Matter command: stepColorTemperature not implemented');
806
+ },
792
807
  }, {});
793
808
  }
794
- createXyColorControlClusterServer(currentX = 0, currentY = 0) {
795
- this.addClusterServer(this.getXyColorControlClusterServer(currentX, currentY));
809
+ createXyColorControlClusterServer(currentX = 0, currentY = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
810
+ this.addClusterServer(this.getXyColorControlClusterServer(currentX, currentY, colorTemperatureMireds, colorTempPhysicalMinMireds, colorTempPhysicalMaxMireds));
796
811
  }
797
- getHsColorControlClusterServer(currentHue = 0, currentSaturation = 0) {
798
- return ClusterServer(ColorControlCluster.with(ColorControl.Feature.HueSaturation), {
812
+ getHsColorControlClusterServer(currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
813
+ return ClusterServer(ColorControlCluster.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.ColorTemperature), {
799
814
  colorMode: ColorControl.ColorMode.CurrentHueAndCurrentSaturation,
800
815
  enhancedColorMode: ColorControl.EnhancedColorMode.CurrentHueAndCurrentSaturation,
801
- colorCapabilities: { xy: false, hueSaturation: true, colorLoop: false, enhancedHue: false, colorTemperature: false },
816
+ colorCapabilities: { xy: false, hueSaturation: true, colorLoop: false, enhancedHue: false, colorTemperature: true },
802
817
  options: {
803
818
  executeIfOff: false,
804
819
  },
805
820
  numberOfPrimaries: null,
806
821
  currentHue,
807
822
  currentSaturation,
823
+ colorTemperatureMireds,
824
+ colorTempPhysicalMinMireds,
825
+ colorTempPhysicalMaxMireds,
826
+ coupleColorTempToLevelMinMireds: colorTempPhysicalMinMireds,
827
+ startUpColorTemperatureMireds: null,
808
828
  remainingTime: 0,
809
829
  }, {
810
830
  moveToHue: async ({ request, attributes, endpoint }) => {
@@ -834,10 +854,20 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
834
854
  stopMoveStep: async () => {
835
855
  this.log.error('Matter command: stopMoveStep not implemented');
836
856
  },
857
+ moveToColorTemperature: async ({ request, attributes, endpoint }) => {
858
+ this.log.debug('Matter command: moveToColorTemperature request:', request, 'attributes.colorTemperatureMireds:', attributes.colorTemperatureMireds.getLocal());
859
+ this.commandHandler.executeHandler('moveToColorTemperature', { request, attributes, endpoint });
860
+ },
861
+ moveColorTemperature: async () => {
862
+ this.log.error('Matter command: moveColorTemperature not implemented');
863
+ },
864
+ stepColorTemperature: async () => {
865
+ this.log.error('Matter command: stepColorTemperature not implemented');
866
+ },
837
867
  }, {});
838
868
  }
839
- createHsColorControlClusterServer(currentHue = 0, currentSaturation = 0) {
840
- this.addClusterServer(this.getHsColorControlClusterServer(currentHue, currentSaturation));
869
+ createHsColorControlClusterServer(currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
870
+ this.addClusterServer(this.getHsColorControlClusterServer(currentHue, currentSaturation, colorTemperatureMireds, colorTempPhysicalMinMireds, colorTempPhysicalMaxMireds));
841
871
  }
842
872
  getCtColorControlClusterServer(colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
843
873
  return ClusterServer(ColorControlCluster.with(ColorControl.Feature.ColorTemperature), {
@@ -945,17 +945,22 @@ export class MatterbridgeEndpoint extends Endpoint {
945
945
  createDefaultColorControlClusterServer(currentX = 0, currentY = 0, currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
946
946
  this.addClusterServer(this.getDefaultColorControlClusterServer(currentX, currentY, currentHue, currentSaturation, colorTemperatureMireds, colorTempPhysicalMinMireds, colorTempPhysicalMaxMireds));
947
947
  }
948
- getXyColorControlClusterServer(currentX = 0, currentY = 0) {
949
- return ClusterServer(ColorControlCluster.with(ColorControl.Feature.Xy), {
948
+ getXyColorControlClusterServer(currentX = 0, currentY = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
949
+ return ClusterServer(ColorControlCluster.with(ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature), {
950
950
  colorMode: ColorControl.ColorMode.CurrentXAndCurrentY,
951
951
  enhancedColorMode: ColorControl.EnhancedColorMode.CurrentXAndCurrentY,
952
- colorCapabilities: { xy: true, hueSaturation: false, colorLoop: false, enhancedHue: false, colorTemperature: false },
952
+ colorCapabilities: { xy: true, hueSaturation: false, colorLoop: false, enhancedHue: false, colorTemperature: true },
953
953
  options: {
954
954
  executeIfOff: false,
955
955
  },
956
956
  numberOfPrimaries: null,
957
957
  currentX,
958
958
  currentY,
959
+ colorTemperatureMireds,
960
+ colorTempPhysicalMinMireds,
961
+ colorTempPhysicalMaxMireds,
962
+ coupleColorTempToLevelMinMireds: colorTempPhysicalMinMireds,
963
+ startUpColorTemperatureMireds: null,
959
964
  remainingTime: 0,
960
965
  }, {
961
966
  moveToColor: async () => {
@@ -966,44 +971,61 @@ export class MatterbridgeEndpoint extends Endpoint {
966
971
  },
967
972
  stopMoveStep: async () => {
968
973
  },
974
+ moveToColorTemperature: async () => {
975
+ },
976
+ moveColorTemperature: async () => {
977
+ },
978
+ stepColorTemperature: async () => {
979
+ },
969
980
  }, {});
970
981
  }
971
- createXyColorControlClusterServer(currentX = 0, currentY = 0) {
972
- this.addClusterServer(this.getXyColorControlClusterServer(currentX, currentY));
982
+ createXyColorControlClusterServer(currentX = 0, currentY = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
983
+ this.addClusterServer(this.getXyColorControlClusterServer(currentX, currentY, colorTemperatureMireds, colorTempPhysicalMinMireds, colorTempPhysicalMaxMireds));
973
984
  }
974
- getHsColorControlClusterServer(currentHue = 0, currentSaturation = 0) {
975
- return ClusterServer(ColorControlCluster.with(ColorControl.Feature.HueSaturation), {
985
+ getHsColorControlClusterServer(currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
986
+ return ClusterServer(ColorControlCluster.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.ColorTemperature), {
976
987
  colorMode: ColorControl.ColorMode.CurrentHueAndCurrentSaturation,
977
988
  enhancedColorMode: ColorControl.EnhancedColorMode.CurrentHueAndCurrentSaturation,
978
- colorCapabilities: { xy: false, hueSaturation: true, colorLoop: false, enhancedHue: false, colorTemperature: false },
989
+ colorCapabilities: { xy: false, hueSaturation: true, colorLoop: false, enhancedHue: false, colorTemperature: true },
979
990
  options: {
980
991
  executeIfOff: false,
981
992
  },
982
993
  numberOfPrimaries: null,
983
994
  currentHue,
984
995
  currentSaturation,
996
+ colorTemperatureMireds,
997
+ colorTempPhysicalMinMireds,
998
+ colorTempPhysicalMaxMireds,
999
+ coupleColorTempToLevelMinMireds: colorTempPhysicalMinMireds,
1000
+ startUpColorTemperatureMireds: null,
985
1001
  remainingTime: 0,
986
1002
  }, {
987
- moveToHue: async ({ request, attributes, endpoint }) => {
1003
+ moveToHue: async () => {
988
1004
  },
989
1005
  moveHue: async () => {
990
1006
  },
991
1007
  stepHue: async () => {
992
1008
  },
993
- moveToSaturation: async ({ request, attributes, endpoint }) => {
1009
+ moveToSaturation: async () => {
994
1010
  },
995
1011
  moveSaturation: async () => {
996
1012
  },
997
1013
  stepSaturation: async () => {
998
1014
  },
999
- moveToHueAndSaturation: async ({ request, attributes, endpoint }) => {
1015
+ moveToHueAndSaturation: async () => {
1000
1016
  },
1001
1017
  stopMoveStep: async () => {
1002
1018
  },
1019
+ moveToColorTemperature: async () => {
1020
+ },
1021
+ moveColorTemperature: async () => {
1022
+ },
1023
+ stepColorTemperature: async () => {
1024
+ },
1003
1025
  }, {});
1004
1026
  }
1005
- createHsColorControlClusterServer(currentHue = 0, currentSaturation = 0) {
1006
- this.addClusterServer(this.getHsColorControlClusterServer(currentHue, currentSaturation));
1027
+ createHsColorControlClusterServer(currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
1028
+ this.addClusterServer(this.getHsColorControlClusterServer(currentHue, currentSaturation, colorTemperatureMireds, colorTempPhysicalMinMireds, colorTempPhysicalMaxMireds));
1007
1029
  }
1008
1030
  getCtColorControlClusterServer(colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
1009
1031
  return ClusterServer(ColorControlCluster.with(ColorControl.Feature.ColorTemperature), {
@@ -1023,7 +1045,7 @@ export class MatterbridgeEndpoint extends Endpoint {
1023
1045
  }, {
1024
1046
  stopMoveStep: async () => {
1025
1047
  },
1026
- moveToColorTemperature: async ({ request, attributes, endpoint }) => {
1048
+ moveToColorTemperature: async () => {
1027
1049
  },
1028
1050
  moveColorTemperature: async () => {
1029
1051
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "1.6.6-dev.15",
3
+ "version": "1.6.6-dev.17",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge",
9
- "version": "1.6.6-dev.15",
9
+ "version": "1.6.6-dev.17",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@matter/main": "0.11.9",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "1.6.6-dev.15",
3
+ "version": "1.6.6-dev.17",
4
4
  "description": "Matterbridge plugin manager for Matter",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",