Skip to content

Commit 678103e

Browse files
v2.0.2 (#223)
## [2.0.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v2.0.2) (2024-02-09) ### What's Changed - Fix various 2.0.0 issues [#224](#224), Thanks [@dnicolson](https://github.com/dnicolson) - Code Cleanup [#225](#225) [#226](#226), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: v2.0.1...v2.0.2
1 parent 3877620 commit 678103e

19 files changed

+707
-670
lines changed

CHANGELOG.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22

33
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
44

5+
## [2.0.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v2.0.2) (2024-02-09)
6+
7+
### What's Changed
8+
- Fix various 2.0.0 issues [#224](https://github.com/OpenWonderLabs/node-switchbot/pull/224), Thanks [@dnicolson](https://github.com/dnicolson)
9+
- Code Cleanup [#225](https://github.com/OpenWonderLabs/node-switchbot/pull/225) [#226](https://github.com/OpenWonderLabs/node-switchbot/pull/226), Thanks [@dnicolson](https://github.com/dnicolson)
10+
- Housekeeping and update dependencies
11+
12+
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.1...v2.0.2
13+
514
## [2.0.1](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v2.0.1) (2024-02-06)
615

716
### What's Changed
8-
- Fix async constructor, Thanks [@dnicolson](https://github.com/dnicolson) [#229](https://github.com/OpenWonderLabs/node-switchbot/pull/220)
17+
- Fix async constructor [#220](https://github.com/OpenWonderLabs/node-switchbot/pull/220), Thanks [@dnicolson](https://github.com/dnicolson)
918
- Housekeeping and update dependencies
1019

1120
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.0...v2.0.1
@@ -14,17 +23,17 @@ All notable changes to this project will be documented in this file. This projec
1423

1524
### What's Changed
1625
- Rewrite into Typescript and Convert CommonJS to ES Module
17-
- Fix Linting, Thanks [@dnicolson](https://github.com/dnicolson) [#216](https://github.com/OpenWonderLabs/node-switchbot/pull/216)
18-
- Code Cleaup, Thanks [@dnicolson](https://github.com/dnicolson) [#217](https://github.com/OpenWonderLabs/node-switchbot/pull/217)
26+
- Fix Linting [#216](https://github.com/OpenWonderLabs/node-switchbot/pull/216), Thanks [@dnicolson](https://github.com/dnicolson)
27+
- Code Cleaup [#217](https://github.com/OpenWonderLabs/node-switchbot/pull/217), Thanks [@dnicolson](https://github.com/dnicolson)
1928
- Housekeeping and update dependencies
2029

2130
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.10.0...v2.0.0
2231

2332
## [1.10.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.10.0) (2024-01-05)
2433

2534
### What's Changed
26-
- Fix reversed bot state reporting, Thanks [@grelca](https://github.com/grelca) [#207](https://github.com/OpenWonderLabs/node-switchbot/pull/207)
27-
- Add support for Curtain 3, Thanks [@tsia](https://github.com/tsia) [#209](https://github.com/OpenWonderLabs/node-switchbot/pull/209)
35+
- Fix reversed bot state reporting [#207](https://github.com/OpenWonderLabs/node-switchbot/pull/207), Thanks [@grelca](https://github.com/grelca)
36+
- Add support for Curtain 3 [#209](https://github.com/OpenWonderLabs/node-switchbot/pull/209), Thanks [@tsia](https://github.com/tsia)
2837
- Housekeeping and update dependencies
2938

3039
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.1...v1.10.0
@@ -39,28 +48,28 @@ All notable changes to this project will be documented in this file. This projec
3948
## [1.9.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.9.0) (2023-09-16)
4049

4150
### What's Changed
42-
- Add support for the Indoor/Outdoor Thermo-Hygrometer (WoIOSensorTH), Thanks [@moritzmhmk](https://github.com/moritzmhmk) [#200](https://github.com/OpenWonderLabs/node-switchbot/pull/200)
43-
- Handle noble not being "poweredOn" on init, Thanks [@moritzmhmk](https://github.com/moritzmhmk) [#199](https://github.com/OpenWonderLabs/node-switchbot/pull/199)
51+
- Add support for the Indoor/Outdoor Thermo-Hygrometer (WoIOSensorTH) [#200](https://github.com/OpenWonderLabs/node-switchbot/pull/200), Thanks [@moritzmhmk](https://github.com/moritzmhmk)
52+
- Handle noble not being "poweredOn" on init [#199](https://github.com/OpenWonderLabs/node-switchbot/pull/199), Thanks [@moritzmhmk](https://github.com/moritzmhmk)
4453
- Housekeeping and update dependencies
4554

4655
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.2...v1.9.0
4756

4857
## [1.8.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.8.2) (2023-07-25)
4958

5059
### What's Changed
51-
- Added Lint Script, Thanks [@dnicolson](https://github.com/dnicolson) [#195](https://github.com/OpenWonderLabs/node-switchbot/pull/195)
52-
- Fixed a Linting Issues, Thanks [@dnicolson](https://github.com/dnicolson) [#196](https://github.com/OpenWonderLabs/node-switchbot/pull/196)
53-
- Fixed 'TypeError: Assignment to constant variable', Thanks [@banboobee](https://github.com/banboobee) [#194](https://github.com/OpenWonderLabs/node-switchbot/pull/194)
54-
- Fix issue of re-assigning to constant for Temperature, Thanks [@gravity-addiction](https://github.com/gravity-addiction) [#191](https://github.com/OpenWonderLabs/node-switchbot/pull/191)
60+
- Added Lint Script [#195](https://github.com/OpenWonderLabs/node-switchbot/pull/195), Thanks [@dnicolson](https://github.com/dnicolson)
61+
- Fixed a Linting Issues [#196](https://github.com/OpenWonderLabs/node-switchbot/pull/196), Thanks [@dnicolson](https://github.com/dnicolson)
62+
- Fixed 'TypeError: Assignment to constant variable' [#194](https://github.com/OpenWonderLabs/node-switchbot/pull/194), Thanks [@banboobee](https://github.com/banboobee)
63+
- Fix issue of re-assigning to constant for Temperature [#191](https://github.com/OpenWonderLabs/node-switchbot/pull/191), Thanks [@gravity-addiction](https://github.com/gravity-addiction)
5564
- Housekeeping and update dependencies
5665

5766
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.1...v1.8.2
5867

5968
## [1.8.1](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.8.1) (2023-04-08)
6069

6170
### What's Changed
62-
- Use const keyword for immutable variables, Thanks [@dnicolson](https://github.com/dnicolson/). [#184](https://github.com/OpenWonderLabs/node-switchbot/pull/184)
63-
- Use Error object for promise rejection, Thanks [@dnicolson](https://github.com/dnicolson/). [#181](https://github.com/OpenWonderLabs/node-switchbot/pull/181)
71+
- Use const keyword for immutable variables [#184](https://github.com/OpenWonderLabs/node-switchbot/pull/184), Thanks [@dnicolson](https://github.com/dnicolson/)
72+
- Use Error object for promise rejection [#181](https://github.com/OpenWonderLabs/node-switchbot/pull/181), Thanks [@dnicolson](https://github.com/dnicolson/)
6473
- Housekeeping and update dependencies
6574

6675
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.0...v1.8.1
@@ -70,7 +79,7 @@ All notable changes to this project will be documented in this file. This projec
7079
### What's Changed
7180

7281
- Add Support for BlindTilt (Read Only)
73-
- Use Error object for promise rejection, Thanks [@dnicolson](https://github.com/dnicolson/). [#181](https://github.com/OpenWonderLabs/node-switchbot/pull/181)
82+
- Use Error object for promise rejection [#181](https://github.com/OpenWonderLabs/node-switchbot/pull/181), Thanks [@dnicolson](https://github.com/dnicolson/)
7483
- Housekeeping and update dependencies
7584

7685
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.3...v1.8.0
@@ -79,7 +88,7 @@ All notable changes to this project will be documented in this file. This projec
7988

8089
### What's Changed
8190

82-
- Improve error handling, Thanks [@dnicolson](https://github.com/dnicolson/). [#175](https://github.com/OpenWonderLabs/node-switchbot/pull/175)
91+
- Improve error handling [#175](https://github.com/OpenWonderLabs/node-switchbot/pull/175), Thanks [@dnicolson](https://github.com/dnicolson/)
8392
- Housekeeping and update dependencies
8493

8594
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.2...v1.7.3
@@ -275,40 +284,40 @@ All notable changes to this project will be documented in this file. This projec
275284

276285
### What's Changed
277286

278-
- Modify Curtain's action command to support group and running mode. (Thanks to [@SwitchBot-Wonderlabs](https://github.com/OpenWonderLabs/node-switchbot/pull/7/))
287+
- Modify Curtain's action command to support group and running mode [#7](https://github.com/OpenWonderLabs/node-switchbot/pull/7), Thanks [@SwitchBot-Wonderlabs](https://github.com/SwitchBot-Wonderlabs)
279288

280289
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.1.0...v0.2.0
281290

282291
## [0.1.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.1.0) (2020-10-28)
283292

284293
### What's Changed
285294

286-
- Added support for SwitchBot Curtain. (Thanks to [@SwitchBot-Wonderlabs](https://github.com/OpenWonderLabs/node-switchbot/pull/6/))
287-
- Added support for running on the Raspberry Pi Zero W. (Thanks to [@zizi4n5](https://github.com/OpenWonderLabs/node-switchbot/pull/5))
295+
- Added support for SwitchBot Curtain [#6](https://github.com/OpenWonderLabs/node-switchbot/pull/6), Thanks [@SwitchBot-Wonderlabs](https://github.com/SwitchBot-Wonderlabs)
296+
- Added support for running on the Raspberry Pi Zero W [#5](https://github.com/OpenWonderLabs/node-switchbot/pull/5), Thanks [@Szizi4n5](https://github.com/zizi4n5)
288297

289298
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.5...v0.1.0
290299

291300
## [0.0.5](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.5) (2020-02-19)
292301

293302
### What's Changed
294303

295-
- Improved the stability of discovering the BLE characteristics. (Thanks to [@dnicolson](https://github.com/OpenWonderLabs/node-switchbot/issues/3))
304+
- Improved the stability of discovering the BLE characteristics [#3](https://github.com/OpenWonderLabs/node-switchbot/pull/3), Thanks [@dnicolson](https://github.com/dnicolson)
296305

297306
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.4...v0.0.5
298307

299308
## [0.0.4](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.4) (2020-02-11)
300309

301310
### What's Changed
302311

303-
- 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))
312+
- Fixed the bug that temperature value lower than 0 degC could not be handled [#2](https://github.com/OpenWonderLabs/node-switchbot/pull/2), Thanks [@musimasami](https://github.com/musimasami)
304313

305314
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.3...v0.0.4
306315

307316
## [0.0.3](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.3) (2020-02-10)
308317

309318
### What's Changed
310319

311-
- 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))
320+
- Now the characteristic UUID `0x2a00` (Device Name) is not mandatory. Some models of Bot don't seem to support the characteristic [#3](https://github.com/OpenWonderLabs/node-switchbot/pull/1), Thanks [@dnicolson](https://github.com/dnicolson)
312321
- Fixed the bug that the `turnOn()` method returns an error if the "Press mode" is selected on the Bot.
313322

314323
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.2...v0.0.3

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Monitoring the advertising packets, you can find your devices and know the lates
111111
```Typescript
112112
// Load the node-switchbot and get a `Switchbot` constructor object
113113
import { SwitchBot } from 'node-switchbot';
114-
// Create an `Switchbot` object
114+
// Create a `Switchbot` object
115115
const switchbot = new SwitchBot();
116116

117117
(async () => {
@@ -138,7 +138,7 @@ The [`startScan()`](#startscan-method) and [`wait()`](#Switchbot-wait-method) me
138138
```Typescript
139139
// Load the node-switchbot and get a `Switchbot` constructor object
140140
const Switchbot = require("node-switchbot");
141-
// Create an `Switchbot` object
141+
// Create a `Switchbot` object
142142
const switchbot = new Switchbot();
143143

144144
// Start to monitor advertisement packets
@@ -214,7 +214,7 @@ This sample discovers a Bot (WoHand), then put the Bot's arm down, finally put i
214214
```Typescript
215215
// Load the node-switchbot and get a `Switchbot` constructor object
216216
import { SwitchBot } from 'node-switchbot';
217-
// Create an `Switchbot` object
217+
// Create a `Switchbot` object
218218
const switchbot = new SwitchBot();
219219

220220
(async () => {
@@ -249,7 +249,7 @@ In order to use the node-switchbot, you have to load the node-switchbot module a
249249
import { SwitchBot } from 'node-switchbot';
250250
```
251251

252-
You can get an `SwitchBot` constructor from the code above. Then you have to create an `SwitchBot` object from the `SwitchBot` constructor as follows:
252+
You can get an `SwitchBot` constructor from the code above. Then you have to create a `SwitchBot` object from the `SwitchBot` constructor as follows:
253253

254254
```typescript
255255
const switchbot = new SwitchBot();
@@ -303,9 +303,8 @@ If you want a quick response, you can set the `quick` property to `true`.
303303

304304
```Typescript
305305
switchbot.discover({
306-
duration: 5000,
307-
quick: true
308-
});
306+
duration: 5000,
307+
quick: true
309308
}).then((device_list) => {
310309
// Do something...
311310
}).catch((error) => {
@@ -749,7 +748,7 @@ Actually, the `WoCurtain` is an object inherited from the [`SwitchbotDevice`](#S
749748

750749
### `open()` method
751750

752-
The `open()` method sends a open command to the Curtain. This method returns a `Promise` object. Nothing will be passed to the `resove()`.
751+
The `open()` method sends an open command to the Curtain. This method returns a `Promise` object. Nothing will be passed to the `resove()`.
753752

754753
If no connection is established with the device, this method automatically establishes a connection with the device, then finally closes the connection. You don't have to call the [`connect()`](#SwitchbotDevice-connect-method) method in advance.
755754

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-switchbot",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
55
"homepage": "https://github.com/OpenWonderLabs/node-switchbot",
66
"author": "OpenWonderLabs (https://github.com/OpenWonderLabs)",
@@ -42,7 +42,7 @@
4242
"@abandonware/bluetooth-hci-socket": "^0.5.3-10"
4343
},
4444
"devDependencies": {
45-
"@types/node": "^20.11.16",
45+
"@types/node": "^20.11.17",
4646
"@typescript-eslint/eslint-plugin": "^6.21.0",
4747
"@typescript-eslint/parser": "^6.21.0",
4848
"eslint": "^8.56.0",

0 commit comments

Comments
 (0)