Skip to content

Commit

Permalink
New features and bug fixes
Browse files Browse the repository at this point in the history
### UPDATED
- Plugin will now check if itself is outdated by comparing between "semver" versions and not through an equals comparison.
- Sensor name minimum is now set to the length of "0" to accomodate for the new settings panel form.
- Swapped the placements for ADT Sensor Zone and Type, where the sensor zone will now come first.
- Authentication API will now properly check for an error message during login in the "getVerificationMethods()" method.

### FIXED
- Potential issue with `isMaintenancePeriod()` where the end time may have also included the next day.

### ADDED
- New settings panel (classic settings panel will continue to be accessible via the "Plugin" tab > "Classic View" button)
  • Loading branch information
mrjackyliang committed Aug 19, 2024
1 parent e9b4bab commit 49abb59
Show file tree
Hide file tree
Showing 27 changed files with 2,230 additions and 246 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Here is an example of how the `config.json` file for this plugin should be confi
{
"name": "Family Room Couch Window 1",
"adtName": "Family Room Window (99)",
"adtType": "doorWindow",
"adtZone": 99
"adtZone": 99,
"adtType": "doorWindow"
}
]
},
Expand Down Expand Up @@ -136,12 +136,12 @@ All sensors are now organized within an array of objects, with each object conta
- For display purposes (offers clarity in the event of an unforeseen reset).
- __ADT Name__ (`adtName`)
- Must match the name shown under the "Name" column in the "System" tab when logged into the portal.
- __ADT Type__ (`adtType`)
- Must match the type shown under the "Device Type" column in the "System" tab when logged into the portal.
- For example, if the type is "Door/Window Sensor", the value should be `doorWindow`. Read the [Supported Devices](#supported-devices) section for more information.
- __ADT Zone__ (`adtZone`)
- Must match the zone shown under the "Zone" column in the "System" tab when logged into the portal.
- For compatibility reasons, only devices with zones 1 through 99 are supported.
- __ADT Type__ (`adtType`)
- Must match the type shown under the "Device Type" column in the "System" tab when logged into the portal.
- For example, if the type is "Door/Window Sensor", the value should be `doorWindow`. Read the [Supported Devices](#supported-devices) section for more information.

If you do not wish to add sensors, simply assign an empty array (e.g. `[]`). However, it is advisable to include all supported sensors, as having none does not optimize plugin performance.

Expand Down
32 changes: 14 additions & 18 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"required": false,
"description": "<strong class=\"font-weight-bold\">Optional.</strong> Provide a display name for this sensor to differentiate it from the names assigned by ADT technicians during installation.",
"placeholder": "e.g. Family Room Couch Window 1",
"minLength": 1,
"minLength": 0,
"maxLength": 50
},
"adtName": {
Expand All @@ -162,6 +162,15 @@
"minLength": 1,
"maxLength": 100
},
"adtZone": {
"title": "ADT Sensor Zone",
"type": "number",
"required": true,
"description": "Specify the <strong class=\"font-weight-bold\">exact zone</strong> associated with the sensor you want to add. Double-check the zone to ensure the correct sensor is added.",
"placeholder": "e.g. 99",
"minimum": 1,
"maximum": 99
},
"adtType": {
"title": "ADT Sensor Type",
"type": "string",
Expand Down Expand Up @@ -223,15 +232,6 @@
]
}
]
},
"adtZone": {
"title": "ADT Sensor Zone",
"type": "number",
"required": true,
"description": "Specify the <strong class=\"font-weight-bold\">exact zone</strong> associated with the sensor you want to add. Double-check the zone to ensure the correct sensor is added.",
"placeholder": "e.g. 99",
"minimum": 1,
"maximum": 99
}
}
},
Expand Down Expand Up @@ -301,10 +301,6 @@
{
"key": "fingerprint",
"type": "password"
},
{
"type": "help",
"helpvalue": "<div class=\"alert alert-primary\" role=\"alert\">In a future update, you will be able to utilize an upgraded settings panel that allows you to see the details of your fingerprint. Fingerprints generated are randomized.</div>"
}
]
},
Expand All @@ -328,13 +324,13 @@
"key": "sensors[].adtName",
"type": "text"
},
{
"key": "sensors[].adtType",
"type": "select"
},
{
"key": "sensors[].adtZone",
"type": "number"
},
{
"key": "sensors[].adtType",
"type": "select"
}
]
}
Expand Down
4 changes: 3 additions & 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.3.5",
"version": "3.4.0",
"description": "Homebridge security system platform for ADT Pulse",
"main": "./build/index.js",
"exports": "./build/index.js",
Expand Down Expand Up @@ -79,6 +79,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hook-form": "7.52.1",
"semver": "7.6.3",
"serialize-error": "11.0.3",
"tough-cookie": "4.1.4",
"ua-parser-js": "2.0.0-beta.3",
Expand All @@ -91,6 +92,7 @@
"@types/node": "20.14.11",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/semver": "7.5.8",
"@types/tough-cookie": "4.0.5",
"@typescript-eslint/eslint-plugin": "7.17.0",
"@typescript-eslint/parser": "7.17.0",
Expand Down
Loading

0 comments on commit 49abb59

Please sign in to comment.