homebridge-verisure 2.0.0-rc.4 → 2.0.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## 2.0.1 (Mar 31, 2021)
2
+
3
+ ### Dependencies
4
+
5
+ * Bump `verisure` module.
6
+
7
+ ## 2.0.0 (Mar 20, 2023)
8
+
9
+ ### Config
10
+
11
+ * __BREAKING__: Property `cookies` replaces `token`. See README for how to get and configure.
12
+
13
+ ### Plugin & accessories
14
+
15
+ * Use Verisure GraphQL API.
16
+
17
+ ### Dependencies
18
+
19
+ * Bump `verisure` module to support GraphQL requests.
20
+
1
21
  ## 1.16.0 (Aug 27, 2022)
2
22
 
3
23
  ### Plugin
@@ -35,6 +35,8 @@ class DoorLock extends VerisureAccessory {
35
35
  }
36
36
 
37
37
  getDoorLockState() {
38
+ this.log('Getting current lock state.', 'debug');
39
+
38
40
  return this.installation.client(overviewOperation)
39
41
  .then((overview) => overview.installation.doorlocks
40
42
  .find((doorlock) => doorlock.device.deviceLabel === this.serialNumber))
@@ -47,8 +49,6 @@ class DoorLock extends VerisureAccessory {
47
49
  }
48
50
 
49
51
  getCurrentLockState(callback) {
50
- this.log('Getting current lock state.', 'debug');
51
-
52
52
  // TODO: Use this.cachedValue, if available?
53
53
 
54
54
  this.getDoorLockState().then((doorLock) => {
@@ -117,7 +117,6 @@ class DoorLock extends VerisureAccessory {
117
117
 
118
118
  this.installation.client(doorLockConfigOperation(this.serialNumber))
119
119
  .then(({ installation: { smartLocks: [smartLock] } }) => {
120
- this.log(`Got config: ${JSON.stringify(smartLock)}`, 'debug');
121
120
  this.autoLockState = DoorLock.resolveAutoLockState(smartLock.configuration);
122
121
  callback(null, this.autoLockState);
123
122
  })
@@ -145,7 +144,6 @@ class DoorLock extends VerisureAccessory {
145
144
 
146
145
  this.installation.client(doorLockConfigOperation(this.serialNumber))
147
146
  .then(({ installation: { smartLocks: [smartLock] } }) => {
148
- this.log(`Got config: ${JSON.stringify(smartLock)}`, 'debug');
149
147
  this.audioState = smartLock.configuration.volume !== this.platformConfig.audioOffValue;
150
148
  callback(null, this.audioState);
151
149
  })
@@ -159,6 +157,8 @@ class DoorLock extends VerisureAccessory {
159
157
  ? this.platformConfig.audioOnValue
160
158
  : this.platformConfig.audioOffValue;
161
159
 
160
+ this.log(`Setting audio volume to: ${volume}`);
161
+
162
162
  this.installation.client(
163
163
  doorLockUpdateConfigOperation(this.serialNumber, { volume }),
164
164
  )
package/lib/platform.js CHANGED
@@ -17,6 +17,7 @@ class VerisurePlatform {
17
17
  VERISURE_EMAIL,
18
18
  VERISURE_PASSWORD,
19
19
  VERISURE_COOKIES,
20
+ VERISURE_TOKEN, // Deprecated.
20
21
  } = process.env;
21
22
 
22
23
  const {
@@ -31,6 +32,7 @@ class VerisurePlatform {
31
32
  showAudioSwitch = true,
32
33
  audioOffValue = 'LOW',
33
34
  audioOnValue = 'HIGH',
35
+ token, // Deprecated.
34
36
  } = config;
35
37
 
36
38
  this.config = {
@@ -50,6 +52,10 @@ class VerisurePlatform {
50
52
  this.homebridge = homebridge;
51
53
  this.logger = logger;
52
54
 
55
+ if (VERISURE_TOKEN || token) {
56
+ this.logger.error('DEPRECATED: Property "token" in config. Please see README to get and configure "cookies".');
57
+ }
58
+
53
59
  this.verisure = new Verisure(
54
60
  this.config.email,
55
61
  this.config.password,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-verisure",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.1",
4
4
  "description": "Verisure plugin for homebridge: https://github.com/nfarina/homebridge",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "enquirer": "^2.3.6",
31
- "verisure": "^5.1.0"
31
+ "verisure": "^5.1.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "eslint": "^6.7.2",