matterbridge-eve-motion 1.2.2 → 1.2.3

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
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.2.3] - 2025-04-30
6
+
7
+ ### Changed
8
+
9
+ - [package]: Require Matterbridge 3.0.0.
10
+ - [package]: Update package.
11
+ - [package]: Update dependencies.
12
+
13
+ <a href="https://www.buymeacoffee.com/luligugithub">
14
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
15
+ </a>
16
+
5
17
  ## [1.2.2] - 2025-04-03
6
18
 
7
19
  ### Changed
package/dist/platform.js CHANGED
@@ -7,8 +7,8 @@ export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
7
7
  interval;
8
8
  constructor(matterbridge, log, config) {
9
9
  super(matterbridge, log, config);
10
- if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('2.2.6')) {
11
- throw new Error(`This plugin requires Matterbridge version >= "2.2.6". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend."`);
10
+ if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.0.0')) {
11
+ throw new Error(`This plugin requires Matterbridge version >= "3.0.0". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend."`);
12
12
  }
13
13
  this.log.info('Initializing platform:', this.config.name);
14
14
  }
@@ -18,8 +18,8 @@ export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
18
18
  this.motion = new MatterbridgeEndpoint([occupancySensor, lightSensor, powerSource], { uniqueStorageKey: 'Eve motion' }, this.config.debug);
19
19
  this.motion.createDefaultIdentifyClusterServer();
20
20
  this.motion.createDefaultBasicInformationClusterServer('Eve motion', '0x85483499', 4874, 'Eve Systems', 89, 'Eve Motion 20EBY9901', 6650, '3.2.1');
21
- this.motion.createDefaultOccupancySensingClusterServer();
22
- this.motion.createDefaultIlluminanceMeasurementClusterServer();
21
+ this.motion.createDefaultOccupancySensingClusterServer(false);
22
+ this.motion.createDefaultIlluminanceMeasurementClusterServer(250);
23
23
  this.motion.createDefaultPowerSourceReplaceableBatteryClusterServer();
24
24
  this.history.createMotionEveHistoryClusterServer(this.motion, this.log);
25
25
  this.history.autoPilot(this.motion);
@@ -35,6 +35,8 @@ export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
35
35
  }
36
36
  async onConfigure() {
37
37
  this.log.info('onConfigure called');
38
+ await this.motion?.setAttribute(OccupancySensing.Cluster.id, 'occupancy', { occupied: false }, this.log);
39
+ await this.motion?.setAttribute(IlluminanceMeasurement.Cluster.id, 'measuredValue', Math.round(Math.max(Math.min(10000 * Math.log10(500) + 1, 0xfffe), 0)), this.log);
38
40
  this.interval = setInterval(async () => {
39
41
  if (!this.motion || !this.history)
40
42
  return;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-eve-motion",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-eve-motion",
9
- "version": "1.2.2",
9
+ "version": "1.2.3",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "matter-history": "1.1.18",
@@ -15,6 +15,10 @@
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
18
+ },
19
+ "funding": {
20
+ "type": "buymeacoffee",
21
+ "url": "https://www.buymeacoffee.com/luligugithub"
18
22
  }
19
23
  },
20
24
  "node_modules/matter-history": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-eve-motion",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Matterbridge eve motion with history",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "MIT",
@@ -13,6 +13,10 @@
13
13
  "bugs": {
14
14
  "url": "https://github.com/Luligu/matterbridge-eve-motion/issues"
15
15
  },
16
+ "funding": {
17
+ "type": "buymeacoffee",
18
+ "url": "https://www.buymeacoffee.com/luligugithub"
19
+ },
16
20
  "keywords": [
17
21
  "matterbridge",
18
22
  "homebridge",
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ // enable isolatedModules just for ts-jest
5
+ "isolatedModules": true
6
+ },
7
+ "include": ["**/*.spec.ts", "**/*.test.ts", "**/__test__/*"]
8
+ }