homebridge-flume 2.0.9 → 2.1.0-beta.0
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 +10 -0
- package/lib/connection/http.js +7 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to homebridge-flume will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
⚠️ Note that Node 14 will no longer be supported after April 2023
|
|
6
6
|
|
|
7
|
+
## BETA
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Support for shared devices (thanks [@ssmoss](https://github.com/ssmoss)!)
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Fix a potential login issue that might be terminating the process incorrectly
|
|
16
|
+
|
|
7
17
|
## 2.0.9 (2023-01-07)
|
|
8
18
|
|
|
9
19
|
### Changed
|
package/lib/connection/http.js
CHANGED
|
@@ -63,6 +63,12 @@ export default class {
|
|
|
63
63
|
this.log('[HTTP obtainToken()] %s.', JSON.stringify(res.data));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
// Check to see we got a proper response
|
|
67
|
+
if (!res.data.data || !res.data.data[0]) {
|
|
68
|
+
this.log.warn('[HTTP obtainToken()] %s.', JSON.stringify(res.data));
|
|
69
|
+
throw new Error(platformLang.noDataReceived);
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
// Make the token available in other functions
|
|
67
73
|
this.accessToken = res.data.data[0].access_token;
|
|
68
74
|
this.refreshToken = res.data.data[0].refresh_token;
|
|
@@ -170,7 +176,7 @@ export default class {
|
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
// Perform the HTTP request
|
|
173
|
-
const res = await axios.get(`https://api.flumetech.com/users/${this.userId}/devices`, {
|
|
179
|
+
const res = await axios.get(`https://api.flumetech.com/users/${this.userId}/devices?list_shared=true`, {
|
|
174
180
|
headers: { Authorization: `Bearer ${this.accessToken}` },
|
|
175
181
|
timeout: 10000,
|
|
176
182
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-flume",
|
|
3
3
|
"alias": "Flume",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.1.0-beta.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ben Potter",
|
|
7
7
|
"email": "bwp91@icloud.com"
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
66
|
-
"eslint-plugin-import": "^2.
|
|
66
|
+
"eslint-plugin-import": "^2.27.4",
|
|
67
67
|
"eslint-plugin-import-newlines": "^1.3.0",
|
|
68
68
|
"eslint-plugin-sort-exports": "^0.8.0",
|
|
69
|
-
"eslint": "^8.
|
|
69
|
+
"eslint": "^8.32.0"
|
|
70
70
|
}
|
|
71
71
|
}
|