matterbridge-example-accessory-platform 1.0.2 → 1.0.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/README.md CHANGED
@@ -11,3 +11,5 @@
11
11
  ---
12
12
 
13
13
  Matterbridge accessory platform example plugin is a template to develop your own plugin using the accessory platform.
14
+
15
+ See the guidelines on [Matterbridge](https://github.com/Luligu/matterbridge/blob/main/README.md) for more information.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
- import { Matterbridge } from 'matterbridge';
1
+ import { Matterbridge, PlatformConfig } from 'matterbridge';
2
2
  import { AnsiLogger } from 'node-ansi-logger';
3
3
  import { ExampleMatterbridgeAccessoryPlatform } from './platform.js';
4
4
  /**
5
- * This is the standard interface for MatterBridge plugins.
5
+ * This is the standard interface for Matterbridge plugins.
6
6
  * Each plugin should export a default function that follows this signature.
7
7
  *
8
- * @param matterbridge - An instance of MatterBridge
8
+ * @param {Matterbridge} matterbridge - The Matterbridge instance.
9
+ * @param {AnsiLogger} log - The logger instance.
10
+ * @param {PlatformConfig} config - The platform configuration.
11
+ * @returns {ExampleMatterbridgeAccessoryPlatform} The initialized platform.
9
12
  */
10
- export default function initializePlugin(matterbridge: Matterbridge, log: AnsiLogger): ExampleMatterbridgeAccessoryPlatform;
13
+ export default function initializePlugin(matterbridge: Matterbridge, log: AnsiLogger, config: PlatformConfig): ExampleMatterbridgeAccessoryPlatform;
11
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,wCAEnF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,GAAG,oCAAoC,CAElJ"}
package/dist/index.js CHANGED
@@ -1,11 +1,14 @@
1
1
  import { ExampleMatterbridgeAccessoryPlatform } from './platform.js';
2
2
  /**
3
- * This is the standard interface for MatterBridge plugins.
3
+ * This is the standard interface for Matterbridge plugins.
4
4
  * Each plugin should export a default function that follows this signature.
5
5
  *
6
- * @param matterbridge - An instance of MatterBridge
6
+ * @param {Matterbridge} matterbridge - The Matterbridge instance.
7
+ * @param {AnsiLogger} log - The logger instance.
8
+ * @param {PlatformConfig} config - The platform configuration.
9
+ * @returns {ExampleMatterbridgeAccessoryPlatform} The initialized platform.
7
10
  */
8
- export default function initializePlugin(matterbridge, log) {
9
- return new ExampleMatterbridgeAccessoryPlatform(matterbridge, log);
11
+ export default function initializePlugin(matterbridge, log, config) {
12
+ return new ExampleMatterbridgeAccessoryPlatform(matterbridge, log, config);
10
13
  }
11
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,YAA0B,EAAE,GAAe;IAClF,OAAO,IAAI,oCAAoC,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AACrE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,YAA0B,EAAE,GAAe,EAAE,MAAsB;IAC1G,OAAO,IAAI,oCAAoC,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AAC7E,CAAC"}
@@ -1,8 +1,11 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { PlatformConfig } from 'matterbridge';
1
3
  import { Matterbridge, MatterbridgeDevice, MatterbridgeAccessoryPlatform } from 'matterbridge';
2
4
  import { AnsiLogger } from 'node-ansi-logger';
3
5
  export declare class ExampleMatterbridgeAccessoryPlatform extends MatterbridgeAccessoryPlatform {
4
6
  cover: MatterbridgeDevice | undefined;
5
- constructor(matterbridge: Matterbridge, log: AnsiLogger);
7
+ coverInterval: NodeJS.Timeout | undefined;
8
+ constructor(matterbridge: Matterbridge, log: AnsiLogger, config: PlatformConfig);
6
9
  onStart(reason?: string): Promise<void>;
7
10
  onConfigure(): Promise<void>;
8
11
  onShutdown(reason?: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBAAa,oCAAqC,SAAQ,6BAA6B;IACrF,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAAC;gBAE1B,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU;IAIxC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM;IAmBvB,WAAW;IAqBX,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM;CAG1C"}
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,cAAc,EAAkB,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBAAa,oCAAqC,SAAQ,6BAA6B;IACrF,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;gBAE9B,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc;IAIhE,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM;IA6CvB,WAAW;IA2BX,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM;CAK1C"}
package/dist/platform.js CHANGED
@@ -1,9 +1,10 @@
1
- import { DeviceTypes, WindowCovering, WindowCoveringCluster } from 'matterbridge';
1
+ import { DeviceTypes, WindowCovering } from 'matterbridge';
2
2
  import { MatterbridgeDevice, MatterbridgeAccessoryPlatform } from 'matterbridge';
3
3
  export class ExampleMatterbridgeAccessoryPlatform extends MatterbridgeAccessoryPlatform {
4
4
  cover;
5
- constructor(matterbridge, log) {
6
- super(matterbridge, log);
5
+ coverInterval;
6
+ constructor(matterbridge, log, config) {
7
+ super(matterbridge, log, config);
7
8
  }
8
9
  async onStart(reason) {
9
10
  this.log.info('onStart called with reason:', reason ?? 'none');
@@ -16,18 +17,47 @@ export class ExampleMatterbridgeAccessoryPlatform extends MatterbridgeAccessoryP
16
17
  this.cover.addCommandHandler('identify', async ({ request: { identifyTime } }) => {
17
18
  this.log.info(`Command identify called identifyTime:${identifyTime}`);
18
19
  });
19
- this.cover.addCommandHandler('goToLiftPercentage', async ({ request: { liftPercent100thsValue } }) => {
20
- this.log.info(`Command goToLiftPercentage called liftPercent100thsValue:${liftPercent100thsValue}`);
20
+ this.cover.addCommandHandler('stopMotion', async ({ attributes: { currentPositionLiftPercent100ths, targetPositionLiftPercent100ths, operationalStatus } }) => {
21
+ const position = currentPositionLiftPercent100ths?.getLocal();
22
+ if (position !== null && position !== undefined)
23
+ targetPositionLiftPercent100ths?.setLocal(position);
24
+ operationalStatus.setLocal({
25
+ global: WindowCovering.MovementStatus.Stopped,
26
+ lift: WindowCovering.MovementStatus.Stopped,
27
+ tilt: WindowCovering.MovementStatus.Stopped,
28
+ });
29
+ this.log.debug(`Command stopMotion called. Attributes: currentPositionLiftPercent100ths: ${currentPositionLiftPercent100ths?.getLocal()}`);
30
+ this.log.debug(`Command stopMotion called. Attributes: targetPositionLiftPercent100ths: ${targetPositionLiftPercent100ths?.getLocal()}`);
31
+ this.log.debug(`Command stopMotion called. Attributes: operationalStatus: ${operationalStatus?.getLocal().lift}`);
32
+ });
33
+ this.cover.addCommandHandler('goToLiftPercentage', async ({ request: { liftPercent100thsValue }, attributes: { currentPositionLiftPercent100ths, targetPositionLiftPercent100ths, operationalStatus } }) => {
34
+ currentPositionLiftPercent100ths?.setLocal(liftPercent100thsValue);
35
+ targetPositionLiftPercent100ths?.setLocal(liftPercent100thsValue);
36
+ operationalStatus.setLocal({
37
+ global: WindowCovering.MovementStatus.Stopped,
38
+ lift: WindowCovering.MovementStatus.Stopped,
39
+ tilt: WindowCovering.MovementStatus.Stopped,
40
+ });
41
+ this.log.info(`Command goToLiftPercentage called. Request: liftPercent100thsValue: ${liftPercent100thsValue} `);
42
+ this.log.debug(`Command goToLiftPercentage called. Attributes: currentPositionLiftPercent100ths: ${currentPositionLiftPercent100ths?.getLocal()}`);
43
+ this.log.debug(`Command goToLiftPercentage called. Attributes: targetPositionLiftPercent100ths: ${targetPositionLiftPercent100ths?.getLocal()}`);
44
+ this.log.debug(`Command goToLiftPercentage called. Attributes: operationalStatus: ${operationalStatus?.getLocal().lift}`);
21
45
  });
22
46
  }
23
47
  async onConfigure() {
24
48
  this.log.info('onConfigure called');
25
- setInterval(() => {
49
+ // Set cover to target = current position and status to stopped (current position is persisted in the cluster)
50
+ this.cover?.setWindowCoveringTargetAsCurrentAndStopped();
51
+ this.log.debug('Set cover initial targetPositionLiftPercent100ths = currentPositionLiftPercent100ths and operationalStatus to Stopped.');
52
+ this.coverInterval = setInterval(() => {
26
53
  if (!this.cover)
27
54
  return;
28
- const coverCluster = this.cover.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift));
55
+ const coverCluster = this.cover.getClusterServer(WindowCovering.Complete);
29
56
  if (coverCluster && coverCluster.getCurrentPositionLiftPercent100thsAttribute) {
30
- let position = coverCluster.getCurrentPositionLiftPercent100thsAttribute() + 1000;
57
+ let position = coverCluster.getCurrentPositionLiftPercent100thsAttribute();
58
+ if (position === null || position === undefined)
59
+ return;
60
+ position = position + 1000;
31
61
  position = position > 10000 ? 0 : position;
32
62
  coverCluster.setTargetPositionLiftPercent100thsAttribute(position);
33
63
  coverCluster.setCurrentPositionLiftPercent100thsAttribute(position);
@@ -42,6 +72,8 @@ export class ExampleMatterbridgeAccessoryPlatform extends MatterbridgeAccessoryP
42
72
  }
43
73
  async onShutdown(reason) {
44
74
  this.log.info('onShutdown called with reason:', reason ?? 'none');
75
+ clearInterval(this.coverInterval);
76
+ await this.unregisterAllDevices();
45
77
  }
46
78
  }
47
79
  //# sourceMappingURL=platform.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAElF,OAAO,EAAgB,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAG/F,MAAM,OAAO,oCAAqC,SAAQ,6BAA6B;IACrF,KAAK,CAAiC;IAEtC,YAAY,YAA0B,EAAE,GAAe;QACrD,KAAK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AI,EAAE,cAAc,CAAC,cAAc,CAAC,OAAO;oBAC3C,IAAI,EAAE,cAAc,CAAC,cAAc,CAAC,OAAO;iBAC5C,CAAC,CAAC;gBACH,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iCAAiC,QAAQ,EAAE,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAChB,CAAC;IAEQ,KAAK,CAAC,UAAU,CAAC,MAAe;QACvC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gCAAgC,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC;QAClE,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAClC,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;IACpC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-accessory-platform",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "description": "Matterbridge accessory platform plugin example",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "MIT",
@@ -9,7 +9,7 @@
9
9
  "types": "dist/index.d.js",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/Luligu/matterbridge-example-accessory-platform"
12
+ "url": "git+https://github.com/Luligu/matterbridge-example-accessory-platform.git"
13
13
  },
14
14
  "bugs": {
15
15
  "url": "https://github.com/Luligu/matterbridge-example-accessory-platform/issues"
@@ -52,16 +52,16 @@
52
52
  "install": "node link-matterbridge-script.js && npm run build"
53
53
  },
54
54
  "devDependencies": {
55
- "@stylistic/eslint-plugin": "^1.6.3",
55
+ "@stylistic/eslint-plugin": "^1.7.0",
56
56
  "@tsconfig/node-lts": "^20.1.1",
57
- "@types/node": "^20.11.27",
58
- "@typescript-eslint/eslint-plugin": "^7.2.0",
59
- "@typescript-eslint/parser": "^7.2.0",
57
+ "@types/node": "^20.11.30",
58
+ "@typescript-eslint/eslint-plugin": "^7.3.1",
59
+ "@typescript-eslint/parser": "^7.3.1",
60
60
  "eslint-config-prettier": "^9.1.0",
61
61
  "eslint-plugin-prettier": "^5.1.3",
62
62
  "matterbridge": "file:../matterbridge",
63
63
  "prettier": "^3.2.5",
64
- "typescript": "^5.4.2"
64
+ "typescript": "^5.4.3"
65
65
  },
66
66
  "dependencies": {
67
67
  "node-ansi-logger": "^1.9.2"