node-switchbot 1.3.0 → 1.4.2-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 +41 -23
- package/LICENSE +1 -1
- package/README.md +322 -258
- package/lib/parameter-checker.js +271 -213
- package/lib/switchbot-advertising.js +305 -171
- package/lib/switchbot-device-wocolorbulb.js +81 -0
- package/lib/switchbot-device-wocontact.js +4 -7
- package/lib/switchbot-device-wocurtain.js +106 -91
- package/lib/switchbot-device-wohand.js +69 -65
- package/lib/switchbot-device-wohumi.js +69 -65
- package/lib/switchbot-device-woplugmini.js +81 -0
- package/lib/switchbot-device-wopresence.js +4 -7
- package/lib/switchbot-device-wosensorth.js +4 -7
- package/lib/switchbot-device.js +188 -149
- package/lib/switchbot.js +271 -233
- package/package.json +40 -40
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
|
|
4
4
|
|
|
5
|
-
## [Version 1.
|
|
5
|
+
## [Version 1.4.1](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.4.1) (2022-08-27)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## What's Changed
|
|
8
|
+
|
|
9
|
+
- Fix Plug Mini (US) implimentation
|
|
10
|
+
- Housekeeping and update dependencies
|
|
11
|
+
|
|
12
|
+
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.0...v1.4.1
|
|
13
|
+
|
|
14
|
+
## [Version 1.4.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.4.0) (2022-08-19)
|
|
15
|
+
|
|
16
|
+
## What's Changed
|
|
17
|
+
|
|
18
|
+
- Added support for Plug Mini (j) & (g)
|
|
19
|
+
- Housekeeping and update dependencies
|
|
20
|
+
|
|
21
|
+
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.3.0...v1.4.0
|
|
22
|
+
|
|
23
|
+
## [Version 1.3.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.3.0) (2022-06-25)
|
|
24
|
+
|
|
25
|
+
## What's Changed
|
|
8
26
|
|
|
9
27
|
- Added more Device Types, not all supported though.
|
|
10
28
|
- Housekeeping and update dependencies
|
|
@@ -13,7 +31,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
13
31
|
|
|
14
32
|
## [Version 1.2.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.2.0) (2022-03-04)
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
## What's Changed
|
|
17
35
|
|
|
18
36
|
- Added support for SwitchBot "Contact" and "Motion"
|
|
19
37
|
- Fix for Curtains on Firmware v3.3 and above
|
|
@@ -23,7 +41,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
23
41
|
|
|
24
42
|
## [Version 1.1.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.1.2) (2021-11-13)
|
|
25
43
|
|
|
26
|
-
|
|
44
|
+
## What's Changed
|
|
27
45
|
|
|
28
46
|
- Housekeeping and update dependencies
|
|
29
47
|
|
|
@@ -31,7 +49,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
31
49
|
|
|
32
50
|
## [Version 1.1.1](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.1.1) (2021-11-02)
|
|
33
51
|
|
|
34
|
-
|
|
52
|
+
## What's Changed
|
|
35
53
|
|
|
36
54
|
- Change back from @node/noble to @abandonware/noble
|
|
37
55
|
|
|
@@ -39,7 +57,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
39
57
|
|
|
40
58
|
## [Version 1.1.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.1.0) (2021-10-26)
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
## What's Changed
|
|
43
61
|
|
|
44
62
|
- Add Contact/Motion Sensor advertisement
|
|
45
63
|
- Add Humidifier advertisement
|
|
@@ -49,7 +67,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
49
67
|
|
|
50
68
|
## [Version 1.0.8](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.8) (2021-09-30)
|
|
51
69
|
|
|
52
|
-
|
|
70
|
+
## What's Changed
|
|
53
71
|
|
|
54
72
|
- fix extra trace of old noble from @abandonware/noble
|
|
55
73
|
|
|
@@ -57,7 +75,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
57
75
|
|
|
58
76
|
## [Version 1.0.7](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.7) (2021-09-24)
|
|
59
77
|
|
|
60
|
-
|
|
78
|
+
## What's Changed
|
|
61
79
|
|
|
62
80
|
- Change from @abandonware/noble to @homebridge/noble
|
|
63
81
|
|
|
@@ -65,7 +83,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
65
83
|
|
|
66
84
|
## [Version 1.0.6](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.6) (2021-08-29)
|
|
67
85
|
|
|
68
|
-
|
|
86
|
+
## What's Changed
|
|
69
87
|
|
|
70
88
|
- Fixes FATAL ERROR: ad_id is not defined
|
|
71
89
|
|
|
@@ -73,7 +91,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
73
91
|
|
|
74
92
|
## [Version 1.0.5](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.5) (2021-08-04)
|
|
75
93
|
|
|
76
|
-
|
|
94
|
+
## What's Changed
|
|
77
95
|
|
|
78
96
|
- Adding code for Contact and Motion Sensors
|
|
79
97
|
- Not Ready to be used yet though
|
|
@@ -82,7 +100,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
82
100
|
|
|
83
101
|
## [Version 1.0.4](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.4) (2021-08-03)
|
|
84
102
|
|
|
85
|
-
|
|
103
|
+
## What's Changed
|
|
86
104
|
|
|
87
105
|
- Support for the discover method with id on macOS
|
|
88
106
|
|
|
@@ -90,7 +108,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
90
108
|
|
|
91
109
|
## [Version 1.0.3](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.3) (2021-07-30)
|
|
92
110
|
|
|
93
|
-
|
|
111
|
+
## What's Changed
|
|
94
112
|
|
|
95
113
|
- Fixed misspelling.
|
|
96
114
|
|
|
@@ -98,7 +116,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
98
116
|
|
|
99
117
|
## [Version 1.0.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.2) (2021-07-29)
|
|
100
118
|
|
|
101
|
-
|
|
119
|
+
## What's Changed
|
|
102
120
|
|
|
103
121
|
- Housekeeping and update dependencies
|
|
104
122
|
|
|
@@ -106,7 +124,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
106
124
|
|
|
107
125
|
## [Version 1.0.1](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.1) (2021-07-29)
|
|
108
126
|
|
|
109
|
-
|
|
127
|
+
## What's Changed
|
|
110
128
|
|
|
111
129
|
- Fixed issue where after switching Bluetooth off and on, would not work properly.
|
|
112
130
|
|
|
@@ -114,15 +132,15 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
114
132
|
|
|
115
133
|
## [Version 1.0.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.0.0) (2021-01-21)
|
|
116
134
|
|
|
117
|
-
|
|
135
|
+
## What's Changed
|
|
118
136
|
|
|
119
|
-
-
|
|
137
|
+
- - fix "No device was found" in MacOS
|
|
120
138
|
|
|
121
139
|
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.2.0...v1.0.0
|
|
122
140
|
|
|
123
141
|
## [Version 0.2.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.2.0) (2020-11-05)
|
|
124
142
|
|
|
125
|
-
|
|
143
|
+
## What's Changed
|
|
126
144
|
|
|
127
145
|
- Modify Curtain's action command to support group and running mode. (Thanks to [@SwitchBot-Wonderlabs](https://github.com/OpenWonderLabs/node-switchbot/pull/7/))
|
|
128
146
|
|
|
@@ -130,7 +148,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
130
148
|
|
|
131
149
|
## [Version 0.1.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.1.0) (2020-10-28)
|
|
132
150
|
|
|
133
|
-
|
|
151
|
+
## What's Changed
|
|
134
152
|
|
|
135
153
|
- Added support for SwitchBot Curtain. (Thanks to [@SwitchBot-Wonderlabs](https://github.com/OpenWonderLabs/node-switchbot/pull/6/))
|
|
136
154
|
- Added support for running on the Raspberry Pi Zero W. (Thanks to [@zizi4n5](https://github.com/OpenWonderLabs/node-switchbot/pull/5))
|
|
@@ -139,7 +157,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
139
157
|
|
|
140
158
|
## [Version 0.0.5](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.5) (2020-02-19)
|
|
141
159
|
|
|
142
|
-
|
|
160
|
+
## What's Changed
|
|
143
161
|
|
|
144
162
|
- Improved the stability of discovering the BLE characteristics. (Thanks to [@dnicolson](https://github.com/OpenWonderLabs/node-switchbot/issues/3))
|
|
145
163
|
|
|
@@ -147,7 +165,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
147
165
|
|
|
148
166
|
## [Version 0.0.4](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.4) (2020-02-11)
|
|
149
167
|
|
|
150
|
-
|
|
168
|
+
## What's Changed
|
|
151
169
|
|
|
152
170
|
- Fixed the bug that temperature value lower than 0 degC could not be handled. (Thanks to [@musimasami](https://github.com/OpenWonderLabs/node-switchbot/issues/2))
|
|
153
171
|
|
|
@@ -155,7 +173,7 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
155
173
|
|
|
156
174
|
## [Version 0.0.3](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.3) (2020-02-10)
|
|
157
175
|
|
|
158
|
-
|
|
176
|
+
## What's Changed
|
|
159
177
|
|
|
160
178
|
- Now the characteristic UUID `0x2a00` (Device Name) is not mandatory. Some models of Bot don't seem to support the characteristic. (Thanks to [@dnicolson](https://github.com/OpenWonderLabs/node-switchbot/issues/1))
|
|
161
179
|
- Fixed the bug that the `turnOn()` method returns an error if the "Press mode" is selected on the Bot.
|
|
@@ -164,6 +182,6 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
164
182
|
|
|
165
183
|
## [Version 0.0.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.2) (2019-11-20)
|
|
166
184
|
|
|
167
|
-
|
|
185
|
+
## What's Changed
|
|
168
186
|
|
|
169
|
-
- First public release
|
|
187
|
+
- First public release
|
package/LICENSE
CHANGED
|
@@ -11,4 +11,4 @@ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
11
11
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|