homebridge-eufy-security 4.4.2-beta.2 → 4.4.2-beta.20
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 +1 -1
- package/FUNDING.yml +1 -0
- package/README.md +14 -17
- package/dist/accessories/AutoSyncStationAccessory.js +26 -30
- package/dist/accessories/AutoSyncStationAccessory.js.map +1 -1
- package/dist/accessories/BaseAccessory.js +33 -46
- package/dist/accessories/BaseAccessory.js.map +1 -1
- package/dist/accessories/CameraAccessory.js +92 -167
- package/dist/accessories/CameraAccessory.js.map +1 -1
- package/dist/accessories/Device.js +11 -15
- package/dist/accessories/Device.js.map +1 -1
- package/dist/accessories/EntrySensorAccessory.js +7 -12
- package/dist/accessories/EntrySensorAccessory.js.map +1 -1
- package/dist/accessories/LockAccessory.js +20 -24
- package/dist/accessories/LockAccessory.js.map +1 -1
- package/dist/accessories/MotionSensorAccessory.js +7 -12
- package/dist/accessories/MotionSensorAccessory.js.map +1 -1
- package/dist/accessories/StationAccessory.js +40 -45
- package/dist/accessories/StationAccessory.js.map +1 -1
- package/dist/config.js +1 -4
- package/dist/config.js.map +1 -1
- package/dist/controller/LocalLivestreamManager.js +85 -89
- package/dist/controller/LocalLivestreamManager.js.map +1 -1
- package/dist/controller/recordingDelegate.js +116 -108
- package/dist/controller/recordingDelegate.js.map +1 -1
- package/dist/controller/snapshotDelegate.js +379 -0
- package/dist/controller/snapshotDelegate.js.map +1 -0
- package/dist/controller/streamingDelegate.js +202 -207
- package/dist/controller/streamingDelegate.js.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/interfaces.js +1 -2
- package/dist/interfaces.js.map +1 -1
- package/dist/platform.js +145 -165
- package/dist/platform.js.map +1 -1
- package/dist/settings.js +26 -19
- package/dist/settings.js.map +1 -1
- package/dist/utils/Talkback.js +9 -13
- package/dist/utils/Talkback.js.map +1 -1
- package/dist/utils/configTypes.js +12 -7
- package/dist/utils/configTypes.js.map +1 -1
- package/dist/utils/ffmpeg.js +44 -52
- package/dist/utils/ffmpeg.js.map +1 -1
- package/dist/utils/interfaces.js +1 -5
- package/dist/utils/interfaces.js.map +1 -1
- package/dist/utils/utils.js +32 -134
- package/dist/utils/utils.js.map +1 -1
- package/dist/version.js +1 -4
- package/dist/version.js.map +1 -1
- package/eslint.config.mjs +25 -47
- package/homebridge-eufy-security.png +0 -0
- package/homebridge-ui/public/app.js +221 -0
- package/homebridge-ui/public/assets/devices/eufycam3pro_large.png +0 -0
- package/homebridge-ui/public/assets/devices/homebase3_large.png +0 -0
- package/homebridge-ui/public/assets/devices/homebasemini_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamC210_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamC220_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamE30_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocamc35_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocame30_large.png +0 -0
- package/homebridge-ui/public/components/device-card.js +141 -0
- package/homebridge-ui/public/components/guard-modes.js +88 -0
- package/homebridge-ui/public/components/number-input.js +121 -0
- package/homebridge-ui/public/components/select.js +73 -0
- package/homebridge-ui/public/components/toggle.js +68 -0
- package/homebridge-ui/public/index.html +24 -14
- package/homebridge-ui/public/services/api.js +129 -0
- package/homebridge-ui/public/services/config.js +144 -0
- package/homebridge-ui/public/style.css +705 -0
- package/homebridge-ui/public/utils/countries.js +73 -0
- package/homebridge-ui/public/utils/device-images.js +69 -0
- package/homebridge-ui/public/utils/helpers.js +47 -0
- package/homebridge-ui/public/views/dashboard.js +211 -0
- package/homebridge-ui/public/views/device-detail.js +631 -0
- package/homebridge-ui/public/views/login.js +625 -0
- package/homebridge-ui/public/views/settings.js +389 -0
- package/homebridge-ui/public/views/unsupported-detail.js +216 -0
- package/homebridge-ui/server.js +567 -450
- package/package.json +19 -59
- package/dist/accessories/AutoSyncStationAccessory.d.ts +0 -42
- package/dist/accessories/AutoSyncStationAccessory.d.ts.map +0 -1
- package/dist/accessories/BaseAccessory.d.ts +0 -56
- package/dist/accessories/BaseAccessory.d.ts.map +0 -1
- package/dist/accessories/CameraAccessory.d.ts +0 -84
- package/dist/accessories/CameraAccessory.d.ts.map +0 -1
- package/dist/accessories/Device.d.ts +0 -19
- package/dist/accessories/Device.d.ts.map +0 -1
- package/dist/accessories/EntrySensorAccessory.d.ts +0 -25
- package/dist/accessories/EntrySensorAccessory.d.ts.map +0 -1
- package/dist/accessories/LockAccessory.d.ts +0 -45
- package/dist/accessories/LockAccessory.d.ts.map +0 -1
- package/dist/accessories/MotionSensorAccessory.d.ts +0 -25
- package/dist/accessories/MotionSensorAccessory.d.ts.map +0 -1
- package/dist/accessories/StationAccessory.d.ts +0 -86
- package/dist/accessories/StationAccessory.d.ts.map +0 -1
- package/dist/config.d.ts +0 -31
- package/dist/config.d.ts.map +0 -1
- package/dist/controller/LocalLivestreamManager.d.ts +0 -31
- package/dist/controller/LocalLivestreamManager.d.ts.map +0 -1
- package/dist/controller/SnapshotManager.d.ts +0 -64
- package/dist/controller/SnapshotManager.d.ts.map +0 -1
- package/dist/controller/SnapshotManager.js +0 -434
- package/dist/controller/SnapshotManager.js.map +0 -1
- package/dist/controller/recordingDelegate.d.ts +0 -27
- package/dist/controller/recordingDelegate.d.ts.map +0 -1
- package/dist/controller/streamingDelegate.d.ts +0 -52
- package/dist/controller/streamingDelegate.d.ts.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/interfaces.d.ts +0 -15
- package/dist/interfaces.d.ts.map +0 -1
- package/dist/platform.d.ts +0 -94
- package/dist/platform.d.ts.map +0 -1
- package/dist/settings.d.ts +0 -23
- package/dist/settings.d.ts.map +0 -1
- package/dist/utils/Talkback.d.ts +0 -21
- package/dist/utils/Talkback.d.ts.map +0 -1
- package/dist/utils/configTypes.d.ts +0 -68
- package/dist/utils/configTypes.d.ts.map +0 -1
- package/dist/utils/ffmpeg.d.ts +0 -111
- package/dist/utils/ffmpeg.d.ts.map +0 -1
- package/dist/utils/interfaces.d.ts +0 -8
- package/dist/utils/interfaces.d.ts.map +0 -1
- package/dist/utils/utils.d.ts +0 -35
- package/dist/utils/utils.d.ts.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/homebridge-ui/configui/app/util/types.d.ts +0 -65
- package/homebridge-ui/configui/app/util/types.d.ts.map +0 -1
- package/homebridge-ui/configui/app/util/types.js +0 -18
- package/homebridge-ui/configui/app/util/types.js.map +0 -1
- package/homebridge-ui/public/3rdpartylicenses.txt +0 -561
- package/homebridge-ui/public/assets/devices/homebase2_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/homebase3_large.jpg +0 -0
- package/homebridge-ui/public/assets/images/homebridge-eufy-security.png +0 -0
- package/homebridge-ui/public/favicon.ico +0 -0
- package/homebridge-ui/public/main.f6423287e0411c87.js +0 -1
- package/homebridge-ui/public/polyfills.efa2f09ba3e49167.js +0 -1
- package/homebridge-ui/public/runtime.ccde331d62c423b3.js +0 -1
- package/homebridge-ui/public/styles.13e635bf7a488639.css +0 -5
- package/homebridge-ui/server.d.ts +0 -2
- package/homebridge-ui/server.d.ts.map +0 -1
- package/homebridge-ui/server.js.map +0 -1
- package/homebridge-ui/version.d.ts +0 -2
- package/homebridge-ui/version.d.ts.map +0 -1
- package/homebridge-ui/version.js +0 -5
- package/homebridge-ui/version.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Homebridge Eufy Security",
|
|
3
3
|
"name": "homebridge-eufy-security",
|
|
4
|
-
"version": "4.4.2-beta.
|
|
4
|
+
"version": "4.4.2-beta.20",
|
|
5
5
|
"description": "Control Eufy Security from homebridge.",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"license": "Apache-2.0",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
|
-
"url": "git://github.com/homebridge-eufy-security
|
|
10
|
+
"url": "git://github.com/homebridge-plugins/homebridge-eufy-security.git"
|
|
10
11
|
},
|
|
11
12
|
"funding": [
|
|
12
13
|
{
|
|
13
14
|
"type": "github",
|
|
14
|
-
"url": "https://github.com/sponsors/
|
|
15
|
+
"url": "https://github.com/sponsors/lenoxys"
|
|
15
16
|
}
|
|
16
17
|
],
|
|
17
18
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/homebridge-eufy-security/
|
|
19
|
+
"url": "https://github.com/homebridge-plugins/homebridge-eufy-security/issues"
|
|
19
20
|
},
|
|
20
21
|
"engines": {
|
|
21
|
-
"node": "^24",
|
|
22
|
-
"homebridge": ">=1.9.0 <1.12.0"
|
|
22
|
+
"node": "^20 || ^22 || ^24",
|
|
23
|
+
"homebridge": ">=1.9.0 <1.12.0 || ^2.0.0-beta.0"
|
|
23
24
|
},
|
|
24
25
|
"main": "dist/index.js",
|
|
25
26
|
"scripts": {
|
|
26
|
-
"lint": "eslint src
|
|
27
|
+
"lint": "eslint 'src/**/*.ts' --max-warnings=0",
|
|
27
28
|
"lint-fix": "eslint src/** --max-warnings=0 --fix",
|
|
28
29
|
"watch": "npm run build && npm link && nodemon",
|
|
29
|
-
"build": "npm run build-plugin && npm run postbuild
|
|
30
|
-
"build-plugin": "rimraf ./dist && tsc
|
|
31
|
-
"build-configui": "rimraf ./homebridge-ui && ng build --base-href /api/plugins/settings-ui/homebridge-eufy-security/ && tsc --project tsconfig.configui.server.json",
|
|
30
|
+
"build": "npm run build-plugin && npm run postbuild",
|
|
31
|
+
"build-plugin": "rimraf ./dist && tsc",
|
|
32
32
|
"postbuild": "cp -r ./media ./dist/media",
|
|
33
|
-
"prebuild": "node -
|
|
34
|
-
"serve-configui": "ng serve",
|
|
33
|
+
"prebuild": "node --input-type=module -e \"import{readFileSync}from'fs';const p=JSON.parse(readFileSync('./package.json','utf8'));process.stdout.write('export const LIB_VERSION = '+JSON.stringify(p.version)+';\\n');\" > src/version.ts",
|
|
35
34
|
"prepublishOnly": "npm run lint && npm run build"
|
|
36
35
|
},
|
|
37
36
|
"keywords": [
|
|
@@ -44,65 +43,26 @@
|
|
|
44
43
|
"camera"
|
|
45
44
|
],
|
|
46
45
|
"dependencies": {
|
|
47
|
-
"@homebridge/plugin-ui-utils": "^2.1.
|
|
46
|
+
"@homebridge/plugin-ui-utils": "^2.1.3",
|
|
48
47
|
"eufy-security-client": "^3.6.0",
|
|
49
48
|
"ffmpeg-for-homebridge": "2.2.1",
|
|
50
49
|
"fs-extra": "^11.3.3",
|
|
51
50
|
"pick-port": "^2.2.0",
|
|
52
51
|
"rotating-file-stream": "^3.2.8",
|
|
53
52
|
"tslog": "^4.10.2",
|
|
54
|
-
"zip-lib": "^1.1
|
|
53
|
+
"zip-lib": "^1.2.1"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@angular-devkit/build-angular": "^21.1.2",
|
|
58
|
-
"@angular-devkit/core": "^21.1.2",
|
|
59
|
-
"@angular-eslint/builder": "21.2.0",
|
|
60
|
-
"@angular-eslint/eslint-plugin": "21.2.0",
|
|
61
|
-
"@angular-eslint/eslint-plugin-template": "21.2.0",
|
|
62
|
-
"@angular-eslint/schematics": "21.2.0",
|
|
63
|
-
"@angular-eslint/template-parser": "21.2.0",
|
|
64
|
-
"@angular/cli": "^21.1.2",
|
|
65
|
-
"@angular/common": "~21.1.2",
|
|
66
|
-
"@angular/compiler": "~21.1.2",
|
|
67
|
-
"@angular/compiler-cli": "~21.1.2",
|
|
68
|
-
"@angular/core": "~21.1.2",
|
|
69
|
-
"@angular/forms": "~21.1.2",
|
|
70
|
-
"@angular/localize": "~21.1.2",
|
|
71
|
-
"@angular/platform-browser": "~21.1.2",
|
|
72
|
-
"@angular/platform-browser-dynamic": "~21.1.2",
|
|
73
|
-
"@angular/router": "~21.1.2",
|
|
74
|
-
"@eslint/eslintrc": "^3.3.3",
|
|
75
56
|
"@eslint/js": "^9.39.2",
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@types/node": "^25.2.0",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "8.54.0",
|
|
81
|
-
"@typescript-eslint/parser": "8.54.0",
|
|
82
|
-
"bootstrap": "^5.3.8",
|
|
57
|
+
"@types/node": "^25.2.3",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "8.55.0",
|
|
59
|
+
"@typescript-eslint/parser": "8.55.0",
|
|
83
60
|
"eslint": "^9.39.2",
|
|
84
|
-
"homebridge": "^1.11.
|
|
85
|
-
"jasmine-core": "~6.0.1",
|
|
86
|
-
"karma": "~6.4.4",
|
|
87
|
-
"karma-chrome-launcher": "~3.2.0",
|
|
88
|
-
"karma-coverage": "~2.2.1",
|
|
89
|
-
"karma-jasmine": "~5.1.0",
|
|
90
|
-
"karma-jasmine-html-reporter": "~2.2.0",
|
|
91
|
-
"lucide-angular": "^0.563.0",
|
|
61
|
+
"homebridge": "^1.11.2",
|
|
92
62
|
"nodemon": "^3.1.11",
|
|
93
63
|
"rimraf": "^6.1.2",
|
|
94
|
-
"
|
|
95
|
-
"typescript": "^5.9.3",
|
|
96
|
-
"zone.js": "~0.16.0"
|
|
64
|
+
"typescript": "^5.9.3"
|
|
97
65
|
},
|
|
98
|
-
"
|
|
99
|
-
"autoprefixer": "^10.4.5"
|
|
100
|
-
},
|
|
101
|
-
"eslintConfig": {
|
|
102
|
-
"rules": {
|
|
103
|
-
"ban-ts-comment": 0
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"homepage": "https://github.com/homebridge-eufy-security/plugin/wiki",
|
|
66
|
+
"homepage": "https://github.com/homebridge-plugins/homebridge-eufy-security/wiki",
|
|
107
67
|
"author": "homebridge-eufy-security"
|
|
108
68
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { Station } from 'eufy-security-client';
|
|
4
|
-
/**
|
|
5
|
-
* Platform Auto Accessory
|
|
6
|
-
* An instance of this class is created for each accessory your platform registers
|
|
7
|
-
* Each accessory may expose multiple services of different service types.
|
|
8
|
-
*/
|
|
9
|
-
export declare class AutoSyncStationAccessory {
|
|
10
|
-
private accessory;
|
|
11
|
-
private device;
|
|
12
|
-
private static first;
|
|
13
|
-
private static alarmFired;
|
|
14
|
-
private static childs;
|
|
15
|
-
private static first_station;
|
|
16
|
-
readonly name: string;
|
|
17
|
-
protected guardModeChangeTimeout: {
|
|
18
|
-
timeout: NodeJS.Timeout | null;
|
|
19
|
-
delay: number;
|
|
20
|
-
};
|
|
21
|
-
protected static alarmFiredTimeout: {
|
|
22
|
-
timeout: NodeJS.Timeout | null;
|
|
23
|
-
delay: number;
|
|
24
|
-
};
|
|
25
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Station);
|
|
26
|
-
private initChildEventRegister;
|
|
27
|
-
/**
|
|
28
|
-
* Handle requests to set the 'Security System Target State' to all childs
|
|
29
|
-
*/
|
|
30
|
-
private changeModeToAllChilds;
|
|
31
|
-
/**
|
|
32
|
-
* Handle requests to synchronize alarm events to all child stations.
|
|
33
|
-
* @param station The station triggering the alarm event.
|
|
34
|
-
* @param alarmEvent The type of alarm event.
|
|
35
|
-
*/
|
|
36
|
-
private fireAlarmToAllChilds;
|
|
37
|
-
/**
|
|
38
|
-
* Handle requests to set the 'Security System Target State' characteristic
|
|
39
|
-
*/
|
|
40
|
-
protected handleSecuritySystemTargetStateSet(mode: number): void;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=AutoSyncStationAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AutoSyncStationAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/AutoSyncStationAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAyB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAItE;;;;GAIG;AACH,qBAAa,wBAAwB;IAqBjC,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IApBhB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAiB;IACrC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAkB;IAC3C,OAAO,CAAC,MAAM,CAAC,MAAM,CAAkC;IACvD,OAAO,CAAC,MAAM,CAAC,aAAa,CAA4C;IAExE,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,SAAS,CAAC,sBAAsB,EAAE;QAChC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;QAC/B,KAAK,EAAE,MAAM,CAAC;KACf,CAAkC;IAEnC,SAAS,CAAC,MAAM,CAAC,iBAAiB,EAAE;QAClC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;QAC/B,KAAK,EAAE,MAAM,CAAC;KACf,CAAkC;gBAGjC,QAAQ,EAAE,oBAAoB,EACtB,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,OAAO;IAkCzB,OAAO,CAAC,sBAAsB;IA0B9B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAsD5B;;OAEG;IACH,SAAS,CAAC,kCAAkC,CAAC,IAAI,EAAE,MAAM;CAgC1D"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory, Characteristic, CharacteristicValue, Service, WithUUID } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { DeviceEvents, PropertyValue, StationEvents } from 'eufy-security-client';
|
|
4
|
-
import { EventEmitter } from 'events';
|
|
5
|
-
import { ILogObj, Logger } from 'tslog';
|
|
6
|
-
export type CharacteristicType = WithUUID<{
|
|
7
|
-
new (): Characteristic;
|
|
8
|
-
}>;
|
|
9
|
-
export type ServiceType = WithUUID<typeof Service> | Service;
|
|
10
|
-
export declare abstract class BaseAccessory extends EventEmitter {
|
|
11
|
-
readonly platform: EufySecurityPlatform;
|
|
12
|
-
readonly accessory: PlatformAccessory;
|
|
13
|
-
device: any;
|
|
14
|
-
protected servicesInUse: Service[];
|
|
15
|
-
readonly SN: string;
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly log: Logger<ILogObj>;
|
|
18
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: any);
|
|
19
|
-
private logPropertyKeys;
|
|
20
|
-
protected handleRawPropertyChange(device: any, type: number, value: string): void;
|
|
21
|
-
protected handlePropertyChange(device: any, name: string, value: PropertyValue): void;
|
|
22
|
-
/**
|
|
23
|
-
* Register characteristics for a given Homebridge service.
|
|
24
|
-
*
|
|
25
|
-
* This method handles the registration of Homebridge characteristics.
|
|
26
|
-
* It includes optional features like value debouncing and event triggers.
|
|
27
|
-
*
|
|
28
|
-
* @param {Object} params - Parameters needed for registering characteristics.
|
|
29
|
-
*/
|
|
30
|
-
protected registerCharacteristic({ characteristicType, serviceType, getValue, setValue, onValue, onSimpleValue, onMultipleValue, name, serviceSubType, setValueDebounceTime, }: {
|
|
31
|
-
characteristicType: CharacteristicType;
|
|
32
|
-
serviceType: ServiceType;
|
|
33
|
-
serviceSubType?: string;
|
|
34
|
-
name?: string;
|
|
35
|
-
getValue?: (data: any, characteristic?: Characteristic, service?: Service) => any;
|
|
36
|
-
setValue?: (value: any, characteristic?: Characteristic, service?: Service) => any;
|
|
37
|
-
onValue?: (service: Service, characteristic: Characteristic) => any;
|
|
38
|
-
onSimpleValue?: any;
|
|
39
|
-
onMultipleValue?: (keyof DeviceEvents | StationEvents)[];
|
|
40
|
-
setValueDebounceTime?: number;
|
|
41
|
-
}): void;
|
|
42
|
-
/**
|
|
43
|
-
* Retrieve an existing service or create a new one if it doesn't exist.
|
|
44
|
-
*
|
|
45
|
-
* @param {ServiceType} serviceType - The type of service to retrieve or create.
|
|
46
|
-
* @param {string} [name] - The name of the service (optional).
|
|
47
|
-
* @param {string} [subType] - The subtype of the service (optional).
|
|
48
|
-
* @returns {Service} Returns the existing or newly created service.
|
|
49
|
-
* @throws Will throw an error if there are overlapping services.
|
|
50
|
-
*/
|
|
51
|
-
getService(serviceType: ServiceType, name?: string, subType?: string): Service;
|
|
52
|
-
protected pruneUnusedServices(): void;
|
|
53
|
-
protected handleDummyEventGet(serviceName: string): Promise<CharacteristicValue>;
|
|
54
|
-
protected handleDummyEventSet(serviceName: string, value: CharacteristicValue): void;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=BaseAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/BaseAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAc,YAAY,EAAE,aAAa,EAAmB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,QAAO,cAAc,CAAA;CAAE,CAAC,CAAC;AACrE,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,GAAG,OAAO,CAAC;AAE7D,8BAAsB,aAAc,SAAQ,YAAY;aAQpC,QAAQ,EAAE,oBAAoB;aAC9B,SAAS,EAAE,iBAAiB;IAErC,MAAM,EAAE,GAAG;IATpB,SAAS,CAAC,aAAa,EAAE,OAAO,EAAE,CAAM;IACxC,SAAgB,E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oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B;IAgED;;;;;;;;OAQG;IACI,UAAU,CACf,WAAW,EAAE,WAAW,EACxB,IAAI,SAAY,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO;IA4BV,SAAS,CAAC,mBAAmB;IAgB7B,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAgBhF,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;CAG9E"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory, CharacteristicValue, Resolution } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { DeviceAccessory } from './Device';
|
|
4
|
-
import { Camera, DeviceEvents, PropertyName, StreamMetadata, PropertyValue } from 'eufy-security-client';
|
|
5
|
-
import { CameraConfig } from '../utils/configTypes';
|
|
6
|
-
import { StreamingDelegate } from '../controller/streamingDelegate';
|
|
7
|
-
import { RecordingDelegate } from '../controller/recordingDelegate';
|
|
8
|
-
export interface ProtectCameraChannelConfig {
|
|
9
|
-
bitrate: number;
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
fps: number;
|
|
12
|
-
height: number;
|
|
13
|
-
id: number;
|
|
14
|
-
idrInterval: number;
|
|
15
|
-
isRtspEnabled: boolean;
|
|
16
|
-
name: string;
|
|
17
|
-
width: number;
|
|
18
|
-
}
|
|
19
|
-
export interface RtspEntry {
|
|
20
|
-
channel: ProtectCameraChannelConfig;
|
|
21
|
-
lens?: number;
|
|
22
|
-
name: string;
|
|
23
|
-
resolution: Resolution;
|
|
24
|
-
url: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Platform Accessory
|
|
28
|
-
* An instance of this class is created for each accessory your platform registers
|
|
29
|
-
* Each accessory may expose multiple services of different service types.
|
|
30
|
-
*/
|
|
31
|
-
export declare class CameraAccessory extends DeviceAccessory {
|
|
32
|
-
protected cameraStatus: {
|
|
33
|
-
isEnabled: boolean;
|
|
34
|
-
timestamp: number;
|
|
35
|
-
};
|
|
36
|
-
private notificationTimeout;
|
|
37
|
-
readonly cameraConfig: CameraConfig;
|
|
38
|
-
hardwareTranscoding: boolean;
|
|
39
|
-
hardwareDecoding: boolean;
|
|
40
|
-
timeshift: boolean;
|
|
41
|
-
hksvRecording: boolean;
|
|
42
|
-
HksvErrors: number;
|
|
43
|
-
isOnline: boolean;
|
|
44
|
-
rtsp_url: string;
|
|
45
|
-
metadata: StreamMetadata;
|
|
46
|
-
standalone: boolean;
|
|
47
|
-
readonly eventTypesToHandle: (keyof DeviceEvents)[];
|
|
48
|
-
protected streamingDelegate: StreamingDelegate | null;
|
|
49
|
-
protected recordingDelegate?: RecordingDelegate | null;
|
|
50
|
-
resolutions: Resolution[];
|
|
51
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Camera);
|
|
52
|
-
private setupCamera;
|
|
53
|
-
private setupButtonService;
|
|
54
|
-
protected setupSwitchService(serviceName: string, serviceType: 'switch' | 'lightbulb' | 'outlet', propertyName: PropertyName): void;
|
|
55
|
-
private setupEnableButton;
|
|
56
|
-
private setupMotionButton;
|
|
57
|
-
private setupLightButton;
|
|
58
|
-
private setupChimeButton;
|
|
59
|
-
/**
|
|
60
|
-
* Get the configuration for a camera device.
|
|
61
|
-
*
|
|
62
|
-
* - Combines default settings with those from the platform config.
|
|
63
|
-
* - Validates certain settings like talkback capability.
|
|
64
|
-
*
|
|
65
|
-
* @returns {CameraConfig} The finalized camera configuration.
|
|
66
|
-
*/
|
|
67
|
-
private getCameraConfig;
|
|
68
|
-
private cameraFunction;
|
|
69
|
-
private setupMotionFunction;
|
|
70
|
-
protected getCameraPropertyValue(characteristic: any, propertyName: PropertyName): CharacteristicValue;
|
|
71
|
-
protected applyPropertyValue(characteristic: any, propertyName: PropertyName, value: PropertyValue): CharacteristicValue;
|
|
72
|
-
protected setCameraPropertyValue(characteristic: any, propertyName: PropertyName, value: CharacteristicValue): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Handle push notifications for a doorbell device.
|
|
75
|
-
* Mute subsequent notifications within a timeout period.
|
|
76
|
-
* @param characteristic - The Characteristic to update for HomeKit.
|
|
77
|
-
*/
|
|
78
|
-
private onDeviceRingsPushNotification;
|
|
79
|
-
getBitrate(): number;
|
|
80
|
-
setBitrate(): Promise<boolean>;
|
|
81
|
-
private configureVideoStream;
|
|
82
|
-
private getCameraControllerOptions;
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=CameraAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CameraAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/CameraAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,UAAU,EAWX,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAe,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEtH,OAAO,EAAE,YAAY,EAA+B,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,MAAM,WAAW,0BAA0B;IAEzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK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B;YAIjB,iBAAiB;YAIjB,gBAAgB;YAIhB,gBAAgB;IAI9B;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAqCvB,OAAO,CAAC,cAAc;IAgKtB,OAAO,CAAC,mBAAmB;IAoC3B,SAAS,CAAC,sBAAsB,CAAC,cAAc,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,GAAG,mBAAmB;IAWtG,SAAS,CAAC,kBAAkB,CAAC,cAAc,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,GAAG,mBAAmB;cA6BxG,sBAAsB,CAAC,cAAc,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,mBAAmB;IAyBlH;;;;OAIG;IACH,OAAO,CAAC,6BAA6B;IAY9B,UAAU,IAAI,MAAM;IAMd,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAK3C,OAAO,CAAC,oBAAoB;IAoC5B,OAAO,CAAC,0BAA0B;CAqEnC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory, Characteristic, CharacteristicValue, Service, WithUUID } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { BaseAccessory } from './BaseAccessory';
|
|
4
|
-
import { Device, PropertyName } from 'eufy-security-client';
|
|
5
|
-
export type CharacteristicType = WithUUID<{
|
|
6
|
-
new (): Characteristic;
|
|
7
|
-
}>;
|
|
8
|
-
export type ServiceType = WithUUID<typeof Service> | Service;
|
|
9
|
-
export declare abstract class DeviceAccessory extends BaseAccessory {
|
|
10
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Device);
|
|
11
|
-
/**
|
|
12
|
-
* Get the current value of the "propertyName" characteristic
|
|
13
|
-
*/
|
|
14
|
-
getPropertyValue(characteristic: string, propertyName: PropertyName): CharacteristicValue;
|
|
15
|
-
setPropertyValue(propertyName: PropertyName, value: unknown): Promise<void>;
|
|
16
|
-
protected onPushNotification(characteristicType: CharacteristicType, serviceType: ServiceType, value: CharacteristicValue): void;
|
|
17
|
-
initSensorService(): void;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=Device.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/Device.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,QAAO,cAAc,CAAA;CAAE,CAAC,CAAC;AACrE,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,GAAG,OAAO,CAAC;AAE7D,8BAAsB,eAAgB,SAAQ,aAAa;gBAGvD,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,MAAM;IAKhB;;OAEG;IACI,gBAAgB,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,mBAAmB;IAWnF,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO;IAIxE,SAAS,CAAC,kBAAkB,CAC1B,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,mBAAmB,GACzB,IAAI;IAOP,iBAAiB;CAoClB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { DeviceAccessory } from './Device';
|
|
4
|
-
import { EntrySensor } from 'eufy-security-client';
|
|
5
|
-
/**
|
|
6
|
-
* EntrySensorAccessory Class
|
|
7
|
-
*
|
|
8
|
-
* This class represents an entry sensor accessory within a home automation system. It is designed
|
|
9
|
-
* to integrate entry sensors into the system, register appropriate characteristics, and provide
|
|
10
|
-
* necessary functionality for monitoring the open or closed state of doors or windows.
|
|
11
|
-
*
|
|
12
|
-
* @class EntrySensorAccessory
|
|
13
|
-
* @extends DeviceAccessory
|
|
14
|
-
*/
|
|
15
|
-
export declare class EntrySensorAccessory extends DeviceAccessory {
|
|
16
|
-
/**
|
|
17
|
-
* Constructor for EntrySensorAccessory.
|
|
18
|
-
*
|
|
19
|
-
* @param {EufySecurityPlatform} platform - The platform instance managing accessories.
|
|
20
|
-
* @param {PlatformAccessory} accessory - The platform-specific accessory.
|
|
21
|
-
* @param {EntrySensor} device - The entry sensor device being represented.
|
|
22
|
-
*/
|
|
23
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: EntrySensor);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=EntrySensorAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntrySensorAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/EntrySensorAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,OAAO,EAAE,WAAW,EAAgB,MAAM,sBAAsB,CAAC;AAGjE;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IAEvD;;;;;;OAMG;gBAED,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,WAAW;CA8BtB"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { DeviceAccessory } from './Device';
|
|
4
|
-
import { Lock } from 'eufy-security-client';
|
|
5
|
-
/**
|
|
6
|
-
* LockAccessory Class
|
|
7
|
-
*
|
|
8
|
-
* This class represents a lock accessory within a home automation system. It is designed to
|
|
9
|
-
* integrate smart locks into the system, register appropriate HomeKit characteristics, and provide
|
|
10
|
-
* functionality for controlling and monitoring the lock's status.
|
|
11
|
-
*
|
|
12
|
-
* @class LockAccessory
|
|
13
|
-
* @extends DeviceAccessory
|
|
14
|
-
*/
|
|
15
|
-
export declare class LockAccessory extends DeviceAccessory {
|
|
16
|
-
/**
|
|
17
|
-
* Constructor for LockAccessory.
|
|
18
|
-
*
|
|
19
|
-
* @param {EufySecurityPlatform} platform - The platform instance managing accessories.
|
|
20
|
-
* @param {PlatformAccessory} accessory - The platform-specific accessory.
|
|
21
|
-
* @param {Lock} device - The lock device being represented.
|
|
22
|
-
*/
|
|
23
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Lock);
|
|
24
|
-
/**
|
|
25
|
-
* Initializes characteristics for the Lock Management Service.
|
|
26
|
-
*/
|
|
27
|
-
private initLockManagementService;
|
|
28
|
-
/**
|
|
29
|
-
* Initializes characteristics for the Lock Mechanism Service.
|
|
30
|
-
*/
|
|
31
|
-
private initLockMechanismService;
|
|
32
|
-
/**
|
|
33
|
-
* Gets the lock status and maps it to HomeKit lock states.
|
|
34
|
-
*/
|
|
35
|
-
private getLockStatus;
|
|
36
|
-
/**
|
|
37
|
-
* Sets the lock target state asynchronously.
|
|
38
|
-
*/
|
|
39
|
-
private setLockTargetState;
|
|
40
|
-
/**
|
|
41
|
-
* Converts lock status codes to corresponding HomeKit lock states.
|
|
42
|
-
*/
|
|
43
|
-
private convertLockStatusCode;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=LockAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LockAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/LockAccessory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAgB,MAAM,sBAAsB,CAAC;AAG1D;;;;;;;;;GASG;AACH,qBAAa,aAAc,SAAQ,eAAe;IAEhD;;;;;;OAMG;gBAED,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,IAAI;IAwBd;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA8BjC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAuChC;;OAEG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;YACW,kBAAkB;IAShC;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAO9B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PlatformAccessory } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { DeviceAccessory } from './Device';
|
|
4
|
-
import { MotionSensor } from 'eufy-security-client';
|
|
5
|
-
/**
|
|
6
|
-
* MotionSensorAccessory Class
|
|
7
|
-
*
|
|
8
|
-
* This class represents a motion sensor accessory within a home automation system. It is designed
|
|
9
|
-
* to integrate motion sensors into the system, register appropriate characteristics, and provide
|
|
10
|
-
* necessary functionality for motion detection.
|
|
11
|
-
*
|
|
12
|
-
* @class MotionSensorAccessory
|
|
13
|
-
* @extends DeviceAccessory
|
|
14
|
-
*/
|
|
15
|
-
export declare class MotionSensorAccessory extends DeviceAccessory {
|
|
16
|
-
/**
|
|
17
|
-
* Constructor for MotionSensorAccessory.
|
|
18
|
-
*
|
|
19
|
-
* @param {EufySecurityPlatform} platform - The platform instance managing accessories.
|
|
20
|
-
* @param {PlatformAccessory} accessory - The platform-specific accessory.
|
|
21
|
-
* @param {MotionSensor} device - The motion sensor device being represented.
|
|
22
|
-
*/
|
|
23
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: MotionSensor);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=MotionSensorAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MotionSensorAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/MotionSensorAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAgB,MAAM,sBAAsB,CAAC;AAGlE;;;;;;;;;GASG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IAExD;;;;;;OAMG;gBAED,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,YAAY;CA8BvB"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Characteristic, PlatformAccessory, CharacteristicValue } from 'homebridge';
|
|
2
|
-
import { EufySecurityPlatform } from '../platform';
|
|
3
|
-
import { BaseAccessory } from './BaseAccessory';
|
|
4
|
-
import { Station, PropertyName, PropertyValue, AlarmEvent } from 'eufy-security-client';
|
|
5
|
-
import { StationConfig } from '../utils/configTypes';
|
|
6
|
-
export declare enum HKGuardMode {
|
|
7
|
-
STAY_ARM = 0,
|
|
8
|
-
AWAY_ARM = 1,
|
|
9
|
-
NIGHT_ARM = 2,
|
|
10
|
-
DISARM = 3
|
|
11
|
-
}
|
|
12
|
-
export interface EufyMode {
|
|
13
|
-
hk: number;
|
|
14
|
-
eufy: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Platform Accessory
|
|
18
|
-
* An instance of this class is created for each accessory your platform registers
|
|
19
|
-
* Each accessory may expose multiple services of different service types.
|
|
20
|
-
*/
|
|
21
|
-
export declare class StationAccessory extends BaseAccessory {
|
|
22
|
-
readonly stationConfig: StationConfig;
|
|
23
|
-
readonly hasKeyPad: boolean;
|
|
24
|
-
private readonly modes;
|
|
25
|
-
private alarm_triggered;
|
|
26
|
-
private alarm_delayed;
|
|
27
|
-
private alarm_delay_timeout?;
|
|
28
|
-
private guardModeChangeTimeout;
|
|
29
|
-
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Station);
|
|
30
|
-
/**
|
|
31
|
-
* Get the current value of the "propertyName" characteristic
|
|
32
|
-
*/
|
|
33
|
-
protected getPropertyValue(propertyName: PropertyName): PropertyValue;
|
|
34
|
-
protected setPropertyValue(propertyName: PropertyName, value: unknown): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Gets the station configuration based on several possible sources.
|
|
37
|
-
* Priority is given to custom configurations (if available), then falls back to global configs,
|
|
38
|
-
* and lastly uses default values if neither custom nor global configs are set.
|
|
39
|
-
*
|
|
40
|
-
* @returns {StationConfig} The final configuration settings for the station
|
|
41
|
-
*/
|
|
42
|
-
private getStationConfig;
|
|
43
|
-
private mappingHKEufy;
|
|
44
|
-
private onStationGuardModePushNotification;
|
|
45
|
-
private onStationCurrentModePushNotification;
|
|
46
|
-
onStationAlarmEventPushNotification(characteristic: Characteristic, alarmEvent: AlarmEvent): void;
|
|
47
|
-
/**
|
|
48
|
-
* Convert a HomeKit mode number to its corresponding Eufy mode number.
|
|
49
|
-
* Searches the `this.modes` array to find a matching HomeKit mode.
|
|
50
|
-
* Throws an error if a matching mode is not found.
|
|
51
|
-
*
|
|
52
|
-
* @param {number} hkMode - The HomeKit mode to convert
|
|
53
|
-
* @returns {number} The corresponding Eufy mode
|
|
54
|
-
* @throws {Error} If a matching mode is not found
|
|
55
|
-
*/
|
|
56
|
-
convertHKtoEufy(hkMode: number): number;
|
|
57
|
-
/**
|
|
58
|
-
* Convert a Eufy mode number to its corresponding HomeKit mode number.
|
|
59
|
-
* Searches the `this.modes` array to find a matching Eufy mode.
|
|
60
|
-
* Throws an error if a matching mode is not found.
|
|
61
|
-
*
|
|
62
|
-
* @param {number} eufyMode - The Eufy mode to convert
|
|
63
|
-
* @returns {number} The corresponding HomeKit mode
|
|
64
|
-
* @throws {Error} If a matching mode is not found
|
|
65
|
-
*/
|
|
66
|
-
convertEufytoHK(eufyMode: number): number;
|
|
67
|
-
/**
|
|
68
|
-
* Handle requests to get the current value of the 'Security System Current State' characteristic
|
|
69
|
-
*/
|
|
70
|
-
protected handleSecuritySystemCurrentStateGet(): CharacteristicValue;
|
|
71
|
-
/**
|
|
72
|
-
* Handle requests to get the current value of the 'Security System Target State' characteristic
|
|
73
|
-
*/
|
|
74
|
-
private handleSecuritySystemTargetStateGet;
|
|
75
|
-
/**
|
|
76
|
-
* Handle requests to set the 'Security System Target State' characteristic
|
|
77
|
-
*/
|
|
78
|
-
private handleSecuritySystemTargetStateSet;
|
|
79
|
-
private handleManualTriggerSwitchStateGet;
|
|
80
|
-
private handleManualTriggerSwitchStateSet;
|
|
81
|
-
onStationAlarmDelayedEvent(station: Station, armDelay: number): void;
|
|
82
|
-
onStationAlarmArmedEvent(): void;
|
|
83
|
-
getGuardModeName(value: CharacteristicValue): string;
|
|
84
|
-
private updateManuelTriggerButton;
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=StationAccessory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StationAccessory.d.ts","sourceRoot":"","sources":["../../src/plugin/accessories/StationAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAA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IAOpE;;OAEG;IACH,OAAO,CAAC,kCAAkC;IAe1C;;OAEG;IACH,OAAO,CAAC,kCAAkC;IA4C1C,OAAO,CAAC,iCAAiC;YAI3B,iCAAiC;IAwCxC,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;IAc7D,wBAAwB;IASxB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM;IAS3D,OAAO,CAAC,yBAAyB;CAMlC"}
|
package/dist/config.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { PlatformConfig } from 'homebridge';
|
|
2
|
-
import { CameraConfig, StationConfig } from './utils/configTypes';
|
|
3
|
-
/**
|
|
4
|
-
* HomebridgePlatform
|
|
5
|
-
* This class is the main constructor for your plugin, this is where you should
|
|
6
|
-
* parse the user config and discover/register accessories with Homebridge.
|
|
7
|
-
*/
|
|
8
|
-
export interface EufySecurityPlatformConfig extends PlatformConfig {
|
|
9
|
-
username: string;
|
|
10
|
-
password: string;
|
|
11
|
-
deviceName: string;
|
|
12
|
-
enableDetailedLogging: boolean;
|
|
13
|
-
omitLogFiles: boolean;
|
|
14
|
-
CameraMaxLivestreamDuration: number;
|
|
15
|
-
pollingIntervalMinutes: number;
|
|
16
|
-
hkHome: number;
|
|
17
|
-
hkAway: number;
|
|
18
|
-
hkNight: number;
|
|
19
|
-
hkOff: number;
|
|
20
|
-
ignoreStations: string[];
|
|
21
|
-
ignoreDevices: string[];
|
|
22
|
-
country: string;
|
|
23
|
-
cameras: CameraConfig[];
|
|
24
|
-
stations: StationConfig[];
|
|
25
|
-
cleanCache: boolean;
|
|
26
|
-
ignoreMultipleDevicesWarning: boolean;
|
|
27
|
-
autoSyncStation: boolean;
|
|
28
|
-
enableEmbeddedPKCS1Support: boolean;
|
|
29
|
-
}
|
|
30
|
-
export declare const DEFAULT_CONFIG_VALUES: EufySecurityPlatformConfig;
|
|
31
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/plugin/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,0BAA2B,SAAQ,cAAc;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,2BAA2B,EAAE,MAAM,CAAC;IACpC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,4BAA4B,EAAE,OAAO,CAAC;IACtC,eAAe,EAAE,OAAO,CAAC;IACzB,0BAA0B,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,qBAAqB,EAAE,0BAuBnC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Readable } from 'stream';
|
|
2
|
-
import { Station, Device, StreamMetadata } from 'eufy-security-client';
|
|
3
|
-
import { CameraAccessory } from '../accessories/CameraAccessory';
|
|
4
|
-
import { ILogObj, Logger } from 'tslog';
|
|
5
|
-
type StationStream = {
|
|
6
|
-
station: Station;
|
|
7
|
-
device: Device;
|
|
8
|
-
metadata: StreamMetadata;
|
|
9
|
-
videostream: Readable;
|
|
10
|
-
audiostream: Readable;
|
|
11
|
-
createdAt: number;
|
|
12
|
-
};
|
|
13
|
-
export declare class LocalLivestreamManager extends EventEmitter {
|
|
14
|
-
private camera;
|
|
15
|
-
private readonly CONNECTION_ESTABLISHED_TIMEOUT;
|
|
16
|
-
private stationStream;
|
|
17
|
-
private livestreamStartedAt;
|
|
18
|
-
private livestreamIsStarting;
|
|
19
|
-
private eufyClient;
|
|
20
|
-
readonly log: Logger<ILogObj>;
|
|
21
|
-
private readonly serial_number;
|
|
22
|
-
constructor(camera: CameraAccessory);
|
|
23
|
-
private initialize;
|
|
24
|
-
getLocalLivestream(): Promise<StationStream>;
|
|
25
|
-
private startAndGetLocalLiveStream;
|
|
26
|
-
stopLocalLiveStream(): void;
|
|
27
|
-
private onStationLivestreamStop;
|
|
28
|
-
private onStationLivestreamStart;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=LocalLivestreamManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalLivestreamManager.d.ts","sourceRoot":"","sources":["../../src/plugin/controller/LocalLivestreamManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAgB,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGxC,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,QAAQ,CAAC;IACtB,WAAW,EAAE,QAAQ,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,qBAAa,sBAAuB,SAAQ,YAAY;IAapD,OAAO,CAAC,MAAM;IAZhB,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAK;IAEpD,OAAO,CAAC,aAAa,CAA8B;IAEnD,OAAO,CAAC,mBAAmB,CAAuB;IAClD,OAAO,CAAC,oBAAoB,CAAS;IAErC,OAAO,CAAC,UAAU,CAAe;IACjC,SAAgB,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAG7B,MAAM,EAAE,eAAe;IAejC,OAAO,CAAC,UAAU;IAYL,kBAAkB,IAAI,OAAO,CAAC,aAAa,CAAC;YAY3C,0BAA0B;IAsCjC,mBAAmB,IAAI,IAAI;IAOlC,OAAO,CAAC,uBAAuB;YAQjB,wBAAwB;CA0BvC"}
|