@camera.ui/camera-ui-eufy 0.0.20 → 0.0.21
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/bundle.zip +0 -0
- package/package.json +16 -27
- package/CHANGELOG.md +0 -8
- package/CONTRIBUTING.md +0 -1
- package/LICENSE.md +0 -22
- package/README.md +0 -1
- package/config.schema.json +0 -356
- package/dist/camera.d.ts +0 -23
- package/dist/camera.js +0 -132
- package/dist/camera.js.map +0 -1
- package/dist/eufy/LocalLiveStreamManager.d.ts +0 -31
- package/dist/eufy/LocalLiveStreamManager.js +0 -111
- package/dist/eufy/LocalLiveStreamManager.js.map +0 -1
- package/dist/eufy/Talkback.d.ts +0 -23
- package/dist/eufy/Talkback.js +0 -93
- package/dist/eufy/Talkback.js.map +0 -1
- package/dist/eufy/utils.d.ts +0 -22
- package/dist/eufy/utils.js +0 -102
- package/dist/eufy/utils.js.map +0 -1
- package/dist/index.d.ts +0 -31
- package/dist/index.js +0 -419
- package/dist/index.js.map +0 -1
- package/dist/types.d.ts +0 -37
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -3
- package/dist/utils.js +0 -262
- package/dist/utils.js.map +0 -1
package/dist/index.js
DELETED
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
import { Device, EufySecurity, P2PConnectionType } from 'eufy-security-client';
|
|
2
|
-
import { Camera } from './camera.js';
|
|
3
|
-
import { getCountryCode } from './utils.js';
|
|
4
|
-
export default class Eufy {
|
|
5
|
-
config;
|
|
6
|
-
logger;
|
|
7
|
-
api;
|
|
8
|
-
cameras = new Map();
|
|
9
|
-
eufyClients = new Map();
|
|
10
|
-
eufyCameras = new Map();
|
|
11
|
-
cleanOrphanedCamerasTimeout;
|
|
12
|
-
constructor(logger, api) {
|
|
13
|
-
this.logger = logger;
|
|
14
|
-
this.api = api;
|
|
15
|
-
this.config = api.configService.all();
|
|
16
|
-
this.config.homes = api.configService.get('homes', [], (value) => Array.isArray(value), false, true);
|
|
17
|
-
this.api.on('finishLaunching', this.start.bind(this));
|
|
18
|
-
this.api.on('shutdown', this.stop.bind(this));
|
|
19
|
-
}
|
|
20
|
-
configureCameras(cameras) {
|
|
21
|
-
for (const camera of cameras) {
|
|
22
|
-
this.cameras.set(camera.id, camera);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
async onFormSubmit(actionId, home) {
|
|
26
|
-
switch (actionId) {
|
|
27
|
-
case 'onLogin':
|
|
28
|
-
case 'on2FA':
|
|
29
|
-
case 'onCaptcha':
|
|
30
|
-
try {
|
|
31
|
-
const reAuth = actionId === 'on2FA' || actionId === 'onCaptcha';
|
|
32
|
-
const connectionResponse = await this.tryLogin(home, reAuth);
|
|
33
|
-
const eufyClient = this.eufyClients.get(home.name);
|
|
34
|
-
eufyClient?.removeAllListeners();
|
|
35
|
-
if (connectionResponse.connected) {
|
|
36
|
-
this.refreshConfig(home);
|
|
37
|
-
this.connectHome(home);
|
|
38
|
-
}
|
|
39
|
-
const formResponse = this.createFormResponse(connectionResponse);
|
|
40
|
-
return formResponse;
|
|
41
|
-
}
|
|
42
|
-
catch (error) {
|
|
43
|
-
const message = `Failed to Authenticate. Reason: ${error.message}`;
|
|
44
|
-
this.logger.error(home.name, message);
|
|
45
|
-
const formResponse = {
|
|
46
|
-
toast: {
|
|
47
|
-
message,
|
|
48
|
-
type: 'error',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
return formResponse;
|
|
52
|
-
}
|
|
53
|
-
default:
|
|
54
|
-
const message = `Unknown actionId: ${actionId}`;
|
|
55
|
-
this.logger.warn(home.name, message);
|
|
56
|
-
const formResponse = {
|
|
57
|
-
toast: {
|
|
58
|
-
type: 'error',
|
|
59
|
-
message,
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
return formResponse;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
async start() {
|
|
66
|
-
for (const home of this.config.homes) {
|
|
67
|
-
try {
|
|
68
|
-
await this.connectHome(home);
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
this.logger.error(home.name, 'An error occured during connecting to home:', error);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
this.cleanOrphanedCamerasTimeout = setTimeout(() => {
|
|
75
|
-
this.checkOrphanedCameras();
|
|
76
|
-
}, 45 * 1000);
|
|
77
|
-
}
|
|
78
|
-
stop() {
|
|
79
|
-
clearTimeout(this.cleanOrphanedCamerasTimeout);
|
|
80
|
-
this.logger.log('Plugin stopped');
|
|
81
|
-
}
|
|
82
|
-
closeClient(home) {
|
|
83
|
-
const eufyClient = this.eufyClients.get(home.name);
|
|
84
|
-
if (eufyClient) {
|
|
85
|
-
try {
|
|
86
|
-
if (eufyClient.isConnected()) {
|
|
87
|
-
eufyClient.close();
|
|
88
|
-
}
|
|
89
|
-
this.logger.log(home.name, 'Finished shutdown!');
|
|
90
|
-
}
|
|
91
|
-
catch (e) {
|
|
92
|
-
this.logger.error(home.name, `Error while shutdown: ${e}`);
|
|
93
|
-
}
|
|
94
|
-
finally {
|
|
95
|
-
this.eufyClients.delete(home.name);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async connectHome(home) {
|
|
100
|
-
let eufyClient;
|
|
101
|
-
try {
|
|
102
|
-
eufyClient = await this.getClient(home);
|
|
103
|
-
this.eufyClients.set(home.name, eufyClient);
|
|
104
|
-
eufyClient.on('device added', this.deviceAdded.bind(this, home, eufyClient));
|
|
105
|
-
eufyClient.on('device removed', this.deviceRemoved.bind(this, home));
|
|
106
|
-
eufyClient.on('push connect', () => {
|
|
107
|
-
this.logger.debug(home.name, 'Push Connected!');
|
|
108
|
-
});
|
|
109
|
-
eufyClient.on('push close', () => {
|
|
110
|
-
this.logger.debug(home.name, 'Push Closed!');
|
|
111
|
-
});
|
|
112
|
-
eufyClient.on('connect', () => {
|
|
113
|
-
this.logger.debug(home.name, 'Connected!');
|
|
114
|
-
});
|
|
115
|
-
eufyClient.on('close', () => {
|
|
116
|
-
this.logger.debug(home.name, 'Closed!');
|
|
117
|
-
});
|
|
118
|
-
eufyClient.on('connection error', async (error) => {
|
|
119
|
-
this.logger.debug(home.name, `Error: ${error}`);
|
|
120
|
-
this.closeClient(home);
|
|
121
|
-
});
|
|
122
|
-
eufyClient.once('captcha request', async () => {
|
|
123
|
-
this.logger.error(home.name, 'CAPTCHA Required! Please re-authenticate via UI and restart Plugin!');
|
|
124
|
-
this.closeClient(home);
|
|
125
|
-
});
|
|
126
|
-
eufyClient.on('tfa request', async () => {
|
|
127
|
-
this.logger.error(home.name, 'Two-Factor Authentication (2FA) Requested! Please re-authenticate via UI and restart Plugin!');
|
|
128
|
-
this.closeClient(home);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
this.logger.error(home.name, 'Error while setup:', error);
|
|
133
|
-
this.logger.error(home.name, 'Not connected cant continue!');
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
try {
|
|
137
|
-
if (!eufyClient.isConnected()) {
|
|
138
|
-
await eufyClient.connect();
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
const devices = await eufyClient.getDevices();
|
|
142
|
-
for (const device of devices) {
|
|
143
|
-
await this.deviceAdded(home, eufyClient, device);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
catch (e) {
|
|
148
|
-
this.logger.error(home.name, 'Error authenticating Eufy:', e);
|
|
149
|
-
}
|
|
150
|
-
if (!eufyClient.isConnected()) {
|
|
151
|
-
this.logger.error(home.name, 'Not connected cant continue!');
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
home.maxLiveStreamDuration = home.maxLiveStreamDuration || 86400;
|
|
155
|
-
if (home.maxLiveStreamDuration > 86400) {
|
|
156
|
-
home.maxLiveStreamDuration = 86400;
|
|
157
|
-
this.logger.warn(home.name, 'Your maximum livestream duration value is too large. Since this can cause problems it was reset to 86400 seconds (1 day maximum).');
|
|
158
|
-
}
|
|
159
|
-
else if (home.maxLiveStreamDuration < 10) {
|
|
160
|
-
home.maxLiveStreamDuration = 10;
|
|
161
|
-
this.logger.warn(home.name, 'Your maximum livestream duration value is too small. Since this can cause problems it was reset to 10 seconds (10 seconds minimum).');
|
|
162
|
-
}
|
|
163
|
-
eufyClient.setCameraMaxLivestreamDuration(home.maxLiveStreamDuration);
|
|
164
|
-
this.logger.debug(home.name, `maxLiveStreamDuration: ${eufyClient.getCameraMaxLivestreamDuration()}`);
|
|
165
|
-
}
|
|
166
|
-
async deviceAdded(home, eufyClient, device) {
|
|
167
|
-
try {
|
|
168
|
-
if ((home.ignoreDevices || []).includes(device.getSerial())) {
|
|
169
|
-
this.logger.debug(home.name, `${device.getName()}: Device ignored`);
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const deviceContainer = {
|
|
173
|
-
deviceIdentifier: {
|
|
174
|
-
uniqueId: device.getSerial(),
|
|
175
|
-
displayName: 'DEVICE_' + device.getName(),
|
|
176
|
-
type: device.getDeviceType(),
|
|
177
|
-
},
|
|
178
|
-
eufyDevice: device,
|
|
179
|
-
};
|
|
180
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
181
|
-
await this.addOrUpdateDevice(home, eufyClient, deviceContainer);
|
|
182
|
-
}
|
|
183
|
-
catch (error) {
|
|
184
|
-
this.logger.error(home.name, 'Failed to create camera:', error);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
async addOrUpdateDevice(home, eufyClient, deviceContainer) {
|
|
188
|
-
try {
|
|
189
|
-
const isCamera = deviceContainer.eufyDevice instanceof Device ? deviceContainer.eufyDevice.isCamera() : false;
|
|
190
|
-
if (!isCamera) {
|
|
191
|
-
this.logger.debug(home.name, `Device ${deviceContainer.deviceIdentifier.displayName} is not a camera, skipping...`);
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
const eufyDevice = deviceContainer.eufyDevice;
|
|
195
|
-
const eufyCameraId = eufyDevice.getSerial();
|
|
196
|
-
if (this.eufyCameras.get(eufyCameraId)) {
|
|
197
|
-
this.logger.debug(home.name, `Device ${deviceContainer.deviceIdentifier.displayName} already exists, skipping...`);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
const camera = new Camera(this, home, eufyClient, eufyDevice, this.logger);
|
|
201
|
-
await camera.createCameraDevice();
|
|
202
|
-
this.eufyCameras.set(eufyCameraId, eufyDevice);
|
|
203
|
-
this.cameras.set(camera.cameraDevice.id, camera.cameraDevice);
|
|
204
|
-
}
|
|
205
|
-
catch (error) {
|
|
206
|
-
this.logger.error(home.name, 'Error in addOrUpdateDevice', error);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
async deviceRemoved(home, device) {
|
|
210
|
-
const serial = device.getSerial();
|
|
211
|
-
this.logger.debug(home.name, `A device has been removed: ${device.getName()}`);
|
|
212
|
-
this.eufyCameras.delete(serial);
|
|
213
|
-
this.cameras.forEach(async (cameraDevice) => {
|
|
214
|
-
if (cameraDevice.nativeId === serial) {
|
|
215
|
-
this.logger.debug(home.name, `Removing camera ${cameraDevice.name}`);
|
|
216
|
-
this.cameras.delete(cameraDevice.id);
|
|
217
|
-
await this.api.deviceManager.removeCameraById(cameraDevice.id);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
async checkOrphanedCameras() {
|
|
222
|
-
// Remove orphaned cameras
|
|
223
|
-
for (const [cameraId, cameraDevice] of this.cameras) {
|
|
224
|
-
const eufyCameraId = cameraDevice.nativeId;
|
|
225
|
-
if (!this.eufyCameras.get(eufyCameraId)) {
|
|
226
|
-
this.logger.warn('Removing camera', cameraDevice.name);
|
|
227
|
-
this.cameras.delete(cameraId);
|
|
228
|
-
await this.api.deviceManager.removeCameraById(cameraDevice.id);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
tryLogin(home, reAuth) {
|
|
233
|
-
return new Promise(async (_resolve, _reject) => {
|
|
234
|
-
try {
|
|
235
|
-
let connected = false;
|
|
236
|
-
const eufyClient = await this.getClient(home);
|
|
237
|
-
eufyClient.once('connect', () => {
|
|
238
|
-
this.logger.debug(home.name, 'Connected!');
|
|
239
|
-
connected = true;
|
|
240
|
-
_resolve({ connected: true });
|
|
241
|
-
});
|
|
242
|
-
eufyClient.once('close', () => {
|
|
243
|
-
this.logger.debug(home.name, 'Closed!');
|
|
244
|
-
if (!connected) {
|
|
245
|
-
return _reject(new Error('Connection failed'));
|
|
246
|
-
}
|
|
247
|
-
_resolve({ connected: true });
|
|
248
|
-
});
|
|
249
|
-
eufyClient.once('connection error', async (error) => {
|
|
250
|
-
this.logger.debug(home.name, 'Connection Error:', error);
|
|
251
|
-
_reject(error);
|
|
252
|
-
});
|
|
253
|
-
eufyClient.once('captcha request', async (id, captcha) => {
|
|
254
|
-
this.logger.debug(home.name, 'CAPTCHA Required!', id, captcha);
|
|
255
|
-
_resolve({ connected: false, isCaptcha: { id, captcha } });
|
|
256
|
-
});
|
|
257
|
-
eufyClient.once('tfa request', async () => {
|
|
258
|
-
this.logger.debug(home.name, 'Two-Factor Authentication (2FA) Requested!');
|
|
259
|
-
_resolve({ connected: false, is2FA: true });
|
|
260
|
-
});
|
|
261
|
-
const loginOptions = reAuth
|
|
262
|
-
? {
|
|
263
|
-
force: true,
|
|
264
|
-
verifyCode: home.twoFactorCode,
|
|
265
|
-
captcha: home.captchaCode && home.captchaId ? { captchaId: home.captchaId, captchaCode: home.captchaCode } : undefined,
|
|
266
|
-
}
|
|
267
|
-
: undefined;
|
|
268
|
-
if (loginOptions) {
|
|
269
|
-
this.logger.debug(home.name, 'Trying to connect with options:', loginOptions);
|
|
270
|
-
}
|
|
271
|
-
await eufyClient.connect(loginOptions);
|
|
272
|
-
}
|
|
273
|
-
catch (error) {
|
|
274
|
-
_reject(error);
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
async getClient(home) {
|
|
279
|
-
let eufyClient = this.eufyClients.get(home.name);
|
|
280
|
-
if (!eufyClient) {
|
|
281
|
-
const logger = {
|
|
282
|
-
info: (message, ...args) => {
|
|
283
|
-
this.logger.log(home.name, message, ...args);
|
|
284
|
-
},
|
|
285
|
-
warn: (message, ...args) => {
|
|
286
|
-
this.logger.warn(home.name, message, ...args);
|
|
287
|
-
},
|
|
288
|
-
error: (message, ...args) => {
|
|
289
|
-
this.logger.error(home.name, message, ...args);
|
|
290
|
-
},
|
|
291
|
-
fatal: (message, ...args) => {
|
|
292
|
-
this.logger.error(home.name, message, ...args);
|
|
293
|
-
},
|
|
294
|
-
debug: (message, ...args) => {
|
|
295
|
-
if (home.debug) {
|
|
296
|
-
this.logger.debug(home.name, message, ...args);
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
trace: (message, ...args) => {
|
|
300
|
-
if (home.debug) {
|
|
301
|
-
this.logger.debug(home.name, message, ...args);
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
};
|
|
305
|
-
const eufyConfig = {
|
|
306
|
-
username: home.username,
|
|
307
|
-
password: home.password,
|
|
308
|
-
country: getCountryCode(home.country),
|
|
309
|
-
trustedDeviceName: home.deviceName,
|
|
310
|
-
language: 'en',
|
|
311
|
-
p2pConnectionSetup: P2PConnectionType.QUICKEST,
|
|
312
|
-
pollingIntervalMinutes: 10,
|
|
313
|
-
eventDurationSeconds: 10,
|
|
314
|
-
};
|
|
315
|
-
eufyClient = await EufySecurity.initialize(eufyConfig, logger);
|
|
316
|
-
this.eufyClients.set(home.name, eufyClient);
|
|
317
|
-
}
|
|
318
|
-
return eufyClient;
|
|
319
|
-
}
|
|
320
|
-
createFormResponse(connectionResponse) {
|
|
321
|
-
const formResponse = {
|
|
322
|
-
toast: {
|
|
323
|
-
type: 'success',
|
|
324
|
-
message: 'Logged in!',
|
|
325
|
-
},
|
|
326
|
-
};
|
|
327
|
-
if (connectionResponse.is2FA) {
|
|
328
|
-
formResponse.schema = {
|
|
329
|
-
config: {
|
|
330
|
-
type: 'object',
|
|
331
|
-
title: 'Two-Factor Authentication (2FA)',
|
|
332
|
-
description: 'Enter the 2FA code',
|
|
333
|
-
required: true,
|
|
334
|
-
opened: true,
|
|
335
|
-
properties: {
|
|
336
|
-
twoFactorCode: {
|
|
337
|
-
type: 'string',
|
|
338
|
-
key: 'twoFactorCode',
|
|
339
|
-
title: 'Two-Factor Code',
|
|
340
|
-
description: 'Enter the two-factor code',
|
|
341
|
-
required: true,
|
|
342
|
-
},
|
|
343
|
-
},
|
|
344
|
-
buttons: [
|
|
345
|
-
{
|
|
346
|
-
label: 'Authenticate',
|
|
347
|
-
onSubmit: 'on2FA',
|
|
348
|
-
},
|
|
349
|
-
],
|
|
350
|
-
},
|
|
351
|
-
};
|
|
352
|
-
formResponse.toast = {
|
|
353
|
-
message: 'Two-Factor Authentication (2FA) Required!',
|
|
354
|
-
type: 'warning',
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
else if (connectionResponse.isCaptcha) {
|
|
358
|
-
formResponse.schema = {
|
|
359
|
-
config: {
|
|
360
|
-
type: 'object',
|
|
361
|
-
title: 'Two-Factor Authentication (2FA)',
|
|
362
|
-
description: 'Enter the 2FA code',
|
|
363
|
-
required: true,
|
|
364
|
-
opened: true,
|
|
365
|
-
properties: {
|
|
366
|
-
captcha: {
|
|
367
|
-
type: 'string',
|
|
368
|
-
key: 'captcha',
|
|
369
|
-
title: 'Captcha',
|
|
370
|
-
description: 'Enter the captcha',
|
|
371
|
-
format: 'image',
|
|
372
|
-
defaultValue: connectionResponse.isCaptcha.captcha,
|
|
373
|
-
},
|
|
374
|
-
captchaCode: {
|
|
375
|
-
type: 'string',
|
|
376
|
-
key: 'captchaCode',
|
|
377
|
-
title: 'Captcha Code',
|
|
378
|
-
description: 'Enter the captcha code',
|
|
379
|
-
required: true,
|
|
380
|
-
},
|
|
381
|
-
captchaId: {
|
|
382
|
-
type: 'string',
|
|
383
|
-
key: 'captchaId',
|
|
384
|
-
hidden: true,
|
|
385
|
-
defaultValue: connectionResponse.isCaptcha.id,
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
buttons: [
|
|
389
|
-
{
|
|
390
|
-
label: 'Authenticate',
|
|
391
|
-
onSubmit: 'onCaptcha',
|
|
392
|
-
},
|
|
393
|
-
],
|
|
394
|
-
},
|
|
395
|
-
};
|
|
396
|
-
formResponse.toast = {
|
|
397
|
-
message: 'CAPTCHA Required!',
|
|
398
|
-
type: 'warning',
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
return formResponse;
|
|
402
|
-
}
|
|
403
|
-
refreshConfig(home) {
|
|
404
|
-
if ('twoFactorCode' in home) {
|
|
405
|
-
delete home.twoFactorCode;
|
|
406
|
-
}
|
|
407
|
-
if ('captcha' in home) {
|
|
408
|
-
delete home.captcha;
|
|
409
|
-
}
|
|
410
|
-
if ('captchaCode' in home) {
|
|
411
|
-
delete home.captchaCode;
|
|
412
|
-
}
|
|
413
|
-
if ('captchaId' in home) {
|
|
414
|
-
delete home.captchaId;
|
|
415
|
-
}
|
|
416
|
-
this.api.configService.replaceOrAddItem('homes', 'name', home.name, home, true);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAM5C,MAAM,CAAC,OAAO,OAAO,IAAI;IAChB,MAAM,CAAS;IACf,MAAM,CAAgB;IACtB,GAAG,CAAY;IACf,OAAO,GAAG,IAAI,GAAG,EAAwB,CAAC;IAEzC,WAAW,GAAG,IAAI,G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E,QAAQ;4BACd,GAAG,EAAE,WAAW;4BAChB,MAAM,EAAE,IAAI;4BACZ,YAAY,EAAE,kBAAkB,CAAC,SAAS,CAAC,EAAE;yBAC9C;qBACF;oBACD,OAAO,EAAE;wBACP;4BACE,KAAK,EAAE,cAAc;4BACrB,QAAQ,EAAE,WAAW;yBACtB;qBACF;iBACF;aACF,CAAC;YAEF,YAAY,CAAC,KAAK,GAAG;gBACnB,OAAO,EAAE,mBAAmB;gBAC5B,IAAI,EAAE,SAAS;aAChB,CAAC;QACJ,CAAC;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,aAAa,CAAC,IAAc;QAClC,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;QAED,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;QAED,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QAED,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;CACF"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { Device, Station } from 'eufy-security-client';
|
|
2
|
-
export interface DeviceIdentifier {
|
|
3
|
-
uniqueId: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
type: number;
|
|
6
|
-
}
|
|
7
|
-
export interface StationContainer {
|
|
8
|
-
deviceIdentifier: DeviceIdentifier;
|
|
9
|
-
eufyDevice: Station;
|
|
10
|
-
}
|
|
11
|
-
export interface DeviceContainer {
|
|
12
|
-
deviceIdentifier: DeviceIdentifier;
|
|
13
|
-
eufyDevice: Device;
|
|
14
|
-
}
|
|
15
|
-
export interface EufyHome {
|
|
16
|
-
name: string;
|
|
17
|
-
username: string;
|
|
18
|
-
password: string;
|
|
19
|
-
country?: string;
|
|
20
|
-
deviceName?: string;
|
|
21
|
-
debug?: boolean;
|
|
22
|
-
maxLiveStreamDuration?: number;
|
|
23
|
-
useP2P?: boolean;
|
|
24
|
-
ignoreDevices?: string[];
|
|
25
|
-
}
|
|
26
|
-
export interface Config {
|
|
27
|
-
homes: EufyHome[];
|
|
28
|
-
}
|
|
29
|
-
export interface EufyConnectionResponse {
|
|
30
|
-
connected: boolean;
|
|
31
|
-
is2FA?: boolean;
|
|
32
|
-
isCaptcha?: {
|
|
33
|
-
id: string;
|
|
34
|
-
captcha: string;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export type FormAction = 'onLogin' | 'on2FA' | 'onCaptcha';
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/dist/utils.d.ts
DELETED