matterbridge 1.6.8-dev.15 → 1.6.8-dev.16

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +8 -4
  2. package/README-EDGE.md +3 -3
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +26 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/cluster/export.d.ts.map +1 -0
  7. package/dist/cluster/export.js +2 -0
  8. package/dist/cluster/export.js.map +1 -0
  9. package/dist/defaultConfigSchema.d.ts.map +1 -0
  10. package/dist/defaultConfigSchema.js +23 -0
  11. package/dist/defaultConfigSchema.js.map +1 -0
  12. package/dist/deviceManager.d.ts +46 -0
  13. package/dist/deviceManager.d.ts.map +1 -0
  14. package/dist/deviceManager.js +26 -1
  15. package/dist/deviceManager.js.map +1 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +30 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/logger/export.d.ts.map +1 -0
  20. package/dist/logger/export.js +1 -0
  21. package/dist/logger/export.js.map +1 -0
  22. package/dist/matter/export.d.ts.map +1 -0
  23. package/dist/matter/export.js +1 -0
  24. package/dist/matter/export.js.map +1 -0
  25. package/dist/matterbridge.d.ts +483 -0
  26. package/dist/matterbridge.d.ts.map +1 -0
  27. package/dist/matterbridge.js +758 -80
  28. package/dist/matterbridge.js.map +1 -0
  29. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
  30. package/dist/matterbridgeAccessoryPlatform.js +33 -0
  31. package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
  32. package/dist/matterbridgeBehaviors.d.ts +116 -0
  33. package/dist/matterbridgeBehaviors.d.ts.map +1 -0
  34. package/dist/matterbridgeBehaviors.js +29 -1
  35. package/dist/matterbridgeBehaviors.js.map +1 -0
  36. package/dist/matterbridgeDevice.d.ts +1100 -0
  37. package/dist/matterbridgeDevice.d.ts.map +1 -0
  38. package/dist/matterbridgeDevice.js +997 -10
  39. package/dist/matterbridgeDevice.js.map +1 -0
  40. package/dist/matterbridgeDeviceTypes.d.ts +108 -0
  41. package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
  42. package/dist/matterbridgeDeviceTypes.js +82 -11
  43. package/dist/matterbridgeDeviceTypes.js.map +1 -0
  44. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
  45. package/dist/matterbridgeDynamicPlatform.js +33 -0
  46. package/dist/matterbridgeDynamicPlatform.js.map +1 -0
  47. package/dist/matterbridgeEdge.d.ts +90 -0
  48. package/dist/matterbridgeEdge.d.ts.map +1 -0
  49. package/dist/matterbridgeEdge.js +529 -0
  50. package/dist/matterbridgeEdge.js.map +1 -0
  51. package/dist/matterbridgeEndpoint.d.ts +1134 -0
  52. package/dist/matterbridgeEndpoint.d.ts.map +1 -0
  53. package/dist/matterbridgeEndpoint.js +1121 -12
  54. package/dist/matterbridgeEndpoint.js.map +1 -0
  55. package/dist/matterbridgePlatform.d.ts +136 -0
  56. package/dist/matterbridgePlatform.d.ts.map +1 -0
  57. package/dist/matterbridgePlatform.js +111 -3
  58. package/dist/matterbridgePlatform.js.map +1 -0
  59. package/dist/matterbridgeTypes.d.ts.map +1 -0
  60. package/dist/matterbridgeTypes.js +24 -0
  61. package/dist/matterbridgeTypes.js.map +1 -0
  62. package/dist/matterbridgeWebsocket.d.ts.map +1 -0
  63. package/dist/matterbridgeWebsocket.js +45 -0
  64. package/dist/matterbridgeWebsocket.js.map +1 -0
  65. package/dist/pluginManager.d.ts +238 -0
  66. package/dist/pluginManager.d.ts.map +1 -0
  67. package/dist/pluginManager.js +238 -3
  68. package/dist/pluginManager.js.map +1 -0
  69. package/dist/storage/export.d.ts.map +1 -0
  70. package/dist/storage/export.js +1 -0
  71. package/dist/storage/export.js.map +1 -0
  72. package/dist/utils/colorUtils.d.ts.map +1 -0
  73. package/dist/utils/colorUtils.js +205 -2
  74. package/dist/utils/colorUtils.js.map +1 -0
  75. package/dist/utils/export.d.ts.map +1 -0
  76. package/dist/utils/export.js +1 -0
  77. package/dist/utils/export.js.map +1 -0
  78. package/dist/utils/utils.d.ts +221 -0
  79. package/dist/utils/utils.d.ts.map +1 -0
  80. package/dist/utils/utils.js +253 -8
  81. package/dist/utils/utils.js.map +1 -0
  82. package/frontend/build/asset-manifest.json +6 -6
  83. package/frontend/build/index.html +1 -1
  84. package/frontend/build/static/css/{main.f44a67b7.css → main.0f9899a6.css} +2 -2
  85. package/frontend/build/static/css/main.0f9899a6.css.map +1 -0
  86. package/frontend/build/static/js/{main.b45edfff.js → main.4087dcdb.js} +3 -3
  87. package/frontend/build/static/js/main.4087dcdb.js.map +1 -0
  88. package/npm-shrinkwrap.json +2 -2
  89. package/package.json +1 -1
  90. package/frontend/build/static/css/main.f44a67b7.css.map +0 -1
  91. package/frontend/build/static/js/main.b45edfff.js.map +0 -1
  92. /package/frontend/build/static/js/{main.b45edfff.js.LICENSE.txt → main.4087dcdb.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -15,22 +15,26 @@ Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord
15
15
 
16
16
  ### Breaking Changes
17
17
 
18
- Matterbridge edge is now released.
18
+ Matterbridge edge is now released. The default mode is still the normal mode to allow the storage conversion. See https://github.com/Luligu/matterbridge/blob/dev/README-EDGE.md to manually switch to edge mode.
19
19
 
20
- The frontend has a dark mode that is the default mode.
20
+ The frontend has a dark mode that is now the default mode.
21
21
  It is possible to change the mode (Classic or Dark) in Settings, Matterbridge settings.
22
22
 
23
- ## [1.6.8-dev.15] - 2024-12-27
23
+ ## [1.6.8-dev.16] - 2024-12-28
24
24
 
25
25
  ### Added
26
26
 
27
+ - [edge]: Added guide https://github.com/Luligu/matterbridge/blob/dev/README-EDGE.md.
27
28
  - [storage]: Added conversion from old matter storage to the new api format with fabrics, resumptionRecords, network, commissioning, operationalCredentials, acl and parts number. The conversion is triggered every time you shutdown or restart matterbridge till the new storage has been used with matterbridge edge.
28
29
  - [storage]: Added conversion for child endpoint numbers.
29
- - [storage]: Added conversion for childbridge mode too.
30
+ - [storage]: Added conversion for childbridge mode.
30
31
  - [package]: Update README.md and README-SERVICE.md to include instructions for using SSL on port 443.
31
32
  - [platform]: Added checkEndpointNumbers() to detect endpoint numbers changes.
32
33
  - [frontend]: Added dark mode to the frontend. Dark mode is now the default mode. It is possible to change the mode in Settings, Matterbridge settings.
33
34
  - [frontend]: Custom rfjsreact-jsonschema-form for the config editor.
35
+ - [unregister]: Added unregister for Matterbridge edge.
36
+ - [reset]: Added reset for Matterbridge edge.
37
+ - [factoryreset]: Added factoryreset for Matterbridge edge.
34
38
 
35
39
  ### Changed
36
40
 
package/README-EDGE.md CHANGED
@@ -12,11 +12,11 @@ I also want to express my gratitude to Tamer, who continues to test everything d
12
12
 
13
13
  ## Storage conversion
14
14
 
15
- Starting from version 1.6.8 (1.6.8-dev.11 before it is published with tag latest), the conversion process is automatic and is triggered each time you shut down, restart, or update Matterbridge using the frontend.
15
+ Starting from version 1.7.0 (1.6.8-dev.11 before it is published as 1.7.0 with tag latest), the conversion process is automatic and is triggered each time you shut down, restart, or update Matterbridge using the frontend.
16
16
 
17
- A message is displayed to inform you when the conversion is complete.
17
+ A message is displayed to inform the user when the conversion is complete.
18
18
 
19
- Once you run Matterbridge in Edge mode for the first time, the conversion will no longer be triggered.
19
+ Once the user run Matterbridge in Edge mode for the first time, the conversion will no longer be triggered.
20
20
 
21
21
  The conversion only creates a new storage directory in the new format. It does not modify the old storage in any way, so there is no risk in trying Edge mode before its official release. You can also revert to normal mode by simply removing the -edge parameter. After the conversion is complete, the two storages will be identical. However, once you start using Edge mode, any changes made to one storage will not be reflected in the other. Therefore, it is recommended to let the conversion complete, switch to Edge mode, and continue using it exclusively.
22
22
  There is no conversion back to the old storage.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
package/dist/cli.js CHANGED
@@ -1,4 +1,27 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * This file contains the CLI entry point of Matterbridge.
4
+ *
5
+ * @file cli.ts
6
+ * @author Luca Liguori
7
+ * @date 2023-12-29
8
+ * @version 1.0.11
9
+ *
10
+ * Copyright 2023, 2024, 2025 Luca Liguori.
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License. *
23
+ */
24
+ /* eslint-disable no-console */
2
25
  import { Matterbridge } from './matterbridge.js';
3
26
  import { MatterbridgeEdge } from './matterbridgeEdge.js';
4
27
  let instance;
@@ -41,6 +64,7 @@ async function restart() {
41
64
  async function update() {
42
65
  if (process.argv.includes('-debug'))
43
66
  console.log(cli + 'CLI: received update event, updating...' + rs);
67
+ // TODO: Implement update logic outside of matterbridge
44
68
  if (process.argv.includes('-edge'))
45
69
  instance = await MatterbridgeEdge.loadInstance();
46
70
  else
@@ -48,6 +72,8 @@ async function update() {
48
72
  registerHandlers();
49
73
  }
50
74
  process.title = 'matterbridge';
75
+ // Run the main function
51
76
  main().catch((error) => {
52
77
  console.error(er + `CLI: Matterbridge.loadInstance() failed with error: ${error}` + rs);
53
78
  });
79
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,+BAA+B;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,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G,uDAAuD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAC1F,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":""}
@@ -1 +1,3 @@
1
1
  export {};
2
+ // Nothing to export right now
3
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":";AAAA,8BAA8B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultConfigSchema.d.ts","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAO,MAAM,kBAAkB,EAAE,cAiBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAWhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAkC3B,CAAC"}
@@ -1,3 +1,25 @@
1
+ /**
2
+ * This file contains the default config for the plugins.
3
+ *
4
+ * @file defaultConfigSchema.ts
5
+ * @author Luca Liguori
6
+ * @date 2024-05-07
7
+ * @version 1.0.1
8
+ *
9
+ * Copyright 2024, 2025, 2026 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License. *
22
+ */
1
23
  export const zigbee2mqtt_config = {
2
24
  name: 'matterbridge-zigbee2mqtt',
3
25
  type: 'DynamicPlatform',
@@ -63,3 +85,4 @@ export const shelly_config = {
63
85
  debugWs: false,
64
86
  unregisterOnShutdown: false,
65
87
  };
88
+ //# sourceMappingURL=defaultConfigSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultConfigSchema.js","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,gBAAgB,EAAE,EAAE;IACpB,sBAAsB,EAAE,EAAE;IAC1B,KAAK,EAAE,KAAK;IACZ,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,gBAAgB,EAAE,EAAE;IACpB,KAAK,EAAE,KAAK;IACZ,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,QAAQ;IACtB,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,WAAW;IACxB,gBAAgB,EAAE,EAAE;IACpB,kBAAkB,EAAE,EAAE;IACtB,iBAAiB,EAAE,EAAE;IACrB,gBAAgB,EAAE,WAAW;IAC7B,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,UAAU;IAC5B,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;IACnB,qBAAqB,EAAE,EAAE;IACzB,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,oBAAoB,EAAE,KAAK;CAC5B,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file contains the DeviceManager class.
3
+ *
4
+ * @file devices.ts
5
+ * @author Luca Liguori
6
+ * @date 2024-07-26
7
+ * @version 1.0.8
8
+ *
9
+ * Copyright 2024, 2025, 2026 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License. *
22
+ */
23
+ import { LogLevel } from 'node-ansi-logger';
24
+ import { NodeStorage } from 'node-persist-manager';
25
+ import { Matterbridge } from './matterbridge.js';
26
+ import { MatterbridgeDevice } from './matterbridgeDevice.js';
27
+ export declare class DeviceManager {
28
+ [x: number]: () => any;
29
+ private readonly _devices;
30
+ private readonly matterbridge;
31
+ private readonly nodeContext;
32
+ private readonly log;
33
+ constructor(matterbridge: Matterbridge, nodeContext: NodeStorage);
34
+ get length(): number;
35
+ get size(): number;
36
+ has(uniqueId: string): boolean;
37
+ get(uniqueId: string): MatterbridgeDevice | undefined;
38
+ set(device: MatterbridgeDevice): MatterbridgeDevice;
39
+ remove(device: MatterbridgeDevice): boolean;
40
+ clear(): void;
41
+ array(): MatterbridgeDevice[];
42
+ forEach(callback: (device: MatterbridgeDevice) => Promise<void>): Promise<void>;
43
+ get logLevel(): LogLevel;
44
+ set logLevel(logLevel: LogLevel);
45
+ }
46
+ //# sourceMappingURL=deviceManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceManager.d.ts","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAwB,QAAQ,EAAmB,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,qBAAa,aAAa;;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;IAClE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;gBAErB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW;IAOhE,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI9B,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAIrD,GAAG,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB;IAOnD,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO;IAM3C,KAAK,IAAI,IAAI;IAIb,KAAK,IAAI,kBAAkB,EAAE;IAQvB,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYrF,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IAED,IAAI,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAE9B;CAgCF"}
@@ -1,3 +1,26 @@
1
+ /**
2
+ * This file contains the DeviceManager class.
3
+ *
4
+ * @file devices.ts
5
+ * @author Luca Liguori
6
+ * @date 2024-07-26
7
+ * @version 1.0.8
8
+ *
9
+ * Copyright 2024, 2025, 2026 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License. *
22
+ */
23
+ // NodeStorage and AnsiLogger modules
1
24
  import { AnsiLogger, BLUE, er } from 'node-ansi-logger';
2
25
  import { dev } from './matterbridgeTypes.js';
3
26
  export class DeviceManager {
@@ -8,7 +31,7 @@ export class DeviceManager {
8
31
  constructor(matterbridge, nodeContext) {
9
32
  this.matterbridge = matterbridge;
10
33
  this.nodeContext = nodeContext;
11
- this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4, logLevel: matterbridge.log.logLevel });
34
+ this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logLevel: matterbridge.log.logLevel });
12
35
  this.log.debug('Matterbridge device manager starting...');
13
36
  }
14
37
  get length() {
@@ -54,6 +77,7 @@ export class DeviceManager {
54
77
  }
55
78
  catch (error) {
56
79
  this.log.error(`Error processing forEach device ${dev}${device.deviceName}${er} serialNumber ${BLUE}${device.serialNumber}${er} uniqueId: ${BLUE}${device.uniqueId}${er}:`, error);
80
+ // throw error;
57
81
  }
58
82
  });
59
83
  await Promise.all(tasks);
@@ -65,3 +89,4 @@ export class DeviceManager {
65
89
  this.log.logLevel = logLevel;
66
90
  }
67
91
  }
92
+ //# sourceMappingURL=deviceManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceManager.js","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,qCAAqC;AACrC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAA6B,MAAM,kBAAkB,CAAC;AAMnF,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAE7C,MAAM,OAAO,aAAa;IACP,QAAQ,GAAG,IAAI,GAAG,EAA8B,CAAC;IACjD,YAAY,CAAe;IAC3B,WAAW,CAAc;IACzB,GAAG,CAAa;IAEjC,YAAY,YAA0B,EAAE,WAAwB;QAC9D,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,kBAAkB,qCAA6B,EAAE,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC9I,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC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Ac,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -1,10 +1,36 @@
1
+ /**
2
+ * This file contains the entry point of Matterbridge.
3
+ *
4
+ * @file index.ts
5
+ * @author Luca Liguori
6
+ * @date 2023-12-29
7
+ * @version 1.0.6
8
+ *
9
+ * Copyright 2023, 2024, 2025 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License. *
22
+ */
1
23
  import { Matterbridge } from './matterbridge.js';
2
24
  import { MatterbridgeEdge } from './matterbridgeEdge.js';
25
+ // @matter
26
+ // export { Identity, AtLeastOne } from '@matter/main';
3
27
  export * from '@matter/main/clusters';
4
28
  export * from '@matter/main/types';
5
29
  export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, } from '@matter/node';
30
+ // @project-chip
6
31
  export * from '@project-chip/matter.js/device';
7
32
  export * from '@project-chip/matter.js/cluster';
33
+ // Matterbridge
8
34
  export * from './matterbridge.js';
9
35
  export * from './matterbridgeTypes.js';
10
36
  export * from './matterbridgeDevice.js';
@@ -17,15 +43,19 @@ const cli = '\u001B[32m';
17
43
  const er = '\u001B[38;5;9m';
18
44
  const rs = '\u001B[40;0m';
19
45
  async function main() {
46
+ // eslint-disable-next-line no-console
20
47
  if (process.argv.includes('-debug'))
21
48
  console.log(cli + 'MAIN: Matterbridge.loadInstance() called' + rs);
22
49
  if (process.argv.includes('-edge'))
23
50
  await MatterbridgeEdge.loadInstance();
24
51
  else
25
52
  await Matterbridge.loadInstance();
53
+ // eslint-disable-next-line no-console
26
54
  if (process.argv.includes('-debug'))
27
55
  console.log(cli + 'MAIN: Matterbridge.loadInstance() exited' + rs);
28
56
  }
29
57
  main().catch((error) => {
58
+ // eslint-disable-next-line no-console
30
59
  console.error(er + `MAIN: Matterbridge.loadInstance() failed with error: ${error}` + rs);
31
60
  });
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAUzD,UAAU;AACV,uDAAuD;AACvD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,gBAAgB;AAChB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAEhD,eAAe;AACf,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AAEjD,MAAM,GAAG,GAAG,YAAY,CAAC;AACzB,MAAM,EAAE,GAAG,gBAAgB,CAAC;AAC5B,MAAM,EAAE,GAAG,cAAc,CAAC;AAE1B,KAAK,UAAU,IAAI;IACjB,sCAAsC;IACtC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,0CAA0C,GAAG,EAAE,CAAC,CAAC;IACxG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,MAAM,gBAAgB,CAAC,YAAY,EAAE,CAAC;;QACrE,MAAM,YAAY,CAAC,YAAY,EAAE,CAAC;IACvC,sCAAsC;IACtC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,0CAA0C,GAAG,EAAE,CAAC,CAAC;AAC1G,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,wDAAwD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3F,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/logger/export.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from 'node-ansi-logger';
2
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/logger/export.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/matter/export.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAChI,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}
@@ -8,3 +8,4 @@ export * from '../matterbridgeDeviceTypes.js';
8
8
  export * from '../matterbridgeEndpoint.js';
9
9
  export * from '../matterbridgeBehaviors.js';
10
10
  export * from '../matterbridgeEdge.js';
11
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/matter/export.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAA4B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAChI,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}