matterbridge-eve-motion 1.3.0-dev-20250626-4975a59 → 1.3.0
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 +45 -5
- package/README.md +3 -2
- package/dist/platform.js +5 -8
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,47 @@
|
|
|
1
|
-
# Changelog
|
|
1
|
+
# <img src="matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge eve motion Changelog
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/matterbridge-eve-motion)
|
|
4
|
+
[](https://www.npmjs.com/package/matterbridge-eve-motion)
|
|
5
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://codecov.io/gh/Luligu/mmatterbridge-eve-motion)
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
12
|
+
[](https://www.npmjs.com/package/matter-history)
|
|
13
|
+
[](https://www.npmjs.com/package/node-ansi-logger)
|
|
14
|
+
[](https://www.npmjs.com/package/node-persist-manager)
|
|
15
|
+
|
|
16
|
+
---
|
|
2
17
|
|
|
3
18
|
All notable changes to this project will be documented in this file.
|
|
4
19
|
|
|
20
|
+
## [1.3.0] - 2025-06-26
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- [DevContainer]: Added support for the **Matterbridge Dev Container** with an optimized named volume for `node_modules`.
|
|
25
|
+
- [GitHub]: Added GitHub issue templates for bug reports and feature requests.
|
|
26
|
+
- [ESLint]: Refactored the flat config.
|
|
27
|
+
- [ESLint]: Added the plugins `eslint-plugin-promise`, `eslint-plugin-jsdoc`, and `@vitest/eslint-plugin`.
|
|
28
|
+
- [Jest]: Refactored the flat config.
|
|
29
|
+
- [Vitest]: Added Vitest for TypeScript project testing. It will replace Jest, which does not work correctly with ESM module mocks.
|
|
30
|
+
- [JSDoc]: Added missing JSDoc comments, including `@param` and `@returns` tags.
|
|
31
|
+
- [CodeQL]: Added CodeQL badge in the readme.
|
|
32
|
+
- [Codecov]: Added Codecov badge in the readme.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- [package]: Updated package to Automator v. 2.0.1.
|
|
37
|
+
- [package]: Updated dependencies.
|
|
38
|
+
- [storage]: Bumped `node-storage-manager` to 2.0.0.
|
|
39
|
+
- [logger]: Bumped `node-ansi-logger` to 3.1.1.
|
|
40
|
+
|
|
41
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
42
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
43
|
+
</a>
|
|
44
|
+
|
|
5
45
|
## [1.2.3] - 2025-04-30
|
|
6
46
|
|
|
7
47
|
### Changed
|
|
@@ -11,7 +51,7 @@ All notable changes to this project will be documented in this file.
|
|
|
11
51
|
- [package]: Update dependencies.
|
|
12
52
|
|
|
13
53
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
14
|
-
<img src="
|
|
54
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
15
55
|
</a>
|
|
16
56
|
|
|
17
57
|
## [1.2.2] - 2025-04-03
|
|
@@ -23,7 +63,7 @@ All notable changes to this project will be documented in this file.
|
|
|
23
63
|
- [package]: Update dependencies.
|
|
24
64
|
|
|
25
65
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
26
|
-
<img src="
|
|
66
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
27
67
|
</a>
|
|
28
68
|
|
|
29
69
|
## [1.2.1] - 2025-02-01
|
|
@@ -35,7 +75,7 @@ All notable changes to this project will be documented in this file.
|
|
|
35
75
|
- [package]: Update dependencies.
|
|
36
76
|
|
|
37
77
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
38
|
-
<img src="
|
|
78
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
39
79
|
</a>
|
|
40
80
|
|
|
41
81
|
## [1.1.0] - 2024-12-14
|
|
@@ -48,7 +88,7 @@ All notable changes to this project will be documented in this file.
|
|
|
48
88
|
- [package]: Update dependencies.
|
|
49
89
|
|
|
50
90
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
51
|
-
<img src="
|
|
91
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
52
92
|
</a>
|
|
53
93
|
|
|
54
94
|
<!-- Commented out section
|
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
# <img src="
|
|
1
|
+
# <img src="matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge eve motion with history
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/matterbridge-eve-motion)
|
|
4
4
|
[](https://www.npmjs.com/package/matterbridge-eve-motion)
|
|
5
5
|
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
6
|
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
7
|

|
|
8
|
-

|
|
9
|
+
[](https://codecov.io/gh/Luligu/mmatterbridge-eve-motion)
|
|
9
10
|
|
|
10
11
|
[](https://www.npmjs.com/package/matterbridge)
|
|
11
12
|
[](https://www.npmjs.com/package/matter-history)
|
package/dist/platform.js
CHANGED
|
@@ -5,6 +5,7 @@ export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
|
|
|
5
5
|
motion;
|
|
6
6
|
history;
|
|
7
7
|
interval;
|
|
8
|
+
occupied = false;
|
|
8
9
|
constructor(matterbridge, log, config) {
|
|
9
10
|
super(matterbridge, log, config);
|
|
10
11
|
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.0.0')) {
|
|
@@ -40,17 +41,13 @@ export class EveMotionPlatform extends MatterbridgeAccessoryPlatform {
|
|
|
40
41
|
this.interval = setInterval(async () => {
|
|
41
42
|
if (!this.motion || !this.history)
|
|
42
43
|
return;
|
|
43
|
-
|
|
44
|
-
if (!occupancyAttribute)
|
|
45
|
-
return;
|
|
46
|
-
let { occupied } = occupancyAttribute;
|
|
47
|
-
occupied = !occupied;
|
|
44
|
+
this.occupied = !this.occupied;
|
|
48
45
|
const lux = this.history.getFakeLevel(0, 1000, 0);
|
|
49
|
-
await this.motion.setAttribute(OccupancySensing.Cluster.id, 'occupancy', { occupied }, this.log);
|
|
46
|
+
await this.motion.setAttribute(OccupancySensing.Cluster.id, 'occupancy', { occupied: this.occupied }, this.log);
|
|
50
47
|
await this.motion.setAttribute(IlluminanceMeasurement.Cluster.id, 'measuredValue', Math.round(Math.max(Math.min(10000 * Math.log10(lux) + 1, 0xfffe), 0)), this.log);
|
|
51
48
|
this.history.setLastEvent();
|
|
52
|
-
this.history.addEntry({ time: this.history.now(), motion: occupied === true ? 0 : 1, lux });
|
|
53
|
-
this.log.info(`Set motion to ${occupied} and lux to ${lux}`);
|
|
49
|
+
this.history.addEntry({ time: this.history.now(), motion: this.occupied === true ? 0 : 1, lux });
|
|
50
|
+
this.log.info(`Set motion to ${this.occupied} and lux to ${lux}`);
|
|
54
51
|
}, 60 * 1000 + 200);
|
|
55
52
|
}
|
|
56
53
|
async onShutdown(reason) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-eve-motion",
|
|
3
|
-
"version": "1.3.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-eve-motion",
|
|
9
|
-
"version": "1.3.0
|
|
9
|
+
"version": "1.3.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"matter-history": "1.1.18",
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-eve-motion",
|
|
3
|
-
"version": "1.3.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Matterbridge eve motion with history",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
|
+
"homepage": "https://www.npmjs.com/package/matterbridge-eve-motion",
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "git+https://github.com/Luligu/matterbridge-eve-motion.git"
|