homebridge-eufy-security 4.3.3 → 4.3.4

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/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const LIB_VERSION = "4.3.3";
1
+ export declare const LIB_VERSION = "4.3.4";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIB_VERSION = void 0;
4
- exports.LIB_VERSION = "4.3.3";
4
+ exports.LIB_VERSION = "4.3.4";
5
5
  //# sourceMappingURL=version.js.map
@@ -37,7 +37,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  const eufy_security_client_1 = require("eufy-security-client");
40
- const plugin_ui_utils_1 = require("@homebridge/plugin-ui-utils");
41
40
  const fs = __importStar(require("fs"));
42
41
  const tslog_1 = require("tslog");
43
42
  const rotating_file_stream_1 = require("rotating-file-stream");
@@ -45,411 +44,421 @@ const zip_lib_1 = require("zip-lib");
45
44
  const types_1 = require("./configui/app/util/types");
46
45
  const package_json_1 = require("../package.json");
47
46
  const path_1 = __importDefault(require("path"));
48
- class UiServer extends plugin_ui_utils_1.HomebridgePluginUiServer {
49
- stations = [];
50
- eufyClient = null;
51
- log;
52
- tsLog;
53
- storagePath = this.homebridgeStoragePath + '/eufysecurity';
54
- storedAccessories_file = this.storagePath + '/accessories.json';
55
- logZipFilePath = this.storagePath + '/logs.zip';
56
- adminAccountUsed = false;
57
- config = {
58
- username: '',
59
- password: '',
60
- language: 'en',
61
- country: 'US',
62
- trustedDeviceName: 'My Phone',
63
- persistentDir: this.storagePath,
64
- p2pConnectionSetup: 0,
65
- pollingIntervalMinutes: 99,
66
- eventDurationSeconds: 10,
67
- acceptInvitations: true,
68
- };
69
- constructor() {
70
- super();
71
- this.initLogger();
72
- this.initTransportStreams();
73
- this.initEventListeners();
74
- this.ready();
75
- }
76
- initLogger() {
77
- this.log = new tslog_1.Logger({
78
- name: `[${package_json_1.version}]`,
79
- prettyLogTemplate: '{{name}}\t{{logLevelName}}\t[{{fileNameWithLine}}]\t',
80
- prettyErrorTemplate: '\n{{errorName}} {{errorMessage}}\nerror stack:\n{{errorStack}}',
81
- prettyErrorStackTemplate: ' • {{fileName}}\t{{method}}\n\t{{fileNameWithLine}}',
82
- prettyErrorParentNamesSeparator: ':',
83
- prettyErrorLoggerNameDelimiter: '\t',
84
- stylePrettyLogs: true,
85
- minLevel: 2,
86
- prettyLogTimeZone: 'local',
87
- prettyLogStyles: {
88
- logLevelName: {
89
- '*': ['bold', 'black', 'bgWhiteBright', 'dim'],
90
- SILLY: ['bold', 'white'],
91
- TRACE: ['bold', 'whiteBright'],
92
- DEBUG: ['bold', 'green'],
93
- INFO: ['bold', 'blue'],
94
- WARN: ['bold', 'yellow'],
95
- ERROR: ['bold', 'red'],
96
- FATAL: ['bold', 'redBright'],
47
+ // We'll create an async initialization function
48
+ async function initServer() {
49
+ // Dynamically import the ES module
50
+ const { HomebridgePluginUiServer } = await Promise.resolve().then(() => __importStar(require('@homebridge/plugin-ui-utils')));
51
+ class UiServer extends HomebridgePluginUiServer {
52
+ stations = [];
53
+ eufyClient = null;
54
+ log;
55
+ tsLog;
56
+ storagePath = this.homebridgeStoragePath + '/eufysecurity';
57
+ storedAccessories_file = this.storagePath + '/accessories.json';
58
+ logZipFilePath = this.storagePath + '/logs.zip';
59
+ adminAccountUsed = false;
60
+ config = {
61
+ username: '',
62
+ password: '',
63
+ language: 'en',
64
+ country: 'US',
65
+ trustedDeviceName: 'My Phone',
66
+ persistentDir: this.storagePath,
67
+ p2pConnectionSetup: 0,
68
+ pollingIntervalMinutes: 99,
69
+ eventDurationSeconds: 10,
70
+ acceptInvitations: true,
71
+ };
72
+ constructor() {
73
+ super();
74
+ this.initLogger();
75
+ this.initTransportStreams();
76
+ this.initEventListeners();
77
+ this.ready();
78
+ }
79
+ initLogger() {
80
+ this.log = new tslog_1.Logger({
81
+ name: `[${package_json_1.version}]`,
82
+ prettyLogTemplate: '{{name}}\t{{logLevelName}}\t[{{fileNameWithLine}}]\t',
83
+ prettyErrorTemplate: '\n{{errorName}} {{errorMessage}}\nerror stack:\n{{errorStack}}',
84
+ prettyErrorStackTemplate: ' • {{fileName}}\t{{method}}\n\t{{fileNameWithLine}}',
85
+ prettyErrorParentNamesSeparator: ':',
86
+ prettyErrorLoggerNameDelimiter: '\t',
87
+ stylePrettyLogs: true,
88
+ minLevel: 2,
89
+ prettyLogTimeZone: 'local',
90
+ prettyLogStyles: {
91
+ logLevelName: {
92
+ '*': ['bold', 'black', 'bgWhiteBright', 'dim'],
93
+ SILLY: ['bold', 'white'],
94
+ TRACE: ['bold', 'whiteBright'],
95
+ DEBUG: ['bold', 'green'],
96
+ INFO: ['bold', 'blue'],
97
+ WARN: ['bold', 'yellow'],
98
+ ERROR: ['bold', 'red'],
99
+ FATAL: ['bold', 'redBright'],
100
+ },
101
+ dateIsoStr: 'gray',
102
+ filePathWithLine: 'white',
103
+ name: 'green',
104
+ nameWithDelimiterPrefix: ['white', 'bold'],
105
+ nameWithDelimiterSuffix: ['white', 'bold'],
106
+ errorName: ['bold', 'bgRedBright', 'whiteBright'],
107
+ fileName: ['yellow'],
97
108
  },
98
- dateIsoStr: 'gray',
99
- filePathWithLine: 'white',
100
- name: 'green',
101
- nameWithDelimiterPrefix: ['white', 'bold'],
102
- nameWithDelimiterSuffix: ['white', 'bold'],
103
- errorName: ['bold', 'bgRedBright', 'whiteBright'],
104
- fileName: ['yellow'],
105
- },
106
- });
107
- this.tsLog = new tslog_1.Logger({ type: 'hidden', minLevel: 2 });
108
- }
109
- initTransportStreams() {
110
- if (!fs.existsSync(this.storagePath)) {
111
- fs.mkdirSync(this.storagePath);
109
+ });
110
+ this.tsLog = new tslog_1.Logger({ type: 'hidden', minLevel: 2 });
112
111
  }
113
- const pluginLogStream = (0, rotating_file_stream_1.createStream)('configui-server.log', { path: this.storagePath, interval: '1d', rotate: 3, maxSize: '200M' });
114
- const pluginLogLibStream = (0, rotating_file_stream_1.createStream)('configui-lib.log', { path: this.storagePath, interval: '1d', rotate: 3, maxSize: '200M' });
115
- this.log.attachTransport((logObj) => pluginLogStream.write(JSON.stringify(logObj) + '\n'));
116
- this.tsLog.attachTransport((logObj) => pluginLogLibStream.write(JSON.stringify(logObj) + '\n'));
117
- this.log.debug('Using bropats eufy-security-client library in version ' + eufy_security_client_1.libVersion);
118
- }
119
- initEventListeners() {
120
- this.onRequest('/login', this.login.bind(this));
121
- this.onRequest('/storedAccessories', this.loadStoredAccessories.bind(this));
122
- this.onRequest('/reset', this.resetPlugin.bind(this));
123
- this.onRequest('/downloadLogs', this.downloadLogs.bind(this));
124
- }
125
- /**
126
- * Deletes a file if it exists.
127
- *
128
- * @param filePath The path to the file to be deleted.
129
- * @returns A Promise that resolves when the operation is complete, or rejects if an error occurs.
130
- * @throws Will reject the Promise with the error if file deletion fails.
131
- */
132
- async deleteFileIfExists(filePath) {
133
- try {
134
- if (fs.existsSync(filePath)) {
135
- fs.unlinkSync(filePath);
112
+ initTransportStreams() {
113
+ if (!fs.existsSync(this.storagePath)) {
114
+ fs.mkdirSync(this.storagePath);
136
115
  }
116
+ const pluginLogStream = (0, rotating_file_stream_1.createStream)('configui-server.log', { path: this.storagePath, interval: '1d', rotate: 3, maxSize: '200M' });
117
+ const pluginLogLibStream = (0, rotating_file_stream_1.createStream)('configui-lib.log', { path: this.storagePath, interval: '1d', rotate: 3, maxSize: '200M' });
118
+ this.log.attachTransport((logObj) => pluginLogStream.write(JSON.stringify(logObj) + '\n'));
119
+ this.tsLog.attachTransport((logObj) => pluginLogLibStream.write(JSON.stringify(logObj) + '\n'));
120
+ this.log.debug('Using bropats eufy-security-client library in version ' + eufy_security_client_1.libVersion);
137
121
  }
138
- catch (error) {
139
- return Promise.reject(error);
122
+ initEventListeners() {
123
+ this.onRequest('/login', this.login.bind(this));
124
+ this.onRequest('/storedAccessories', this.loadStoredAccessories.bind(this));
125
+ this.onRequest('/reset', this.resetPlugin.bind(this));
126
+ this.onRequest('/downloadLogs', this.downloadLogs.bind(this));
140
127
  }
141
- }
142
- /**
143
- * Resets the persistent data by removing the persistent.json file.
144
- *
145
- * @returns A Promise that resolves when the operation is complete, or rejects if an error occurs.
146
- */
147
- async resetPersistentData() {
148
- return this.deleteFileIfExists(this.storagePath + '/persistent.json');
149
- }
150
- /**
151
- * Resets the accessory data by removing the stored accessories file.
152
- *
153
- * @returns A Promise that resolves when the operation is complete, or rejects if an error occurs.
154
- */
155
- async resetAccessoryData() {
156
- return this.deleteFileIfExists(this.storedAccessories_file);
157
- }
158
- async login(options) {
159
- try {
160
- if (options && options.username && options.password) {
161
- this.log.info('deleting persistent.json and accessories due to new login');
162
- this.resetAccessoryData();
163
- await this.resetPersistentData(); // To be commented for testing purpose
128
+ /**
129
+ * Deletes a file if it exists.
130
+ *
131
+ * @param filePath The path to the file to be deleted.
132
+ * @returns A Promise that resolves when the operation is complete, or rejects if an error occurs.
133
+ * @throws Will reject the Promise with the error if file deletion fails.
134
+ */
135
+ async deleteFileIfExists(filePath) {
136
+ try {
137
+ if (fs.existsSync(filePath)) {
138
+ fs.unlinkSync(filePath);
139
+ }
140
+ }
141
+ catch (error) {
142
+ return Promise.reject(error);
164
143
  }
165
144
  }
166
- catch (error) {
167
- this.log.error('Could not delete persistent.json due to error: ' + error);
145
+ /**
146
+ * Resets the persistent data by removing the persistent.json file.
147
+ *
148
+ * @returns A Promise that resolves when the operation is complete, or rejects if an error occurs.
149
+ */
150
+ async resetPersistentData() {
151
+ return this.deleteFileIfExists(this.storagePath + '/persistent.json');
168
152
  }
169
- if (!this.eufyClient && options && options.username && options.password && options.country) {
170
- this.stations = [];
171
- this.log.debug('init eufyClient');
172
- this.config.username = options.username;
173
- this.config.password = options.password;
174
- this.config.country = options.country;
175
- this.config.trustedDeviceName = options.deviceName;
153
+ /**
154
+ * Resets the accessory data by removing the stored accessories file.
155
+ *
156
+ * @returns A Promise that resolves when the operation is complete, or rejects if an error occurs.
157
+ */
158
+ async resetAccessoryData() {
159
+ return this.deleteFileIfExists(this.storedAccessories_file);
160
+ }
161
+ async login(options) {
176
162
  try {
177
- this.eufyClient = await eufy_security_client_1.EufySecurity.initialize(this.config, this.tsLog);
178
- this.eufyClient?.on('station added', await this.addStation.bind(this));
179
- this.eufyClient?.on('device added', await this.addDevice.bind(this));
180
- // Close connection after 40 seconds enough time to get all devices
181
- setTimeout(() => {
182
- this.eufyClient?.removeAllListeners();
183
- this.eufyClient?.close();
184
- }, 40 * 1000);
163
+ if (options && options.username && options.password) {
164
+ this.log.info('deleting persistent.json and accessories due to new login');
165
+ this.resetAccessoryData();
166
+ await this.resetPersistentData(); // To be commented for testing purpose
167
+ }
185
168
  }
186
169
  catch (error) {
187
- this.log.error(error);
170
+ this.log.error('Could not delete persistent.json due to error: ' + error);
188
171
  }
189
- }
190
- return new Promise((resolve, reject) => {
191
- setTimeout(() => {
192
- resolve({ success: false, failReason: types_1.LoginFailReason.TIMEOUT });
193
- }, 25 * 1000);
194
- if (options && options.username && options.password && options.country) {
195
- this.log.debug('login with credentials');
172
+ if (!this.eufyClient && options && options.username && options.password && options.country) {
173
+ this.stations = [];
174
+ this.log.debug('init eufyClient');
175
+ this.config.username = options.username;
176
+ this.config.password = options.password;
177
+ this.config.country = options.country;
178
+ this.config.trustedDeviceName = options.deviceName;
196
179
  try {
197
- this.loginHandlers(resolve);
198
- this.eufyClient?.connect()
199
- .then(() => this.log.debug('connected?: ' + this.eufyClient?.isConnected()))
200
- .catch((error) => this.log.error(error));
180
+ this.eufyClient = await eufy_security_client_1.EufySecurity.initialize(this.config, this.tsLog);
181
+ this.eufyClient?.on('station added', await this.addStation.bind(this));
182
+ this.eufyClient?.on('device added', await this.addDevice.bind(this));
183
+ // Close connection after 40 seconds enough time to get all devices
184
+ setTimeout(() => {
185
+ this.eufyClient?.removeAllListeners();
186
+ this.eufyClient?.close();
187
+ }, 40 * 1000);
201
188
  }
202
189
  catch (error) {
203
190
  this.log.error(error);
204
- resolve({ success: false, failReason: types_1.LoginFailReason.UNKNOWN, data: { error: error } });
205
191
  }
206
192
  }
207
- else if (options && options.verifyCode) {
208
- try {
209
- this.loginHandlers(resolve);
210
- this.eufyClient?.connect({ verifyCode: options.verifyCode, force: false });
193
+ return new Promise((resolve, reject) => {
194
+ setTimeout(() => {
195
+ resolve({ success: false, failReason: types_1.LoginFailReason.TIMEOUT });
196
+ }, 25 * 1000);
197
+ if (options && options.username && options.password && options.country) {
198
+ this.log.debug('login with credentials');
199
+ try {
200
+ this.loginHandlers(resolve);
201
+ this.eufyClient?.connect()
202
+ .then(() => this.log.debug('connected?: ' + this.eufyClient?.isConnected()))
203
+ .catch((error) => this.log.error(error));
204
+ }
205
+ catch (error) {
206
+ this.log.error(error);
207
+ resolve({ success: false, failReason: types_1.LoginFailReason.UNKNOWN, data: { error: error } });
208
+ }
211
209
  }
212
- catch (error) {
213
- resolve({ success: false, failReason: types_1.LoginFailReason.UNKNOWN, data: { error: error } });
210
+ else if (options && options.verifyCode) {
211
+ try {
212
+ this.loginHandlers(resolve);
213
+ this.eufyClient?.connect({ verifyCode: options.verifyCode, force: false });
214
+ }
215
+ catch (error) {
216
+ resolve({ success: false, failReason: types_1.LoginFailReason.UNKNOWN, data: { error: error } });
217
+ }
214
218
  }
215
- }
216
- else if (options && options.captcha) {
217
- try {
218
- this.loginHandlers(resolve);
219
- this.eufyClient?.connect({ captcha: { captchaCode: options.captcha.captchaCode, captchaId: options.captcha.captchaId }, force: false });
219
+ else if (options && options.captcha) {
220
+ try {
221
+ this.loginHandlers(resolve);
222
+ this.eufyClient?.connect({ captcha: { captchaCode: options.captcha.captchaCode, captchaId: options.captcha.captchaId }, force: false });
223
+ }
224
+ catch (error) {
225
+ resolve({ success: false, failReason: types_1.LoginFailReason.UNKNOWN, data: { error: error } });
226
+ }
220
227
  }
221
- catch (error) {
222
- resolve({ success: false, failReason: types_1.LoginFailReason.UNKNOWN, data: { error: error } });
228
+ else {
229
+ reject('unsupported login method');
223
230
  }
231
+ });
232
+ }
233
+ loginHandlers(resolveCallback) {
234
+ this.eufyClient?.once('tfa request', () => resolveCallback({ success: false, failReason: types_1.LoginFailReason.TFA }));
235
+ this.eufyClient?.once('captcha request', (id, captcha) => resolveCallback({ success: false, failReason: types_1.LoginFailReason.CAPTCHA, data: { id: id, captcha: captcha } }));
236
+ this.eufyClient?.once('connect', () => resolveCallback({ success: true }));
237
+ }
238
+ /**
239
+ * Asynchronously loads stored accessories from a file.
240
+ * @returns A promise resolving to an array of accessories.
241
+ */
242
+ async loadStoredAccessories() {
243
+ try {
244
+ // Check if the stored accessories file exists
245
+ if (!fs.existsSync(this.storedAccessories_file)) {
246
+ // If the file doesn't exist, log a warning and return an empty array
247
+ this.log.debug('Stored accessories file does not exist.');
248
+ return [];
249
+ }
250
+ // Read the content of the stored accessories file asynchronously
251
+ const storedData = await fs.promises.readFile(this.storedAccessories_file, { encoding: 'utf-8' });
252
+ // Parse the JSON data obtained from the file
253
+ const { version: storedVersion, stations: storedAccessories } = JSON.parse(storedData);
254
+ // Compare the stored version with the current version
255
+ if (storedVersion !== package_json_1.version) {
256
+ // If the versions do not match, log a warning and push an event
257
+ this.pushEvent('versionUnmatched', { currentVersion: package_json_1.version, storedVersion: storedVersion });
258
+ this.log.warn(`Stored version (${storedVersion}) does not match current version (${package_json_1.version})`);
259
+ }
260
+ // Return the parsed accessories
261
+ return storedAccessories;
224
262
  }
225
- else {
226
- reject('unsupported login method');
227
- }
228
- });
229
- }
230
- loginHandlers(resolveCallback) {
231
- this.eufyClient?.once('tfa request', () => resolveCallback({ success: false, failReason: types_1.LoginFailReason.TFA }));
232
- this.eufyClient?.once('captcha request', (id, captcha) => resolveCallback({ success: false, failReason: types_1.LoginFailReason.CAPTCHA, data: { id: id, captcha: captcha } }));
233
- this.eufyClient?.once('connect', () => resolveCallback({ success: true }));
234
- }
235
- /**
236
- * Asynchronously loads stored accessories from a file.
237
- * @returns A promise resolving to an array of accessories.
238
- */
239
- async loadStoredAccessories() {
240
- try {
241
- // Check if the stored accessories file exists
242
- if (!fs.existsSync(this.storedAccessories_file)) {
243
- // If the file doesn't exist, log a warning and return an empty array
244
- this.log.debug('Stored accessories file does not exist.');
263
+ catch (error) {
264
+ // If an error occurs during the process, log an error message and return an empty array
265
+ this.log.error('Could not get stored accessories. Most likely no stored accessories yet: ' + error);
245
266
  return [];
246
267
  }
247
- // Read the content of the stored accessories file asynchronously
248
- const storedData = await fs.promises.readFile(this.storedAccessories_file, { encoding: 'utf-8' });
249
- // Parse the JSON data obtained from the file
250
- const { version: storedVersion, stations: storedAccessories } = JSON.parse(storedData);
251
- // Compare the stored version with the current version
252
- if (storedVersion !== package_json_1.version) {
253
- // If the versions do not match, log a warning and push an event
254
- this.pushEvent('versionUnmatched', { currentVersion: package_json_1.version, storedVersion: storedVersion });
255
- this.log.warn(`Stored version (${storedVersion}) does not match current version (${package_json_1.version})`);
256
- }
257
- // Return the parsed accessories
258
- return storedAccessories;
259
268
  }
260
- catch (error) {
261
- // If an error occurs during the process, log an error message and return an empty array
262
- this.log.error('Could not get stored accessories. Most likely no stored accessories yet: ' + error);
263
- return [];
264
- }
265
- }
266
- async delay(ms) {
267
- return new Promise(resolve => setTimeout(resolve, ms));
268
- }
269
- async addStation(station) {
270
- // Before doing anything check if creds are guest admin
271
- const rawStation = station.getRawStation();
272
- if (rawStation.member.member_type !== eufy_security_client_1.UserType.ADMIN) {
273
- this.adminAccountUsed = true;
274
- this.eufyClient?.close();
275
- this.pushEvent('AdminAccountUsed', true);
276
- this.resetPlugin();
277
- this.log.error(`
278
- #########################
279
- ######### ERROR #########
280
- #########################
281
- You're not using a guest admin account with this plugin! You must use a guest admin account!
282
- Please look here for more details:
283
- https://github.com/homebridge-eufy-security/plugin/wiki/Create-a-dedicated-admin-account-for-Homebridge-Eufy-Security-Plugin
284
- #########################
285
- `);
286
- return;
287
- }
288
- await this.delay(1000);
289
- const s = {
290
- uniqueId: station.getSerial(),
291
- displayName: station.getName(),
292
- type: station.getDeviceType(),
293
- typename: eufy_security_client_1.DeviceType[station.getDeviceType()],
294
- disabled: false,
295
- devices: [],
296
- };
297
- s.ignored = (this.config['ignoreStations'] ?? []).includes(s.uniqueId);
298
- // Standalone Lock or Doorbell doesn't have Security Control
299
- if (eufy_security_client_1.Device.isLock(s.type) || eufy_security_client_1.Device.isDoorbell(s.type)) {
300
- s.disabled = true;
301
- s.ignored = true;
269
+ async delay(ms) {
270
+ return new Promise(resolve => setTimeout(resolve, ms));
302
271
  }
303
- this.stations.push(s);
304
- this.storeAccessories();
305
- this.pushEvent('addAccessory', this.stations);
306
- }
307
- async addDevice(device) {
308
- // Before doing anything check if creds are guest admin
309
- if (this.adminAccountUsed) {
310
- this.pushEvent('AdminAccountUsed', true);
311
- return;
312
- }
313
- await this.delay(2000);
314
- const d = {
315
- uniqueId: device.getSerial(),
316
- displayName: device.getName(),
317
- type: device.getDeviceType(),
318
- typename: eufy_security_client_1.DeviceType[device.getDeviceType()],
319
- standalone: device.getSerial() === device.getStationSerial(),
320
- hasBattery: device.hasBattery(),
321
- isCamera: device.isCamera(),
322
- isDoorbell: device.isDoorbell(),
323
- isKeypad: device.isKeyPad(),
324
- supportsRTSP: device.hasPropertyValue(eufy_security_client_1.PropertyName.DeviceRTSPStream),
325
- supportsTalkback: device.hasCommand(eufy_security_client_1.CommandName.DeviceStartTalkback),
326
- DeviceEnabled: device.hasProperty(eufy_security_client_1.PropertyName.DeviceEnabled),
327
- DeviceMotionDetection: device.hasProperty(eufy_security_client_1.PropertyName.DeviceMotionDetection),
328
- DeviceLight: device.hasProperty(eufy_security_client_1.PropertyName.DeviceLight),
329
- DeviceChimeIndoor: device.hasProperty(eufy_security_client_1.PropertyName.DeviceChimeIndoor),
330
- disabled: false,
331
- properties: device.getProperties(),
332
- };
333
- if (device.hasProperty(eufy_security_client_1.PropertyName.DeviceChargingStatus)) {
334
- d.chargingStatus = device.getPropertyValue(eufy_security_client_1.PropertyName.DeviceChargingStatus);
335
- }
336
- try {
337
- delete d.properties.picture;
338
- }
339
- catch (error) {
340
- this.log.error(error);
341
- }
342
- d.ignored = (this.config['ignoreDevices'] ?? []).includes(d.uniqueId);
343
- const stationUniqueId = device.getStationSerial();
344
- const stationIndex = this.stations.findIndex(station => station.uniqueId === stationUniqueId);
345
- if (stationIndex !== -1) {
346
- if (!this.stations[stationIndex].devices) {
347
- this.stations[stationIndex].devices = [];
272
+ async addStation(station) {
273
+ // Before doing anything check if creds are guest admin
274
+ const rawStation = station.getRawStation();
275
+ if (rawStation.member.member_type !== eufy_security_client_1.UserType.ADMIN) {
276
+ this.adminAccountUsed = true;
277
+ this.eufyClient?.close();
278
+ this.pushEvent('AdminAccountUsed', true);
279
+ this.resetPlugin();
280
+ this.log.error(`
281
+ #########################
282
+ ######### ERROR #########
283
+ #########################
284
+ You're not using a guest admin account with this plugin! You must use a guest admin account!
285
+ Please look here for more details:
286
+ https://github.com/homebridge-eufy-security/plugin/wiki/Create-a-dedicated-admin-account-for-Homebridge-Eufy-Security-Plugin
287
+ #########################
288
+ `);
289
+ return;
290
+ }
291
+ await this.delay(1000);
292
+ const s = {
293
+ uniqueId: station.getSerial(),
294
+ displayName: station.getName(),
295
+ type: station.getDeviceType(),
296
+ typename: eufy_security_client_1.DeviceType[station.getDeviceType()],
297
+ disabled: false,
298
+ devices: [],
299
+ };
300
+ s.ignored = (this.config['ignoreStations'] ?? []).includes(s.uniqueId);
301
+ // Standalone Lock or Doorbell doesn't have Security Control
302
+ if (eufy_security_client_1.Device.isLock(s.type) || eufy_security_client_1.Device.isDoorbell(s.type)) {
303
+ s.disabled = true;
304
+ s.ignored = true;
348
305
  }
349
- this.stations[stationIndex].devices.push(d);
306
+ this.stations.push(s);
350
307
  this.storeAccessories();
351
308
  this.pushEvent('addAccessory', this.stations);
352
309
  }
353
- else {
354
- this.log.error('Station not found for device:', d.displayName);
355
- }
356
- }
357
- storeAccessories() {
358
- const dataToStore = { version: package_json_1.version, stations: this.stations };
359
- fs.writeFileSync(this.storedAccessories_file, JSON.stringify(dataToStore));
360
- }
361
- async resetPlugin() {
362
- try {
363
- fs.rmSync(this.storagePath, { recursive: true });
364
- return { result: 1 };
365
- }
366
- catch (error) {
367
- this.log.error('Could not reset plugin: ' + error);
368
- return { result: 0 };
369
- }
370
- }
371
- async getLogs() {
372
- // Step 1: List Files in Directory
373
- // Asynchronously list all files in the directory specified by this.storagePath.
374
- const files = await fs.promises.readdir(this.storagePath);
375
- // Step 2: Filter Log Files
376
- // Filter the list of files to include only those with names ending in .log, .log.0.
377
- const logFiles = files.filter(file => {
378
- return file.endsWith('.log') || file.endsWith('.log.0');
379
- });
380
- // Step 3: Filter out Empty Log Files
381
- const nonEmptyLogFiles = await Promise.all(logFiles.map(async (file) => {
382
- const filePath = path_1.default.join(this.storagePath, file);
383
- const stats = await fs.promises.stat(filePath);
384
- if (stats.size > 0) {
385
- return file;
310
+ async addDevice(device) {
311
+ // Before doing anything check if creds are guest admin
312
+ if (this.adminAccountUsed) {
313
+ this.pushEvent('AdminAccountUsed', true);
314
+ return;
315
+ }
316
+ await this.delay(2000);
317
+ const d = {
318
+ uniqueId: device.getSerial(),
319
+ displayName: device.getName(),
320
+ type: device.getDeviceType(),
321
+ typename: eufy_security_client_1.DeviceType[device.getDeviceType()],
322
+ standalone: device.getSerial() === device.getStationSerial(),
323
+ hasBattery: device.hasBattery(),
324
+ isCamera: device.isCamera(),
325
+ isDoorbell: device.isDoorbell(),
326
+ isKeypad: device.isKeyPad(),
327
+ supportsRTSP: device.hasPropertyValue(eufy_security_client_1.PropertyName.DeviceRTSPStream),
328
+ supportsTalkback: device.hasCommand(eufy_security_client_1.CommandName.DeviceStartTalkback),
329
+ DeviceEnabled: device.hasProperty(eufy_security_client_1.PropertyName.DeviceEnabled),
330
+ DeviceMotionDetection: device.hasProperty(eufy_security_client_1.PropertyName.DeviceMotionDetection),
331
+ DeviceLight: device.hasProperty(eufy_security_client_1.PropertyName.DeviceLight),
332
+ DeviceChimeIndoor: device.hasProperty(eufy_security_client_1.PropertyName.DeviceChimeIndoor),
333
+ disabled: false,
334
+ properties: device.getProperties(),
335
+ };
336
+ if (device.hasProperty(eufy_security_client_1.PropertyName.DeviceChargingStatus)) {
337
+ d.chargingStatus = device.getPropertyValue(eufy_security_client_1.PropertyName.DeviceChargingStatus);
338
+ }
339
+ try {
340
+ delete d.properties.picture;
341
+ }
342
+ catch (error) {
343
+ this.log.error(error);
344
+ }
345
+ d.ignored = (this.config['ignoreDevices'] ?? []).includes(d.uniqueId);
346
+ const stationUniqueId = device.getStationSerial();
347
+ const stationIndex = this.stations.findIndex(station => station.uniqueId === stationUniqueId);
348
+ if (stationIndex !== -1) {
349
+ if (!this.stations[stationIndex].devices) {
350
+ this.stations[stationIndex].devices = [];
351
+ }
352
+ this.stations[stationIndex].devices.push(d);
353
+ this.storeAccessories();
354
+ this.pushEvent('addAccessory', this.stations);
355
+ }
356
+ else {
357
+ this.log.error('Station not found for device:', d.displayName);
386
358
  }
387
- return null;
388
- }));
389
- // Step 4: Remove null entries (empty log files) from the array
390
- return nonEmptyLogFiles.filter(file => file !== null);
391
- }
392
- /**
393
- * Asynchronously compresses log files from a directory and returns a Promise that resolves to a Buffer.
394
- * @returns {Promise<Buffer>} A Promise resolving to a Buffer containing compressed log files.
395
- */
396
- async downloadLogs() {
397
- this.pushEvent('downloadLogsProgress', { progress: 10, status: 'Gets non-empty log files' });
398
- const finalLogFiles = await this.getLogs();
399
- // Step 5: Add Log Files to Zip
400
- // Initialize a Zip instance and add each log file to the archive.
401
- this.pushEvent('downloadLogsProgress', { progress: 30, status: 'Add Log Files to Zip' });
402
- const zip = new zip_lib_1.Zip();
403
- let numberOfFiles = 0;
404
- finalLogFiles.forEach(logFile => {
405
- const filePath = path_1.default.join(this.storagePath, logFile);
406
- zip.addFile(filePath);
407
- numberOfFiles++;
408
- });
409
- // Step 6: Handle No Log Files Found
410
- // If no log files are found after filtering, throw an error.
411
- this.pushEvent('downloadLogsProgress', { progress: 40, status: 'No Log Files Found' });
412
- if (numberOfFiles === 0) {
413
- throw new Error('No log files were found');
414
359
  }
415
- try {
416
- // Step 7: Archive Zip
417
- // Archive the Zip instance to the specified log zip file.
418
- this.pushEvent('downloadLogsProgress', { progress: 45, status: `Compressing ${numberOfFiles} files` });
419
- await zip.archive(this.logZipFilePath);
420
- // Step 8: Read Zip File
421
- // Read the content of the generated log zip file into a Buffer.
422
- this.pushEvent('downloadLogsProgress', { progress: 80, status: 'Reading content' });
423
- const fileBuffer = fs.readFileSync(this.logZipFilePath);
424
- // Step 9: Return Buffer
425
- // Return the Buffer containing the compressed log files.
426
- this.pushEvent('downloadLogsProgress', { progress: 90, status: 'Returning zip file' });
427
- return fileBuffer;
360
+ storeAccessories() {
361
+ const dataToStore = { version: package_json_1.version, stations: this.stations };
362
+ fs.writeFileSync(this.storedAccessories_file, JSON.stringify(dataToStore));
428
363
  }
429
- catch (error) {
430
- // Step 10: Error Handling
431
- // Log an error if archiving the zip file fails and propagate the error.
432
- this.log.error('Error while generating log files: ' + error);
433
- throw error;
364
+ async resetPlugin() {
365
+ try {
366
+ fs.rmSync(this.storagePath, { recursive: true });
367
+ return { result: 1 };
368
+ }
369
+ catch (error) {
370
+ this.log.error('Could not reset plugin: ' + error);
371
+ return { result: 0 };
372
+ }
434
373
  }
435
- finally {
436
- // Step 11: Cleanup
437
- // Ensure to remove any compressed log files after the operation, regardless of success or failure.
438
- this.removeCompressedLogs();
374
+ async getLogs() {
375
+ // Step 1: List Files in Directory
376
+ // Asynchronously list all files in the directory specified by this.storagePath.
377
+ const files = await fs.promises.readdir(this.storagePath);
378
+ // Step 2: Filter Log Files
379
+ // Filter the list of files to include only those with names ending in .log, .log.0.
380
+ const logFiles = files.filter(file => {
381
+ return file.endsWith('.log') || file.endsWith('.log.0');
382
+ });
383
+ // Step 3: Filter out Empty Log Files
384
+ const nonEmptyLogFiles = await Promise.all(logFiles.map(async (file) => {
385
+ const filePath = path_1.default.join(this.storagePath, file);
386
+ const stats = await fs.promises.stat(filePath);
387
+ if (stats.size > 0) {
388
+ return file;
389
+ }
390
+ return null;
391
+ }));
392
+ // Step 4: Remove null entries (empty log files) from the array
393
+ return nonEmptyLogFiles.filter(file => file !== null);
439
394
  }
440
- }
441
- removeCompressedLogs() {
442
- try {
443
- if (fs.existsSync(this.logZipFilePath)) {
444
- fs.unlinkSync(this.logZipFilePath);
395
+ /**
396
+ * Asynchronously compresses log files from a directory and returns a Promise that resolves to a Buffer.
397
+ * @returns {Promise<Buffer>} A Promise resolving to a Buffer containing compressed log files.
398
+ */
399
+ async downloadLogs() {
400
+ this.pushEvent('downloadLogsProgress', { progress: 10, status: 'Gets non-empty log files' });
401
+ const finalLogFiles = await this.getLogs();
402
+ // Step 5: Add Log Files to Zip
403
+ // Initialize a Zip instance and add each log file to the archive.
404
+ this.pushEvent('downloadLogsProgress', { progress: 30, status: 'Add Log Files to Zip' });
405
+ const zip = new zip_lib_1.Zip();
406
+ let numberOfFiles = 0;
407
+ finalLogFiles.forEach(logFile => {
408
+ const filePath = path_1.default.join(this.storagePath, logFile);
409
+ zip.addFile(filePath);
410
+ numberOfFiles++;
411
+ });
412
+ // Step 6: Handle No Log Files Found
413
+ // If no log files are found after filtering, throw an error.
414
+ this.pushEvent('downloadLogsProgress', { progress: 40, status: 'No Log Files Found' });
415
+ if (numberOfFiles === 0) {
416
+ throw new Error('No log files were found');
417
+ }
418
+ try {
419
+ // Step 7: Archive Zip
420
+ // Archive the Zip instance to the specified log zip file.
421
+ this.pushEvent('downloadLogsProgress', { progress: 45, status: `Compressing ${numberOfFiles} files` });
422
+ await zip.archive(this.logZipFilePath);
423
+ // Step 8: Read Zip File
424
+ // Read the content of the generated log zip file into a Buffer.
425
+ this.pushEvent('downloadLogsProgress', { progress: 80, status: 'Reading content' });
426
+ const fileBuffer = fs.readFileSync(this.logZipFilePath);
427
+ // Step 9: Return Buffer
428
+ // Return the Buffer containing the compressed log files.
429
+ this.pushEvent('downloadLogsProgress', { progress: 90, status: 'Returning zip file' });
430
+ return fileBuffer;
431
+ }
432
+ catch (error) {
433
+ // Step 10: Error Handling
434
+ // Log an error if archiving the zip file fails and propagate the error.
435
+ this.log.error('Error while generating log files: ' + error);
436
+ throw error;
437
+ }
438
+ finally {
439
+ // Step 11: Cleanup
440
+ // Ensure to remove any compressed log files after the operation, regardless of success or failure.
441
+ this.removeCompressedLogs();
445
442
  }
446
- return true;
447
443
  }
448
- catch {
449
- return false;
444
+ removeCompressedLogs() {
445
+ try {
446
+ if (fs.existsSync(this.logZipFilePath)) {
447
+ fs.unlinkSync(this.logZipFilePath);
448
+ }
449
+ return true;
450
+ }
451
+ catch {
452
+ return false;
453
+ }
450
454
  }
451
455
  }
456
+ // Start the instance of the server
457
+ new UiServer();
452
458
  }
453
- // Start the instance of the server
454
- new UiServer();
459
+ // Initialize the server
460
+ initServer().catch(err => {
461
+ console.error('Failed to initialize the server:', err);
462
+ process.exit(1);
463
+ });
455
464
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAsJ;AACtJ,iEAAuE;AACvE,uCAAyB;AACzB,iCAAoD;AACpD,+DAAoD;AACpD,qCAA8B;AAC9B,qDAAyG;AACzG,kDAA0C;AAC1C,gDAAwB;AAExB,MAAM,QAAS,SAAQ,0CAAwB;IACtC,QAAQ,GAAgB,EAAE,CAAC;IAE1B,UAAU,GAAwB,IAAI,CAAC;IACvC,GAAG,CAAqB;IACxB,KAAK,CAAqB;IAC1B,WAAW,GAAW,IAAI,CAAC,qBAAqB,GAAG,eAAe,CAAC;IACnE,sBAAsB,GAAW,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC;IACxE,cAAc,GAAW,IAAI,CAAC,WAAW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;YACf,CAAC;QACH,CAAC;KACF;IAED,mCAAmC;IACnC,IAAI,QAAQ,EAAE,CAAC;AACjB,CAAC;AAED,wBAAwB;AACxB,UAAU,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACvB,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge Eufy Security",
3
3
  "name": "homebridge-eufy-security",
4
- "version": "4.3.3",
4
+ "version": "4.3.4",
5
5
  "description": "Control Eufy Security from homebridge.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "url": "https://github.com/homebridge-eufy-security/plugin/issues"
19
19
  },
20
20
  "engines": {
21
- "node": "^20.15.1 || ^22",
21
+ "node": "20.11.0 || ^22",
22
22
  "homebridge": "^1.8.0 || ^2.0.0-beta.0"
23
23
  },
24
24
  "main": "dist/index.js",