Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
### UPDATED
- Properly detects ADT Pulse Gateway systems with no WAN IP Address.

### FIXED
- Checks for when no force arming is required (no do submit handlers available).

v3.0.3
  • Loading branch information
mrjackyliang committed Jan 19, 2024
1 parent d9bb7e5 commit 24fc81e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-adt-pulse",
"displayName": "Homebridge ADT Pulse",
"version": "3.0.2",
"version": "3.0.3",
"description": "Homebridge security system platform for ADT Pulse",
"main": "./build/src/index.js",
"exports": "./build/src/index.js",
Expand Down
8 changes: 6 additions & 2 deletions src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ export class ADTPulse {
// If the parsing function may be parsing data incorrectly.
if (
Object.keys(fetchedTableCells).length !== 11 // Compact SMA Protocol Gateway / Cellular Mode.
&& Object.keys(fetchedTableCells).length !== 17 // ADT Pulse Gateway / Broadband Mode / No Router WAN IP Address.
&& Object.keys(fetchedTableCells).length !== 18 // ADT Pulse Gateway / Broadband Mode.
) {
if (this.#internal.debug) {
Expand Down Expand Up @@ -3156,14 +3157,17 @@ export class ADTPulse {
await this.newInformationDispatcher('do-submit-handlers', parsedDoSubmitHandlers);

// If the parsing function may be parsing data incorrectly.
if (parsedDoSubmitHandlers.length !== 2) {
if (
parsedDoSubmitHandlers.length !== 0 // No force arming required.
&& parsedDoSubmitHandlers.length !== 2 // Force arming required.
) {
if (this.#internal.debug) {
debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'warn', 'The parseDoSubmitHandlers() function may be parsing the do submit handlers incorrectly');
}

await this.newInformationDispatcher('debug-parser', {
parserName: 'parseDoSubmitHandlers()',
parserReason: 'length does not match 2',
parserReason: 'length does not match 0 or 2',
parserResponse: parsedDoSubmitHandlers,
rawData: response.data,
});
Expand Down

0 comments on commit 24fc81e

Please sign in to comment.