Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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

## [Version 1.7.3](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.7.3) (2023-01-05)

## What's Changed

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

**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.2...v1.7.3

## [Version 1.7.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.7.2) (2022-12-26)

## What's Changed
Expand Down
3 changes: 3 additions & 0 deletions lib/switchbot-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ class SwitchbotDevice {

this._connect()
.then(() => {
if (!this._chars) {
return reject("No characteristics available.");
}
return this._write(this._chars.write, req_buf);
})
.then(() => {
Expand Down
4 changes: 3 additions & 1 deletion lib/switchbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ class Switchbot {
for (let addr in peripherals) {
device_list.push(peripherals[addr]);
}
resolve(device_list);
if (device_list.length) {
resolve(device_list);
}
};

// Set a handler for the 'discover' event
Expand Down
90 changes: 48 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-switchbot",
"version": "1.7.2",
"version": "1.7.3",
"description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
"main": "./lib/switchbot.js",
"files": [
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"readmeFilename": "README.md",
"dependencies": {
"@abandonware/noble": "1.9.2-15"
"@abandonware/noble": "^1.9.2-19"
},
"devDependencies": {
"npm-check-updates": "^16.6.2"
Expand Down