@homebridge-plugins/homebridge-eufy-security 5.0.0-beta.1 → 5.0.0-beta.10
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 +4 -6
- package/config.schema.json +20 -0
- package/dist/configuration.js +26 -2
- package/dist/configuration.js.map +1 -1
- package/dist/device/member-evidence.js +8 -1
- package/dist/device/member-evidence.js.map +1 -1
- package/dist/diagnostics.js +428 -60
- package/dist/diagnostics.js.map +1 -1
- package/dist/homekit/adapters/camera-streaming.js +54 -26
- package/dist/homekit/adapters/camera-streaming.js.map +1 -1
- package/dist/homekit/adapters/security-system.js +85 -44
- package/dist/homekit/adapters/security-system.js.map +1 -1
- package/dist/homekit/reconciler.js +5 -2
- package/dist/homekit/reconciler.js.map +1 -1
- package/dist/media/live-stream.js +98 -54
- package/dist/media/live-stream.js.map +1 -1
- package/dist/media/recording.js +7 -5
- package/dist/media/recording.js.map +1 -1
- package/dist/media/snapshot.js +4 -4
- package/dist/media/station-live-sessions.js +47 -43
- package/dist/media/station-live-sessions.js.map +1 -1
- package/dist/platform.js +24 -5
- package/dist/platform.js.map +1 -1
- package/dist/ui/dashboard.js +5 -1
- package/dist/ui/dashboard.js.map +1 -1
- package/dist/ui/server.js +26 -4
- package/dist/ui/server.js.map +1 -1
- package/homebridge-ui/public/app.css +356 -3
- package/homebridge-ui/public/i18n/en.json +25 -14
- package/homebridge-ui/public/i18n/fr.json +25 -14
- package/homebridge-ui/public/index.html +24 -32
- package/homebridge-ui/public/js/app.js +187 -65
- package/homebridge-ui/public/js/dashboard.js +80 -1
- package/homebridge-ui/public/js/profile-wizard.js +40 -28
- package/package.json +2 -2
|
@@ -1,37 +1,48 @@
|
|
|
1
1
|
(function attachDiagnosticsWizard(global) {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const profiles = [
|
|
3
|
+
'startup-authentication',
|
|
4
|
+
'device-representation',
|
|
5
|
+
'control-state',
|
|
6
|
+
'live-media',
|
|
7
|
+
'hksv-recording',
|
|
8
|
+
'dashboard-ui',
|
|
9
|
+
'other',
|
|
9
10
|
];
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const deviceProfiles = ['device-representation', 'control-state', 'live-media', 'hksv-recording'];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Whether a fault of a given area could be about a given device, per area that can tell.
|
|
16
|
+
*
|
|
17
|
+
* A device the fault cannot happen on is not an answer to which ones are affected: offering a HomeBase for a
|
|
18
|
+
* live view fault invites a report about a stream that device never had. Missing from the list means every
|
|
19
|
+
* device qualifies, which is what a device missing from HomeKit needs — the ones with no representation at
|
|
20
|
+
* all are exactly the subject there.
|
|
21
|
+
*/
|
|
22
|
+
const affected = {
|
|
23
|
+
'control-state': (device) => device.controllable,
|
|
24
|
+
'live-media': (device) => device.representation.includes('camera.streaming'),
|
|
25
|
+
'hksv-recording': (device) => device.representation.includes('camera.streaming'),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function affectable(profile, devices) {
|
|
29
|
+
return devices.filter(affected[profile] ?? (() => true));
|
|
13
30
|
}
|
|
14
31
|
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
return { ...state, mode: 'frequency', profile: questions[state.questionIndex].profile };
|
|
18
|
-
}
|
|
19
|
-
if (state.questionIndex === questions.length - 1) {
|
|
20
|
-
return { ...state, mode: 'frequency', profile: 'other' };
|
|
21
|
-
}
|
|
22
|
-
return { ...state, questionIndex: state.questionIndex + 1 };
|
|
32
|
+
function start() {
|
|
33
|
+
return { mode: 'tiles', profile: undefined };
|
|
23
34
|
}
|
|
24
35
|
|
|
25
|
-
function
|
|
26
|
-
return { mode: '
|
|
36
|
+
function select(state, profile) {
|
|
37
|
+
return { ...state, mode: deviceProfiles.includes(profile) ? 'devices' : 'frequency', profile };
|
|
27
38
|
}
|
|
28
39
|
|
|
29
|
-
function
|
|
30
|
-
return { ...state, mode: 'frequency',
|
|
40
|
+
function chooseDevices(state, devices) {
|
|
41
|
+
return { ...state, mode: 'frequency', devices };
|
|
31
42
|
}
|
|
32
43
|
|
|
33
|
-
function reject(
|
|
34
|
-
return
|
|
44
|
+
function reject() {
|
|
45
|
+
return start();
|
|
35
46
|
}
|
|
36
47
|
|
|
37
48
|
function chooseReproductionMode(state, reproductionMode) {
|
|
@@ -39,7 +50,7 @@
|
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
function backFromFrequency(state) {
|
|
42
|
-
return state.
|
|
53
|
+
return deviceProfiles.includes(state.profile) ? { ...state, mode: 'devices' } : start();
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
function screen(session, startingAnother) {
|
|
@@ -54,15 +65,16 @@
|
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
global.HomebridgeEufyDiagnosticsWizard = {
|
|
57
|
-
|
|
68
|
+
affectable,
|
|
58
69
|
backFromFrequency,
|
|
59
70
|
backgroundActive,
|
|
71
|
+
chooseDevices,
|
|
60
72
|
chooseReproductionMode,
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
deviceProfiles,
|
|
74
|
+
profiles,
|
|
63
75
|
reject,
|
|
64
76
|
screen,
|
|
65
|
-
|
|
77
|
+
select,
|
|
66
78
|
start,
|
|
67
79
|
};
|
|
68
80
|
})(window);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Homebridge Eufy",
|
|
3
3
|
"name": "@homebridge-plugins/homebridge-eufy-security",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.10",
|
|
5
5
|
"description": "Control Eufy Security from homebridge.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@homebridge/plugin-ui-utils": "^2.2.6",
|
|
50
|
-
"@mega-yfue/eufy-sdk": "0.
|
|
50
|
+
"@mega-yfue/eufy-sdk": "0.2.0-beta.12",
|
|
51
51
|
"ffmpeg-for-homebridge": "2.2.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|