Skip to content

Commit

Permalink
Bug fixes and enhancements
Browse files Browse the repository at this point in the history
- Fixed an issue where Web Portal Mismatch messages were repeatedly thrown everytime the plugin synced with the portal.
- Removed "unofficial" keyword from description.
  • Loading branch information
mrjackyliang committed Oct 28, 2019
1 parent 02b2deb commit 4e438e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ function ADTPulsePlatform(log, config, api) {
this.syncing = undefined;
this.isSyncing = false;

// Session data.
this.sessionVersion = "";

// Credentials could be null.
this.username = _.get(this.config, "username");
this.password = _.get(this.config, "password");
Expand Down Expand Up @@ -592,9 +595,12 @@ ADTPulsePlatform.prototype.portalSync = function () {
let version = _.get(response, "info.version", undefined);
let supportedVersion = "16.0.0-131";

if (version !== undefined && version !== supportedVersion) {
if (version !== undefined && version !== supportedVersion && version !== this.sessionVersion) {
this.logMessage(`Web Portal version ${version} does not match ${supportedVersion}.`, 20);
}

// Bind version to session so message doesn't keep showing up.
this.sessionVersion = version;
})
.then(() => this.theAlarm.performPortalSync())
.then(async (syncCode) => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-adt-pulse",
"version": "1.2.4",
"description": "Unofficial Homebridge security system platform for ADT Pulse",
"version": "1.2.5",
"description": "Homebridge security system platform for ADT Pulse",
"main": "index.js",
"scripts": {
"start": "homebridge --debug --plugin-path $(pwd) && exit 1",
Expand Down

0 comments on commit 4e438e0

Please sign in to comment.