homebridge-adt-pulse 2.0.3 → 2.1.2

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 CHANGED
@@ -19,33 +19,34 @@ You can also search `adt-pulse` using [HOOBS](https://github.com/mkellsy/homebri
19
19
  When configuring this plugin, simply add the platform to your existing `config.json` file. Mind that the `platform` name must always be `ADTPulse`.
20
20
  ```json
21
21
  {
22
- "platforms": [
22
+ "platforms": [
23
+ {
24
+ "platform": "ADTPulse",
25
+ "name": "ADT Pulse",
26
+ "username": "email@email.com",
27
+ "password": "1234567890",
28
+ "fingerprint": "abcdef1234567890=",
29
+ "overrideSensors": [
23
30
  {
24
- "platform": "ADTPulse",
25
- "name": "ADT Pulse",
26
- "username": "email@email.com",
27
- "password": "1234567890",
28
- "overrideSensors": [
29
- {
30
- "name": "Sample Sensor 1",
31
- "type": "sensor,doorWindow"
32
- },
33
- {
34
- "name": "...",
35
- "type": "..."
36
- }
37
- ],
38
- "country": "us",
39
- "logLevel": 30,
40
- "logActivity": true,
41
- "removeObsoleteZones": true,
42
- "resetAll": false
31
+ "name": "Sample Sensor 1",
32
+ "type": "sensor,doorWindow"
43
33
  },
44
34
  {
45
- "platform": "...",
46
- "name": "..."
35
+ "name": "...",
36
+ "type": "..."
47
37
  }
48
- ]
38
+ ],
39
+ "country": "us",
40
+ "logLevel": 30,
41
+ "logActivity": true,
42
+ "removeObsoleteZones": true,
43
+ "resetAll": false
44
+ },
45
+ {
46
+ "platform": "...",
47
+ "name": "..."
48
+ }
49
+ ]
49
50
  }
50
51
  ```
51
52
 
@@ -64,6 +65,18 @@ If you have a sensor that is unsupported by this plugin, please [submit an issue
64
65
 
65
66
  Due to ADT Pulse limitations, accessories that are connected to the Z-Wave Platform cannot be supported. Consider using other Homebridge plugins.
66
67
 
68
+ ## Configure 2-Factor Authentication
69
+ With the recent updates, ADT Pulse now requires 2-factor authentication for your account. In the near future, this fingerprint will be required.
70
+
71
+ 1. Open a Chrome browser tab
72
+ 2. Open Developer Tools (using **View** ➜ **Developer** ➜ **Developer Tools** menu)
73
+ 3. Click on the **Network** tab (make sure **Preserve log** checkbox is checked)
74
+ 4. In the filter box, enter **signin.jsp**
75
+ 5. Go to `https://portal.adtpulse.com` or `https://portal-ca.adtpulse.com` and login to your account
76
+ 6. Click on the network call (beginning with `signin.jsp`) appearing in the DevTools window
77
+ 7. In the **Headers** tab, under **Form Data**, copy the entire **fingerprint** (after `fingerprint:`, do not include spaces)
78
+ 8. Paste the copied text into the `fingerprint` field into your `config.json`
79
+
67
80
  ## Force Arming (Arm Away/Stay/Night)
68
81
  Due to the nature of how HomeKit and ADT Pulse processes `setDeviceStatus` commands, this plugin will force arm when it detects active motion or open sensors.
69
82
 
@@ -148,4 +161,4 @@ The script provides an active connection to the ADT Pulse portal. Here is a list
148
161
  ## Credits and Appreciation
149
162
  If you would like to show your appreciation for its continued development, you can optionally become my supporter on [GitHub Sponsors](https://github.com/sponsors/mrjackyliang)!
150
163
 
151
- Also, thank you to [@kevinmkickey](https://github.com/kevinmhickey) for providing the [ADT Pulse script](https://github.com/kevinmhickey/adt-pulse).
164
+ Also, thank you to [@kevinmkickey](https://github.com/kevinmhickey) for providing the [ADT Pulse script](https://github.com/kevinmhickey/adt-pulse) and [@Danimal4326](https://github.com/Danimal4326) for finding the solution for ADT Pulse's 2-factor authentication.
package/api.js CHANGED
@@ -49,6 +49,7 @@ let lastKnownSiteId = '';
49
49
  function Pulse(options) {
50
50
  this.username = _.get(options, 'username', '');
51
51
  this.password = _.get(options, 'password', '');
52
+ this.fingerprint = _.get(options, 'fingerprint', '');
52
53
  this.overrideSensors = _.get(options, 'overrideSensors', []);
53
54
  this.country = _.get(options, 'country', '');
54
55
  this.debug = _.get(options, 'debug', false);
@@ -135,6 +136,7 @@ Pulse.prototype.login = function login() {
135
136
  form: {
136
137
  usernameForm: that.username,
137
138
  passwordForm: that.password,
139
+ fingerprint: that.fingerprint,
138
140
  },
139
141
  }),
140
142
  (postError, postResponse, postBody) => {
@@ -772,9 +774,9 @@ Pulse.prototype.generateRequestOptions = function generateRequestOptions(additio
772
774
  const options = {
773
775
  jar,
774
776
  headers: {
775
- Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
777
+ Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
776
778
  Host: `${countrySubDomain}.adtpulse.com`,
777
- 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36',
779
+ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15',
778
780
  },
779
781
  ciphers: [
780
782
  'ECDHE-RSA-AES256-GCM-SHA384',
@@ -33,6 +33,13 @@
33
33
  "maxLength": 50,
34
34
  "description": "Password used for ADT Pulse login"
35
35
  },
36
+ "fingerprint": {
37
+ "title": "MFA Fingerprint",
38
+ "type": "string",
39
+ "default": "",
40
+ "required": true,
41
+ "description": "MFA Fingerprint from browser registered with ADT Pulse"
42
+ },
36
43
  "overrideSensors": {
37
44
  "title": "Override Sensors",
38
45
  "type": "array",
@@ -189,6 +196,9 @@
189
196
  }
190
197
  ]
191
198
  },
199
+ {
200
+ "key": "fingerprint"
201
+ },
192
202
  {
193
203
  "key": "overrideSensors",
194
204
  "buttonText": "Add Sensor",
package/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  const _ = require('lodash');
7
7
 
8
- const packageJson = require('./package');
8
+ const packageJson = require('./package.json');
9
9
  const Pulse = require('./api');
10
10
 
11
11
  let Accessory;
@@ -48,6 +48,7 @@ function ADTPulsePlatform(log, config, api) {
48
48
  // These variables could be undefined.
49
49
  this.username = _.get(this.config, 'username');
50
50
  this.password = _.get(this.config, 'password');
51
+ this.fingerprint = _.get(this.config, 'fingerprint');
51
52
  this.overrideSensors = _.get(this.config, 'overrideSensors');
52
53
  this.country = _.get(this.config, 'country');
53
54
  this.logLevel = _.get(this.config, 'logLevel');
@@ -121,6 +122,7 @@ function ADTPulsePlatform(log, config, api) {
121
122
  this.pulse = new Pulse({
122
123
  username: this.username,
123
124
  password: this.password,
125
+ fingerprint: this.fingerprint,
124
126
  overrideSensors: this.overrideSensors,
125
127
  country: this.country,
126
128
  debug: (this.logLevel >= 40),
@@ -845,7 +847,7 @@ ADTPulsePlatform.prototype.portalSync = function portalSync() {
845
847
  .login()
846
848
  .then((response) => {
847
849
  const version = _.get(response, 'info.version');
848
- const supportedVersion = ['21.0.0-344', '21.0.0-353'];
850
+ const supportedVersion = ['21.0.0-354', '22.0.0-233'];
849
851
 
850
852
  if (version !== undefined && !supportedVersion.includes(version) && version !== this.sessionVersion) {
851
853
  this.logMessage(`Web Portal version ${version} detected. Test plugin to ensure system compatibility...`, 20);
package/package.json CHANGED
@@ -1,59 +1,57 @@
1
1
  {
2
- "name": "homebridge-adt-pulse",
3
- "displayName": "Homebridge ADT Pulse",
4
- "version": "2.0.3",
5
- "description": "Homebridge security system platform for ADT Pulse",
6
- "main": "index.js",
7
- "private": false,
8
- "scripts": {
9
- "start": "homebridge --plugin-path $(pwd)",
10
- "start:debug": "homebridge --debug --plugin-path $(pwd)",
11
- "test": ""
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git://github.com/mrjackyliang/homebridge-adt-pulse.git"
16
- },
17
- "funding": {
18
- "type": "github",
19
- "url": "https://github.com/sponsors/mrjackyliang"
20
- },
21
- "keywords": [
22
- "homebridge",
23
- "homebridge-plugin",
24
- "homekit",
25
- "adt",
26
- "adt-pulse",
27
- "icontrol",
28
- "security",
29
- "security-system"
30
- ],
31
- "author": "Jacky Liang",
32
- "license": "ISC",
33
- "bugs": {
34
- "url": "https://github.com/mrjackyliang/homebridge-adt-pulse/issues"
35
- },
36
- "files": [
37
- "*.js",
38
- "*.schema.json"
39
- ],
40
- "homepage": "https://github.com/mrjackyliang/homebridge-adt-pulse#readme",
41
- "engines": {
42
- "node": ">=10.0.0",
43
- "homebridge": ">=0.4.50"
44
- },
45
- "dependencies": {
46
- "cheerio": "1.0.0-rc.5",
47
- "internet-available": "^1.0.0",
48
- "lodash": "^4.17.20",
49
- "q": "^1.5.1",
50
- "request": "^2.88.2"
51
- },
52
- "devDependencies": {
53
- "eslint": "^6.8.0",
54
- "eslint-config-airbnb-base": "^14.2.1",
55
- "eslint-plugin-import": "^2.22.1",
56
- "homebridge": "^0.4.53",
57
- "typescript": "^3.9.7"
58
- }
2
+ "name": "homebridge-adt-pulse",
3
+ "displayName": "Homebridge ADT Pulse",
4
+ "version": "2.1.2",
5
+ "description": "Homebridge security system platform for ADT Pulse",
6
+ "main": "index.js",
7
+ "private": false,
8
+ "scripts": {
9
+ "start": "homebridge --plugin-path $(pwd)",
10
+ "start:debug": "homebridge --debug --plugin-path $(pwd)"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git://github.com/mrjackyliang/homebridge-adt-pulse.git"
15
+ },
16
+ "funding": {
17
+ "type": "github",
18
+ "url": "https://github.com/sponsors/mrjackyliang"
19
+ },
20
+ "keywords": [
21
+ "homebridge",
22
+ "homebridge-plugin",
23
+ "homekit",
24
+ "adt",
25
+ "adt-pulse",
26
+ "icontrol",
27
+ "security",
28
+ "security-system"
29
+ ],
30
+ "author": "Jacky Liang",
31
+ "license": "ISC",
32
+ "bugs": {
33
+ "url": "https://github.com/mrjackyliang/homebridge-adt-pulse/issues"
34
+ },
35
+ "files": [
36
+ "*.js",
37
+ "*.schema.json"
38
+ ],
39
+ "homepage": "https://github.com/mrjackyliang/homebridge-adt-pulse#readme",
40
+ "engines": {
41
+ "homebridge": ">=0.4.50",
42
+ "node": ">=14.16.0"
43
+ },
44
+ "dependencies": {
45
+ "cheerio": "1.0.0-rc.5",
46
+ "internet-available": "^1.0.0",
47
+ "lodash": "^4.17.20",
48
+ "q": "^1.5.1",
49
+ "request": "^2.88.2"
50
+ },
51
+ "devDependencies": {
52
+ "eslint": "^6.8.0",
53
+ "eslint-config-airbnb-base": "^14.2.1",
54
+ "eslint-plugin-import": "^2.22.1",
55
+ "typescript": "^3.9.7"
56
+ }
59
57
  }