matterbridge-eve-motion 1.0.4 → 1.0.6

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 ADDED
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ <a href="https://www.buymeacoffee.com/luligugithub">
6
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
7
+ </a>
8
+
9
+ <!-- Commented out section
10
+ ## [1.1.2] - 2024-03-08
11
+
12
+ ### Added
13
+
14
+ - [Feature 1]: Description of the feature.
15
+ - [Feature 2]: Description of the feature.
16
+
17
+ ### Changed
18
+
19
+ - [Feature 3]: Description of the change.
20
+ - [Feature 4]: Description of the change.
21
+
22
+ ### Deprecated
23
+
24
+ - [Feature 5]: Description of the deprecation.
25
+
26
+ ### Removed
27
+
28
+ - [Feature 6]: Description of the removal.
29
+
30
+ ### Fixed
31
+
32
+ - [Bug 1]: Description of the bug fix.
33
+ - [Bug 2]: Description of the bug fix.
34
+
35
+ ### Security
36
+
37
+ - [Security 1]: Description of the security improvement.
38
+ -->
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/matterbridge-eve-motion.svg)](https://www.npmjs.com/package/matterbridge-eve-motion)
4
4
  [![npm downloads](https://img.shields.io/npm/dt/matterbridge-eve-motion.svg)](https://www.npmjs.com/package/matterbridge-eve-motion)
5
+ [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge?label=docker%20version&sort=semver)](https://hub.docker.com/r/luligu/matterbridge)
6
+ [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge.svg)](https://hub.docker.com/r/luligu/matterbridge)
7
+ ![Node.js CI](https://github.com/Luligu/matterbridge-eve-motion/actions/workflows/build-matterbridge-plugin.yml/badge.svg)
5
8
 
6
9
  [![power by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
7
10
  [![power by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
@@ -10,13 +13,14 @@
10
13
 
11
14
  ---
12
15
 
13
- This plugin shows how to use the Matter history and how to create passive device in matter.js.
16
+ This plugin shows how to use the Matter history and how to create a passive device in matter.js.
14
17
 
15
- It create a motion sensor with a light sensor device that continuously changes state.
18
+ It creates a virtual motion sensor with a light sensor device that continuously changes state.
19
+
20
+ If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-eve-motion and sponsoring it.
16
21
 
17
22
  ## Prerequisites
18
23
 
19
24
  ### Matterbridge
20
25
 
21
26
  See the guidelines on [Matterbridge](https://github.com/Luligu/matterbridge/blob/main/README.md) for more information.
22
-
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Matterbridge, PlatformConfig } from 'matterbridge';
2
- import { AnsiLogger } from 'node-ansi-logger';
2
+ import { AnsiLogger } from 'matterbridge/logger';
3
3
  import { EveMotionPlatform } from './platform.js';
4
4
  /**
5
5
  * This is the standard interface for MatterBridge plugins.
@@ -1 +1 @@
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,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,qBAE3G"}
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,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,qBAE3G"}
@@ -1,7 +1,6 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { PlatformConfig } from 'matterbridge';
3
- import { Matterbridge, MatterbridgeDevice, MatterbridgeAccessoryPlatform, MatterHistory } from 'matterbridge';
4
- import { AnsiLogger } from 'node-ansi-logger';
1
+ import { PlatformConfig, Matterbridge, MatterbridgeDevice, MatterbridgeAccessoryPlatform } from 'matterbridge';
2
+ import { MatterHistory } from 'matterbridge/history';
3
+ import { AnsiLogger } from 'matterbridge/logger';
5
4
  export declare class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
6
5
  motion: MatterbridgeDevice | undefined;
7
6
  history: MatterHistory | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";AAAA,OAAO,EAAyD,cAAc,EAAE,MAAM,cAAc,CAAC;AAErG,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBAAa,iBAAkB,SAAQ,6BAA6B;IAClE,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;gBAEzB,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc;IAIhE,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM;IA4BvB,WAAW;IAqBX,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM;CAM1C"}
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,6BAA6B,EAAe,MAAM,cAAc,CAAC;AACnL,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,qBAAa,iBAAkB,SAAQ,6BAA6B;IAClE,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;gBAEzB,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc;IAKhE,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM;IA4BvB,WAAW;IAqBX,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM;CAM1C"}
package/dist/platform.js CHANGED
@@ -1,11 +1,12 @@
1
- import { DeviceTypes, IlluminanceMeasurement, OccupancySensing } from 'matterbridge';
2
- import { MatterbridgeDevice, MatterbridgeAccessoryPlatform, MatterHistory } from 'matterbridge';
1
+ import { DeviceTypes, IlluminanceMeasurement, OccupancySensing, MatterbridgeDevice, MatterbridgeAccessoryPlatform, powerSource } from 'matterbridge';
2
+ import { MatterHistory } from 'matterbridge/history';
3
3
  export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
4
4
  motion;
5
5
  history;
6
6
  interval;
7
7
  constructor(matterbridge, log, config) {
8
8
  super(matterbridge, log, config);
9
+ this.log.info('Initializing platform:', this.config.name);
9
10
  }
10
11
  async onStart(reason) {
11
12
  this.log.info('onStart called with reason:', reason ?? 'none');
@@ -16,10 +17,10 @@ export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
16
17
  this.motion.createDefaultOccupancySensingClusterServer();
17
18
  this.motion.addDeviceType(DeviceTypes.LIGHT_SENSOR);
18
19
  this.motion.createDefaultIlluminanceMeasurementClusterServer();
20
+ this.motion.addDeviceType(powerSource);
19
21
  this.motion.createDefaultPowerSourceReplaceableBatteryClusterServer();
20
- this.motion.createDefaultPowerSourceConfigurationClusterServer(1);
21
22
  // Add the EveHistory cluster to the device as last cluster!
22
- this.motion.createMotionEveHistoryClusterServer(this.history, this.log);
23
+ this.history.createMotionEveHistoryClusterServer(this.motion, this.log);
23
24
  this.history.autoPilot(this.motion);
24
25
  await this.registerDevice(this.motion);
25
26
  this.motion.addCommandHandler('identify', async ({ request: { identifyTime } }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,gBAAgB,EAAkB,MAAM,cAAc,CAAC;AAErG,OAAO,EAAgB,kBAAkB,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9G,MAAM,OAAO,iBAAkB,SAAQ,6BAA6B;IAClE,MAAM,CAAiC;IACvC,OAAO,CAA4B;IACnC,QAAQ,CAA6B;IAErC,YAAY,YAA0B,EAAE,GAAe,EAAE,MAAsB;QAC7E,KAAK,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAEQ,KAAK,CAAC,OAAO,CAAC,MAAe;QACpC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC;QAE/D,IAAI,CAAC,OAAO,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAEhH,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAkB,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,kCAAkC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e;QACvC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gCAAgC,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC;QAClE,MAAM,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,KAAK,IAAI;YAAE,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;IACnF,CAAC;CACF"}
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  import { exec } from 'child_process';
2
3
 
3
4
  const command = process.platform === 'win32' ? 'npm link matterbridge' : 'sudo npm link matterbridge';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-eve-motion",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Matterbridge eve motion with history",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
- "types": "dist/index.d.js",
9
+ "types": "dist/index.d.ts",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/Luligu/matterbridge-eve-motion.git"
@@ -25,26 +25,28 @@
25
25
  "history"
26
26
  ],
27
27
  "engines": {
28
- "node": "^18.19.0 || ^20.11.0"
28
+ "node": ">=18.0.0"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsc",
32
32
  "watch": "tsc --watch",
33
33
  "start:bridge": "matterbridge -bridge",
34
34
  "start:childbridge": "matterbridge -childbridge",
35
- "test": "jest",
36
- "test:verbose": "jest --verbose",
37
- "test:watch": "jest --watch",
38
- "lint": "eslint src/**.ts",
39
- "lint:fix": "eslint src/**.ts --fix",
40
- "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
41
- "format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
35
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --passWithNoTests",
36
+ "test:verbose": "node --experimental-vm-modules node_modules/jest/bin/jest.js --passWithNoTests --verbose",
37
+ "test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --passWithNoTests --watch",
38
+ "test:coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --passWithNoTests --coverage",
39
+ "lint": "eslint --max-warnings=0 .",
40
+ "lint:fix": "eslint --fix --max-warnings=0 .",
41
+ "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
42
+ "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
42
43
  "clean": "rimraf tsconfig.tsbuildinfo ./dist",
43
44
  "cleanBuild": "npm run clean && tsc",
44
- "deepClean": "rimraf tsconfig.tsbuildinfo package-lock.json ./dist ./node_modules",
45
+ "deepClean": "rimraf tsconfig.tsbuildinfo package-lock.json ./dist ./node_modulesI",
46
+ "deepCleanRebuild": "npm run deepClean && npm install && npm run build",
45
47
  "prepublishOnly": "npm run lint && npm run cleanBuild",
46
48
  "checkDependencies": "npx npm-check-updates",
47
- "updateDependencies": "npx npm-check-updates -u",
49
+ "updateDependencies": "npx npm-check-updates -u && npm install & npm run cleanBuild",
48
50
  "matterbridge:add": "matterbridge -add .\\",
49
51
  "matterbridge:remove": "matterbridge -remove .\\",
50
52
  "matterbridge:enable": "matterbridge -enable .\\",
@@ -55,18 +57,26 @@
55
57
  "dev:uninstall": "npm uninstall matterbridge && npm unlink matterbridge",
56
58
  "install": "node link-matterbridge-script.js"
57
59
  },
60
+ "overrides": {
61
+ "eslint": "latest"
62
+ },
58
63
  "devDependencies": {
59
- "@stylistic/eslint-plugin": "^2.0.0",
60
- "@tsconfig/node-lts": "^20.1.3",
61
- "@types/node": "^20.12.11",
62
- "@typescript-eslint/eslint-plugin": "^7.8.0",
63
- "@typescript-eslint/parser": "^7.8.0",
64
+ "@eslint/js": "^9.6.0",
65
+ "@types/eslint__js": "^8.42.3",
66
+ "@types/jest": "^29.5.12",
67
+ "@types/node": "^20.14.10",
64
68
  "eslint-config-prettier": "^9.1.0",
69
+ "eslint-plugin-jest": "^28.6.0",
65
70
  "eslint-plugin-prettier": "^5.1.3",
66
- "prettier": "^3.2.5",
67
- "typescript": "^5.4.5"
71
+ "jest": "^29.7.0",
72
+ "prettier": "^3.3.2",
73
+ "rimraf": "^6.0.0",
74
+ "ts-jest": "^29.2.1",
75
+ "typescript": "^5.5.3",
76
+ "typescript-eslint": "^7.16.0"
68
77
  },
69
78
  "dependencies": {
70
- "node-ansi-logger": "^1.9.5"
79
+ "node-ansi-logger": "^1.9.5",
80
+ "node-persist-manager": "^1.0.7"
71
81
  }
72
- }
82
+ }