homebridge-levoit-humidifiers 1.3.1-beta1 → 1.4.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/README.md +32 -17
- package/dist/api/deviceTypes.d.ts +6 -3
- package/dist/api/deviceTypes.d.ts.map +1 -1
- package/dist/api/deviceTypes.js +27 -10
- package/dist/api/deviceTypes.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
# Homebridge Levoit Humidifiers
|
|
2
2
|
|
|
3
|
-
This is a Homebridge plugin to control Levoit Humidifiers
|
|
3
|
+
This is a Homebridge plugin to control Levoit Humidifiers via the VeSync Platform.
|
|
4
4
|
|
|
5
|
-
| Supported Versions
|
|
6
|
-
|
|
7
|
-
| Classic 300S
|
|
8
|
-
| Classic 200S
|
|
9
|
-
| Dual 200S
|
|
5
|
+
| Supported Versions | Tested |
|
|
6
|
+
|----------------------| -------------------------------- |
|
|
7
|
+
| Classic 300S | ✅ |
|
|
8
|
+
| Classic 200S | ✅ |
|
|
9
|
+
| Dual 200S | ✅ |
|
|
10
|
+
| Dual 200S (EU model) | ✅ |
|
|
11
|
+
| Dual 200S (UK model) | ✅ |
|
|
12
|
+
| LV600S (cool mode only) | ✅ |
|
|
10
13
|
|
|
11
|
-
This plugin was forked
|
|
14
|
+
This plugin was forked
|
|
15
|
+
from [RaresAil's Levoit Air Purifiers repo](https://github.com/RaresAil/homebridge-levoit-air-purifier) and adds logic
|
|
16
|
+
for the Levoit humidifers.
|
|
12
17
|
|
|
13
18
|
### Features
|
|
14
19
|
|
|
15
20
|
1. Set Mist Level
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- Levels 1-2 on Dual200s
|
|
21
|
+
- Levels 1-9 on Classic300s, Classic200s, and LV600S
|
|
22
|
+
- Levels 1-2 on Dual200s, Dual200S EU, and Dual200S UK
|
|
19
23
|
|
|
20
24
|
2. Mode change
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
- Auto
|
|
26
|
+
- Manual
|
|
27
|
+
|
|
28
|
+
### TODOs
|
|
29
|
+
|
|
30
|
+
* Add Sleep Mode
|
|
31
|
+
* Add LV600S Warm Mode
|
|
32
|
+
* Improve Auto Mode to specify target humidity
|
|
33
|
+
|
|
34
|
+
### Details
|
|
23
35
|
|
|
24
36
|
<a href="url"><img src="https://github.com/pschroeder89/homebridge-levoit-humidifiers/blob/main/images/auto.png?raw=true" width=25% height=25%></a>
|
|
25
37
|
<a href="url"><img src="https://github.com/pschroeder89/homebridge-levoit-humidifiers/blob/main/images/humidity.png?raw=true" width=25% height=25%></a>
|
|
26
38
|
<a href="url"><img src="https://github.com/pschroeder89/homebridge-levoit-humidifiers/blob/main/images/off.png?raw=true" width=25% height=25%></a>
|
|
27
39
|
|
|
28
|
-
The read data is cached for 5 seconds to not trigger the rate limiter for the API.
|
|
29
|
-
|
|
40
|
+
The read data is cached for 5 seconds to not trigger the rate limiter for the API. Each request is delayed by 500ms to
|
|
41
|
+
not trigger the rate limiter if a huge number of requests are sent.
|
|
30
42
|
|
|
31
|
-
The timers are not included because you can accomplish similar results by using Home App's Automation or the Shortcuts
|
|
43
|
+
The timers are not included because you can accomplish similar results by using Home App's Automation or the Shortcuts
|
|
44
|
+
app
|
|
32
45
|
|
|
33
46
|
### Configuration
|
|
34
47
|
|
|
@@ -37,9 +50,11 @@ The timers are not included because you can accomplish similar results by using
|
|
|
37
50
|
- Setup the platform plugin as a child bridge for better performance
|
|
38
51
|
- Save and restart Homebridge.
|
|
39
52
|
|
|
40
|
-
This plugin requires your VeSync credentials as it communicates with the VeSync devices via VeSync's own API. Your
|
|
53
|
+
This plugin requires your VeSync credentials as it communicates with the VeSync devices via VeSync's own API. Your
|
|
54
|
+
credentials are only stored in the Homebridge config and not sent to any server except VeSync's.
|
|
41
55
|
|
|
42
|
-
You can also do this directly via the homebridge config by adding your credentials to the config file under platforms.
|
|
56
|
+
You can also do this directly via the homebridge config by adding your credentials to the config file under platforms.
|
|
57
|
+
Replace the values of `username` and `password` by your credentials.
|
|
43
58
|
|
|
44
59
|
```json
|
|
45
60
|
{
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare enum DeviceName {
|
|
2
|
-
Classic300S = "
|
|
3
|
-
Classic200S = "
|
|
4
|
-
Dual200S = "
|
|
2
|
+
Classic300S = "Classic300S",
|
|
3
|
+
Classic200S = "Classic200S",
|
|
4
|
+
Dual200S = "Dual200S",
|
|
5
|
+
Dual200S_EU = "LUH-D301S-WEU",
|
|
6
|
+
Dual200S_UK = "LUH-D301S-WUK",
|
|
7
|
+
LV600S = "LUH-A602S-WUS"
|
|
5
8
|
}
|
|
6
9
|
export interface DeviceType {
|
|
7
10
|
isValid: (input: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceTypes.d.ts","sourceRoot":"","sources":["../../src/api/deviceTypes.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"deviceTypes.d.ts","sourceRoot":"","sources":["../../src/api/deviceTypes.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,WAAW,kBAAkB;IAC7B,WAAW,kBAAkB;IAC7B,MAAM,kBAAkB;CAC3B;AAED,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,WAAW,EAAE,UAAU,EAwC5B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/dist/api/deviceTypes.js
CHANGED
|
@@ -3,33 +3,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DeviceName = void 0;
|
|
4
4
|
var DeviceName;
|
|
5
5
|
(function (DeviceName) {
|
|
6
|
-
DeviceName["Classic300S"] = "
|
|
7
|
-
DeviceName["Classic200S"] = "
|
|
8
|
-
DeviceName["Dual200S"] = "
|
|
6
|
+
DeviceName["Classic300S"] = "Classic300S";
|
|
7
|
+
DeviceName["Classic200S"] = "Classic200S";
|
|
8
|
+
DeviceName["Dual200S"] = "Dual200S";
|
|
9
|
+
DeviceName["Dual200S_EU"] = "LUH-D301S-WEU";
|
|
10
|
+
DeviceName["Dual200S_UK"] = "LUH-D301S-WUK";
|
|
11
|
+
DeviceName["LV600S"] = "LUH-A602S-WUS";
|
|
9
12
|
})(DeviceName = exports.DeviceName || (exports.DeviceName = {}));
|
|
10
|
-
function sanitizeString(input) {
|
|
11
|
-
// Lowercase the input and remove all whitespace
|
|
12
|
-
return input.toLowerCase().replace(/\s+/g, '');
|
|
13
|
-
}
|
|
14
13
|
const deviceTypes = [
|
|
15
14
|
{
|
|
16
|
-
isValid: (input) =>
|
|
15
|
+
isValid: (input) => input.includes(DeviceName.Classic300S),
|
|
17
16
|
hasAutoMode: true,
|
|
18
17
|
mistMinLevel: 1,
|
|
19
18
|
mistLevels: 9
|
|
20
19
|
},
|
|
21
20
|
{
|
|
22
|
-
isValid: (input) =>
|
|
21
|
+
isValid: (input) => input.includes(DeviceName.Classic200S),
|
|
23
22
|
hasAutoMode: true,
|
|
24
23
|
mistMinLevel: 1,
|
|
25
24
|
mistLevels: 9
|
|
26
25
|
},
|
|
27
26
|
{
|
|
28
|
-
isValid: (input) =>
|
|
27
|
+
isValid: (input) => input.includes(DeviceName.Dual200S),
|
|
29
28
|
hasAutoMode: true,
|
|
30
29
|
mistMinLevel: 1,
|
|
31
30
|
mistLevels: 2
|
|
32
31
|
},
|
|
32
|
+
{
|
|
33
|
+
isValid: (input) => input.includes(DeviceName.Dual200S_EU),
|
|
34
|
+
hasAutoMode: true,
|
|
35
|
+
mistMinLevel: 1,
|
|
36
|
+
mistLevels: 2
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
isValid: (input) => input.includes(DeviceName.Dual200S_UK),
|
|
40
|
+
hasAutoMode: true,
|
|
41
|
+
mistMinLevel: 1,
|
|
42
|
+
mistLevels: 2
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
isValid: (input) => input.includes(DeviceName.LV600S),
|
|
46
|
+
hasAutoMode: true,
|
|
47
|
+
mistMinLevel: 1,
|
|
48
|
+
mistLevels: 9
|
|
49
|
+
},
|
|
33
50
|
];
|
|
34
51
|
exports.default = deviceTypes;
|
|
35
52
|
//# sourceMappingURL=deviceTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceTypes.js","sourceRoot":"","sources":["../../src/api/deviceTypes.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"deviceTypes.js","sourceRoot":"","sources":["../../src/api/deviceTypes.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IAClB,yCAA2B,CAAA;IAC3B,yCAA2B,CAAA;IAC3B,mCAAqB,CAAA;IACrB,2CAA6B,CAAA;IAC7B,2CAA6B,CAAA;IAC7B,sCAAwB,CAAA;AAC5B,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB;AASD,MAAM,WAAW,GAAiB;IAC9B;QACI,OAAO,EAAE,CAAC,KAAa,EAAE,EAAE,CACvB,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;QAC1C,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,CAAC;KAChB;IACD;QACI,OAAO,EAAE,CAAC,KAAa,EAAE,EAAE,CACvB,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;QAC1C,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,CAAC;QACf,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