Skip to content

Commit 0a45ff6

Browse files
committed
Added new devices and fixed bugs
### UPDATED - `removePersonalIdentifiableInformation` will now include device last update and next update. ### FIXED - `removePersonalIdentifiableInformation` did not properly redact some information belonging to array of strings. ### ADDED - TSSC Lifestyle Module Gateway and Security Panel.
1 parent cbfdfda commit 0a45ff6

File tree

4 files changed

+38
-14
lines changed

4 files changed

+38
-14
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ Here is an example of the information I see when the plugin detects unknown stat
227227
```json
228228
{
229229
"communication": {
230-
"broadbandConnectionStatus": "Unavailable",
230+
"broadbandConnectionStatus": "Active",
231231
"cellularConnectionStatus": "N/A",
232232
"cellularSignalStrength": "N/A",
233233
"primaryConnectionType": "Broadband"
234234
},
235235
"manufacturer": "ADT Pulse Gateway",
236-
"model": "XYZ",
236+
"model": "PGZNG1",
237237
"network": {
238238
"broadband": {
239239
"ip": "*** REDACTED FOR PRIVACY ***",
@@ -251,12 +251,12 @@ Here is an example of the information I see when the plugin detects unknown stat
251251
"serialNumber": "*** REDACTED FOR PRIVACY ***",
252252
"status": "Online",
253253
"update": {
254-
"last": "Yesterday 12:00 PM",
255-
"next": "Today 12:00 PM"
254+
"last": "*** REDACTED FOR PRIVACY ***",
255+
"next": "*** REDACTED FOR PRIVACY ***"
256256
},
257257
"versions": {
258-
"firmware": "1.0.0",
259-
"hardware": "1.0.0"
258+
"firmware": "1.0.0-9",
259+
"hardware": "HW=2, BL=1.0.0, PL=1.0.0, SKU=12345"
260260
}
261261
}
262262
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "homebridge-adt-pulse",
33
"displayName": "Homebridge ADT Pulse",
4-
"version": "3.1.5",
4+
"version": "3.1.6",
55
"description": "Homebridge security system platform for ADT Pulse",
66
"main": "./build/index.js",
77
"exports": "./build/index.js",

src/lib/items.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,20 @@ export const deviceGateways: DeviceGateways = [
276276
cellularSignalStrength: 'N/A',
277277
firmwareVersion: '27.0.0-140',
278278
hardwareVersion: 'HW=02_CSMAP, BL=NA, PL=27.0.0-140',
279-
manufacturer: '',
279+
manufacturer: null,
280280
model: 'Compact SMA Protocol Gateway',
281281
primaryConnectionType: 'Cellular',
282282
},
283+
{
284+
broadbandConnectionStatus: 'Active',
285+
cellularConnectionStatus: 'N/A',
286+
cellularSignalStrength: 'N/A',
287+
firmwareVersion: '24.0.0-9',
288+
hardwareVersion: 'HW=0002, BL=UBOOT 2009.08-svn99, PL=5.5.0-5, SKU=TSSC-NA-NONE-01',
289+
manufacturer: 'ADT',
290+
model: 'TSSC Lifestyle Module',
291+
primaryConnectionType: 'Broadband',
292+
},
283293
];
284294

285295
/**
@@ -288,6 +298,16 @@ export const deviceGateways: DeviceGateways = [
288298
* @since 1.0.0
289299
*/
290300
export const deviceSecurityPanels: DeviceSecurityPanels = [
301+
{
302+
emergencyKeys: 'Button: Fire Alarm (Zone 995) Button: Audible Panic Alarm (Zone 999)',
303+
manufacturerProvider: 'ADT',
304+
typeModel: 'TSSC Life Safety Module',
305+
},
306+
{
307+
emergencyKeys: null,
308+
manufacturerProvider: 'DSC',
309+
typeModel: 'Security Panel - Impassa SCW9057',
310+
},
291311
{
292312
emergencyKeys: 'Button: Fire Alarm (Zone 95) Button: Audible Panic Alarm (Zone 99)',
293313
manufacturerProvider: 'ADT',
@@ -298,11 +318,6 @@ export const deviceSecurityPanels: DeviceSecurityPanels = [
298318
manufacturerProvider: 'ADT',
299319
typeModel: 'Security Panel - Safewatch Pro 3000/3000CN',
300320
},
301-
{
302-
emergencyKeys: null,
303-
manufacturerProvider: 'DSC',
304-
typeModel: 'Security Panel - Impassa SCW9057',
305-
},
306321
];
307322

308323
/**

src/lib/utility.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,9 +1387,13 @@ export function removePersonalIdentifiableInformation(data: RemovePersonalIdenti
13871387
'Device LAN IP Address:',
13881388
'Device LAN MAC:',
13891389
'ip',
1390+
'Last Update:',
13901391
'lanIp',
1392+
'last',
13911393
'mac',
13921394
'masterCode',
1395+
'Next Update:',
1396+
'next',
13931397
'Router LAN IP Address:',
13941398
'Router WAN IP Address:',
13951399
'sat',
@@ -1399,6 +1403,7 @@ export function removePersonalIdentifiableInformation(data: RemovePersonalIdenti
13991403
'Serial Number:',
14001404
'wanIp',
14011405
];
1406+
const replacementText = '*** REDACTED FOR PRIVACY ***';
14021407

14031408
/**
14041409
* Remove personal identifiable information - Replace value.
@@ -1423,10 +1428,14 @@ export function removePersonalIdentifiableInformation(data: RemovePersonalIdenti
14231428
return replaceValue(item);
14241429
}
14251430

1431+
if (redactedKeys.includes(key)) {
1432+
return replacementText;
1433+
}
1434+
14261435
return item;
14271436
});
14281437
} else if (redactedKeys.includes(key)) {
1429-
modifiedObject[key] = '*** REDACTED FOR PRIVACY ***';
1438+
modifiedObject[key] = replacementText;
14301439
} else {
14311440
modifiedObject[key] = value;
14321441
}

0 commit comments

Comments
 (0)