UNPKG

node-switchbot

Version:

The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE) with automatic OpenAPI fallback.

882 lines (528 loc) 40.5 kB
# Changelog All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/) ## [4.0.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.8...v4.0.1) (2026-04-15) ## [3.6.8](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.7...v3.6.8) (2026-03-05) ## [3.6.7](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.6...v3.6.7) (2026-03-05) ## [3.6.6](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.5...v3.6.6) (2026-02-25) ### Bug Fixes * sync package-lock.json with @stoprocent/noble@^2.3.14 ([#324](https://github.com/OpenWonderLabs/node-switchbot/issues/324)) ([0670987](https://github.com/OpenWonderLabs/node-switchbot/commit/06709876ab1bb4adc244507863f1b25b786b87f2)) ### Features * Add Plug Mini (EU) support ([#325](https://github.com/OpenWonderLabs/node-switchbot/issues/325)) ([1eb8d2e](https://github.com/OpenWonderLabs/node-switchbot/commit/1eb8d2e572e211482105c2563a736bdfabeb50be)) ## [3.6.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.4...v3.6.5) (2026-02-19) ## [3.6.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.3...v3.6.4) (2026-02-18) ## [3.6.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.5.1...v3.6.3) (2026-02-05) ## [3.5.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.5.0...v3.5.1) (2025-07-25) # [3.5.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.9...v3.5.0) (2025-03-05) ## [3.4.9](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.8...v3.4.9) (2025-01-24) ## [3.4.8](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.7...v3.4.8) (2025-01-24) ## [3.4.7](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.6...v3.4.7) (2025-01-24) ## [3.4.6](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.5...v3.4.6) (2025-01-24) ## [3.4.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.4...v3.4.5) (2025-01-24) ## [3.4.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.3...v3.4.4) (2025-01-24) ## [3.4.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.2...v3.4.3) (2024-12-22) ## [3.4.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.1...v3.4.2) (2024-12-22) ## [3.4.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.0...v3.4.1) (2024-11-28) # [3.4.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.3.0...v3.4.0) (2024-11-18) # [3.3.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.2.1...v3.3.0) (2024-11-02) ## [3.2.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.2.0...v3.2.1) (2024-10-22) # [3.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.1.1...v3.2.0) (2024-10-22) ## [3.1.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.1.0...v3.1.1) (2024-10-12) # [3.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.0.1...v3.1.0) (2024-10-12) ## [3.0.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.0.0...v3.0.1) (2024-10-05) # [3.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.3.0...v3.0.0) (2024-10-05) # [2.3.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.2.0...v2.3.0) (2024-07-21) # [2.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.1.1...v2.2.0) (2024-06-26) ## [2.1.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.1.0...v2.1.1) (2024-05-26) # [2.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.3...v2.1.0) (2024-05-14) ## [2.0.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.2...v2.0.3) (2024-02-12) ## [2.0.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.0...v2.0.2) (2024-02-10) # [2.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.1...v2.0.0) (2024-02-05) ## [1.9.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.0...v1.9.1) (2023-11-21) # [1.9.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.2...v1.9.0) (2023-09-16) ## [1.8.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.1...v1.8.2) (2023-07-26) ## [1.8.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.0...v1.8.1) (2023-04-08) # [1.8.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.3...v1.8.0) (2023-01-29) ## [1.7.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.2...v1.7.3) (2023-01-05) ## [1.7.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.1...v1.7.2) (2022-12-26) ## [1.7.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.0...v1.7.1) (2022-12-20) # [1.7.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.6.1...v1.7.0) (2022-12-08) ## [1.6.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.6.0...v1.6.1) (2022-10-19) # [1.6.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.5.0...v1.6.0) (2022-10-18) # [1.5.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.1...v1.5.0) (2022-10-07) ## [1.4.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.0...v1.4.1) (2022-08-27) # [1.4.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.3.0...v1.4.0) (2022-08-20) # [1.3.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.2.0...v1.3.0) (2022-06-25) # [1.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.2...v1.2.0) (2022-03-04) ## [1.1.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.1...v1.1.2) (2021-11-13) ## [1.1.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.0...v1.1.1) (2021-11-02) # [1.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.8...v1.1.0) (2021-10-27) ## [1.0.8](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.7...v1.0.8) (2021-09-30) ## [1.0.7](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.6...v1.0.7) (2021-09-25) ## [1.0.6](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.5...v1.0.6) (2021-08-29) ## [1.0.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.4...v1.0.5) (2021-08-04) ## [1.0.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.3...v1.0.4) (2021-08-04) ## [1.0.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.2...v1.0.3) (2021-07-30) ## [1.0.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.1...v1.0.2) (2021-07-29) ## [1.0.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.0...v1.0.1) (2021-07-29) # [1.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.2.0...v1.0.0) (2021-01-21) # [0.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.1.0...v0.2.0) (2020-11-05) # [0.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.5...v0.1.0) (2020-10-28) ### Bug Fixes * typo ([338044f](https://github.com/OpenWonderLabs/node-switchbot/commit/338044f3469788f76c189ba75be80518b1765107)) ### Features * Added support for running on the Raspberry Pi Zero W. ([017b244](https://github.com/OpenWonderLabs/node-switchbot/commit/017b244cfba178827b4a2504853cc013b7a6bc70)) ## [0.0.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.4...v0.0.5) (2020-02-18) ## [0.0.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.3...v0.0.4) (2020-02-10) ## [0.0.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.2...v0.0.3) (2020-02-10) ## [0.0.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.1...v0.0.2) (2019-11-20) ## 0.0.1 (2019-11-20) ## [4.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.8...v4.0.0) (2026-04-10) ### ⚠ BREAKING CHANGES * Complete rewrite with unified hybrid BLE/API architecture * No backward compatibility with v3.x - migration required * Single `SwitchBot` class replaces `SwitchBotBLE` and `SwitchBotOpenAPI` * Device access via `switchbot.devices` manager pattern * Full TypeScript rewrite with comprehensive type definitions ### Features * **Hybrid Architecture**: Unified BLE-first approach with automatic OpenAPI fallback * **Automatic Discovery**: Combined BLE + OpenAPI device discovery in single call * **Smart Fallback**: Commands automatically retry via API when BLE fails * **Device Manager**: Centralized device management with `get()`, `list()`, and `clear()` methods * **Expanded Device Coverage**: Added support and parsing updates across newly modeled devices and accessories in the v4 architecture. * **macOS BLE Support**: Enabled BLE functionality on macOS in addition to Linux * Platform detection now includes macOS (`darwin`) using `@stoprocent/noble` * BLE now works on Linux and macOS systems * Windows remains unsupported for BLE operations * **Bot Password Protection**: Added BLE password support for Bot (`WoHand`) devices * Password encryption using CRC32 checksums * Password validation for 4 alphanumeric characters, case-sensitive * Methods: `setPassword()`, `clearPassword()`, `hasPassword()` * Automatic encrypted command execution when password is set * Example: `examples/bot-password.js` * Based on [homebridge-switchbot PR #1337](https://github.com/OpenWonderLabs/homebridge-switchbot/pull/1337) * **Advanced Resilience Features**: Enterprise-grade reliability enhancements * Retry logic with exponential backoff and jitter * Circuit breaker pattern to prevent cascading failures * Connection intelligence tracking per-device success and failure rates * Custom fallback handler system for logging, metrics, and alerting * Intelligent connection selection based on historical performance * **Event-Driven**: EventEmitter-based architecture for discovery and command events * **TypeScript Native**: Written in TypeScript with full type safety and exports * **Custom Errors**: Specific error classes for better error handling * **BLE-Only Mode**: Works without OpenAPI credentials on Linux/macOS systems * **API-Only Mode**: Works without BLE on Windows systems * **Exports and API Surface Updates**: Updated `src/index.ts` exports for final v4 public API packaging. * **Comprehensive Examples**: Updated and aligned example files for v4 usage patterns. ### Technical Improvements * Complete ES2022 module implementation * Improved error handling with custom error classes * Better connection management and timeout handling * Enhanced logging with configurable log levels * Hardened dependency graph with security overrides for vulnerable transitive packages * Full JSDoc documentation coverage * Comprehensive TypeScript type definitions for all devices * Reworked test suite structure and coverage for APIs, devices, and utilities * Auto-formatting and linting with @antfu/eslint-config ### Documentation * Updated README with v4 quick start and migration guide * 6 usage examples in `examples/` directory * Migration guide from v3.x to v4.0.0 * Added password protection section to [BLE.md](BLE.md) * Updated [README.md](README.md) with password examples * Created comprehensive password protection example * Updated examples index with `bot-password.js` * Updated platform support documentation to reflect macOS BLE support * Updated Linux-only references to Linux/macOS where applicable * Added comprehensive prerequisites guidance for BLE setup on macOS and Linux * macOS: Xcode and Bluetooth permissions requirements * Linux: system packages, non-root setup, and Raspberry Pi notes * Based on [@stoprocent/noble prerequisites](https://github.com/stoprocent/noble?tab=readme-ov-file#prerequisites) * Full API documentation via TypeDoc ### Tests * Added 14 comprehensive password protection tests * Validation for CRC32 encryption, command building, and response parsing * Extended fallback and retry behavior coverage across BLE/API paths * 58 test files and 243 passing tests at release validation **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.8...v4.0.0 ## [3.6.8](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.7...v3.6.8) (2026-03-05) ### Changes * Fix BLE parsing and device registration flow for `WoAirPurifier` and `WoAirPurifierTable`. * Improve service data fallback handling and mode mapping for Air Purifier family devices. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.7...v3.6.8 ## [3.6.7](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.6...v3.6.7) (2026-03-05) ### Changes * Fix `WoPlugMiniUS` `TypeError` in device handling and command flow. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.6...v3.6.7 ## [3.6.6](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.5...v3.6.6) (2026-02-25) ### Bug Fixes * sync package-lock.json with @stoprocent/noble@^2.3.14 ([#324](https://github.com/OpenWonderLabs/node-switchbot/issues/324)) ([0670987](https://github.com/OpenWonderLabs/node-switchbot/commit/06709876ab1bb4adc244507863f1b25b786b87f2)) ### Features * Add Plug Mini (EU) support ([#325](https://github.com/OpenWonderLabs/node-switchbot/issues/325)) ([1eb8d2e](https://github.com/OpenWonderLabs/node-switchbot/commit/1eb8d2e572e211482105c2563a736bdfabeb50be)) **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.5...v3.6.6 ## [3.6.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.4...v3.6.5) (2026-02-19) ### Changes * Bump `@stoprocent/noble` to `2.3.14` for BLE stability and compatibility updates. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.4...v3.6.5 ## [3.6.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.3...v3.6.4) (2026-02-18) ### Changes * Fix BLE parsing for Air Purifier PM2.5 service data. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.3...v3.6.4 ## [3.6.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.2...v3.6.3) (2026-02-05) ### Changes * Add Lock Ultra device support. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.2...v3.6.3 ## [3.6.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.1...v3.6.2) (2025-12-18) ## What's Changed - small little presence sensor changes **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.1...v3.6.2 ## [3.6.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.0...v3.6.1) (2025-12-16) ## What's Changed * update presence sensor docs by @Donavan Becker in https://github.com/OpenWonderLabs/node-switchbot/commit/db4d02c * Add support for presence sensor by @Donavan Becker in https://github.com/OpenWonderLabs/node-switchbot/commit/d2eafba * v3.6.0 by @Donavan Becker in https://github.com/OpenWonderLabs/node-switchbot/pull/298 **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.6.0...v3.6.1 ## [3.6.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.5.1...v3.6.0) (2025-08-27) ### What's Changed - Housekeeping and update dependencies - **BREAKING**: Fixed compatibility with `@stoprocent/noble` v2.3.4 and `@stoprocent/bluetooth-hci-socket` v2.2.3 - **Enhancement**: Added comprehensive input validation utilities (`ValidationUtils` class) - **Enhancement**: Improved error handling with more descriptive error messages - **Enhancement**: Added command constants to replace magic numbers for better maintainability - **Enhancement**: Enhanced type safety with proper TypeScript assertions - **Enhancement**: Improved buffer validation with configurable minimum length - **Enhancement**: Better resource cleanup in error scenarios with try-catch-finally blocks - **Enhancement**: Removed deprecated parameter checker in favor of modern validation - **Fix**: Updated `noble._state` to `noble.state` for compatibility with newer noble versions - **Fix**: Enhanced NobleTypes interface to properly support newer noble version - **Code Quality**: Improved JSDoc documentation throughout device classes - **Code Quality**: Standardized validation across all device classes - **Docs**: Updated BLE.md and OpenAPI.md for new validation and error handling features - **Internal**: Refactored device instantiation logic for consistency - **Internal**: Improved test coverage for validation utilities and error scenarios - **Chore**: Synced package scripts and documentation with latest development workflow **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.5.1...v3.6.0 ## [3.5.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.5.0...v3.5.1) (2025-07-25) ### What's Changed - Support current Meter Pro CO2 with firmware 1.6 [#293](https://github.com/OpenWonderLabs/node-switchbot/pull/293), Thanks [@wweich](https://github.com/wweich) **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.5.0...v3.5.1 ## [3.5.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.0...v3.5.0) (2025-03-04) # *No New Releases During Lent* ### What's Changed - Fix the return value of SwitchBotOpenAPI.getDeviceStatus() method [#290](https://github.com/OpenWonderLabs/node-switchbot/pull/290), Thanks [@kemuridama](https://github.com/kemuridama) - Fix circular dependencies - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.0...v3.5.0 ## [3.4.9](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.8...v3.4.9) (2025-01-24) ### What's Changed - Add BLE comands for Relay Switch 1 && Relay Switch 1 PM, not yet functional - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.8...v3.4.9 ## [3.4.8](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.7...v3.4.8) (2025-01-24) ### What's Changed - Add exports for Relay Switch 1 && Relay Switch 1 PM - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.7...v3.4.8 ## [3.4.7](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.6...v3.4.7) (2025-01-24) ### What's Changed - Add Types for Relay Switch 1 && Relay Switch 1 PM - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.6...v3.4.7 ## [3.4.6](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.5...v3.4.6) (2025-01-24) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.5...v3.4.6 ## [3.4.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.4...v3.4.5) (2025-01-23) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.4...v3.4.5 ## [3.4.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.3...v3.4.4) (2025-01-23) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.3...v3.4.4 ## [3.4.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.2...v3.4.3) (2024-12-22) ### What's Changed - Fixed `getDeviceStatus` for `openAPI` - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.2...v3.4.3 ## [3.4.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.1...v3.4.2) (2024-12-21) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.1...v3.4.2 ## [3.4.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.0...v3.4.1) (2024-11-27) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.4.0...v3.4.1 ## [3.4.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.3.0...v3.4.0) (2024-11-18) ### What's Changed - Add RelaySwitch1PM and RealySwitch1PLus Devices - Handle no devices found [#272](https://github.com/OpenWonderLabs/node-switchbot/pull/272), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.3.0...v3.4.0 ## [3.3.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.2.1...v3.3.0) (2024-11-02) ### What's Changed - Add Water Leak Decector Support - Add initial support for the Keypad Touch - Fix timeout error handling [#268](https://github.com/OpenWonderLabs/node-switchbot/pull/268), Thanks [@dnicolson](https://github.com/dnicolson) - Fix characteristic notification [#267](https://github.com/OpenWonderLabs/node-switchbot/pull/267), Thanks [@dnicolson](https://github.com/dnicolson) - Change scanning log level [#266](https://github.com/OpenWonderLabs/node-switchbot/pull/266), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.2.1...v3.3.0 ## [3.2.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.2.0...v3.2.1) (2024-10-21) ### What's Changed - Add more Meter Pro types - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.2.0...v3.2.1 ## [3.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.1.1...v3.2.0) (2024-10-21) ### What's Changed - Add basic support for Meter Pro - Fix Noble import issue - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.1.1...v3.2.0 ## [3.1.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.1.0...v3.1.1) (2024-10-11) ### What's Changed - Fix `K10Pro` Type, `Property 'K10Pro' does not exist on type 'typeof SwitchBotModel'`. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.1.0...v3.1.1 ## [3.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.0.1...v3.1.0) (2024-10-11) ### What's Changed - Added support for emitting logs from this module from the `SwitchBotBLE` class. - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.0.1...v3.1.0 ## [3.0.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v3.0.0...v3.0.1) (2024-10-05) ### What's Changed - Hot Fix for `baseURL` which is used for sending `OpenAPI` commands - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v3.0.0...v3.0.1 ## [3.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.4.0...v3.0.0) (2024-10-05) ### What's Changed #### ⚠️ Breaking Changes - Have added OpenAPI Functionality into `node-switchbot`, so now it is able to handle both APIs with just one module. - There are now two different Classes `SwitchBotBLE` and `SwitchBotOpenAPI` that can be used interact with the two different APIs - `SwitchBotOpenApi` support emitting logs from this module. - You will need to update your current setup from`SwitchBot` to `SwitchBotBLE` to be able to interact with the BLE API - Updated the documents to explain both the `BLE` and the `OpenAPI` Functionality within `node-switchbot` #### Other Changes - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.4.0...v3.0.0 ## [2.4.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.3.0...v2.4.0) (2024-09-13) ### What's Changed - Added `celsius` and `fahrenheit` as based values sent for Sensors - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.3.0...v2.4.0 ## [2.3.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.2.0...v2.3.0) (2024-07-21) ### What's Changed - Added `humidity` value based of `percentage` for Humidifiers - Updated SwitchBot Lock Pro `manufacturerData` - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.2.0...v2.3.0 ## [2.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.1.1...v2.2.0) (2024-06-25) ### What's Changed - Add Model Friendly Name for each deviceType - Add SwitchBot Hub 2 Support - Add basic support for SwitchBot Lock Pro - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.1.1...v2.2.0 ## [2.1.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.1.0...v2.1.1) (2024-05-26) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.1.0...v2.1.1 ## [2.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.3...v2.1.0) (2024-05-14) ### What's Changed - Add SwitchBot Lock Support [#232](https://github.com/OpenWonderLabs/node-switchbot/pull/232), Thanks [@brozef](https://github.com/brozef) - Fix TypeScript issues & warnings [#239](https://github.com/OpenWonderLabs/node-switchbot/pull/239) [#240](https://github.com/OpenWonderLabs/node-switchbot/pull/240) [#241](https://github.com/OpenWonderLabs/node-switchbot/pull/241), Thanks [@dnicolson](https://github.com/dnicolson) - Update Noble [#242](https://github.com/OpenWonderLabs/node-switchbot/pull/242), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.3...v2.1.0 ## [2.0.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.2...v2.0.3) (2024-02-11) ### What's Changed - Add some TypeScript types [#228](https://github.com/OpenWonderLabs/node-switchbot/pull/228), Thanks [@dnicolson](https://github.com/dnicolson) - Remove Buffer import [#229](https://github.com/OpenWonderLabs/node-switchbot/pull/229), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.2...v2.0.3 ## [2.0.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.1...v2.0.2) (2024-02-09) ### What's Changed - Fix various 2.0.0 issues [#224](https://github.com/OpenWonderLabs/node-switchbot/pull/224), Thanks [@dnicolson](https://github.com/dnicolson) - 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) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.1...v2.0.2 ## [2.0.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.0...v2.0.1) (2024-02-06) ### What's Changed - Fix async constructor [#220](https://github.com/OpenWonderLabs/node-switchbot/pull/220), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v2.0.0...v2.0.1 ## [2.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.10.0...v2.0.0) (2024-02-05) ### What's Changed - Rewrite into Typescript and Convert CommonJS to ES Module - Fix Linting [#216](https://github.com/OpenWonderLabs/node-switchbot/pull/216), Thanks [@dnicolson](https://github.com/dnicolson) - Code Cleaup [#217](https://github.com/OpenWonderLabs/node-switchbot/pull/217), Thanks [@dnicolson](https://github.com/dnicolson) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.10.0...v2.0.0 ## [1.10.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.1...v1.10.0) (2024-01-05) ### What's Changed - Fix reversed bot state reporting [#207](https://github.com/OpenWonderLabs/node-switchbot/pull/207), Thanks [@grelca](https://github.com/grelca) - Add support for Curtain 3 [#209](https://github.com/OpenWonderLabs/node-switchbot/pull/209), Thanks [@tsia](https://github.com/tsia) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.1...v1.10.0 ## [1.9.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.0...v1.9.1) (2023-11-02) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.9.0...v1.9.1 ## [1.9.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.2...v1.9.0) (2023-09-16) ### What's Changed - Add support for the Indoor/Outdoor Thermo-Hygrometer (WoIOSensorTH) [#200](https://github.com/OpenWonderLabs/node-switchbot/pull/200), Thanks [@moritzmhmk](https://github.com/moritzmhmk) - Handle noble not being "poweredOn" on init [#199](https://github.com/OpenWonderLabs/node-switchbot/pull/199), Thanks [@moritzmhmk](https://github.com/moritzmhmk) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.2...v1.9.0 ## [1.8.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.1...v1.8.2) (2023-07-25) ### What's Changed - Added Lint Script [#195](https://github.com/OpenWonderLabs/node-switchbot/pull/195), Thanks [@dnicolson](https://github.com/dnicolson) - Fixed a Linting Issues [#196](https://github.com/OpenWonderLabs/node-switchbot/pull/196), Thanks [@dnicolson](https://github.com/dnicolson) - Fixed 'TypeError: Assignment to constant variable' [#194](https://github.com/OpenWonderLabs/node-switchbot/pull/194), Thanks [@banboobee](https://github.com/banboobee) - 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) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.1...v1.8.2 ## [1.8.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.0...v1.8.1) (2023-04-08) ### What's Changed - Use const keyword for immutable variables [#184](https://github.com/OpenWonderLabs/node-switchbot/pull/184), Thanks [@dnicolson](https://github.com/dnicolson/) - Use Error object for promise rejection [#181](https://github.com/OpenWonderLabs/node-switchbot/pull/181), Thanks [@dnicolson](https://github.com/dnicolson/) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.8.0...v1.8.1 ## [1.8.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.3...v1.8.0) (2023-01-28) ### What's Changed - Add Support for BlindTilt (Read Only) - Use Error object for promise rejection [#181](https://github.com/OpenWonderLabs/node-switchbot/pull/181), Thanks [@dnicolson](https://github.com/dnicolson/) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.3...v1.8.0 ## [1.7.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.2...v1.7.3) (2023-01-05) ### What's Changed - Improve error handling [#175](https://github.com/OpenWonderLabs/node-switchbot/pull/175), Thanks [@dnicolson](https://github.com/dnicolson/) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.2...v1.7.3 ## [1.7.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.1...v1.7.2) (2022-12-26) ### What's Changed - Fix for @abandonware/nobles breaking changes that cause: `TypeError: this.noble.once is not a function`. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.1...v1.7.2 ## [1.7.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.0...v1.7.1) (2022-12-20) ### What's Changed - Fix for @abandonware/nobles breaking changes that cause: `TypeError: this.noble.once is not a function`. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.0...v1.7.1 ## [1.7.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.6.1...v1.7.0) (2022-12-08) ### What's Changed - Add Read-only Support for Smart Lock. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.6.1...v1.7.0 ## [1.6.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.6.0...v1.6.1) (2022-10-18) ### What's Changed - Fixed Issue where node-switchbot wouldn't be found. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.6.0...v1.6.1 ## [1.6.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.5.0...v1.6.0) (2022-10-18) ### What's Changed - Added Support for Pushing Changes to Color Bulb & Strip Light - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.5.0...v1.6.0 ## [1.5.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.1...v1.5.0) (2022-10-07) ### What's Changed - Added Support for receiving status updates from Color Bulb & Strip Light - Fixed issue that caused excessive logging. - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.1...v1.5.0 ## [1.4.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.0...v1.4.1) (2022-08-27) ### What's Changed - Fix Plug Mini (US) implementation - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.0...v1.4.1 ## [1.4.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.3.0...v1.4.0) (2022-08-19) ### What's Changed - Added support for Plug Mini (j) & (g) - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.3.0...v1.4.0 ## [1.3.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.2.0...v1.3.0) (2022-06-25) ### What's Changed - Added more Device Types, not all supported though. - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.2.0...v1.3.0 ## [1.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.2...v1.2.0) (2022-03-04) ### What's Changed - Added support for SwitchBot "Contact" and "Motion" - Fix for Curtains on Firmware v3.3 and above - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.2...v1.2.0 ## [1.1.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.1...v1.1.2) (2021-11-13) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.1...v1.1.2 ## [1.1.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.0...v1.1.1) (2021-11-02) ### What's Changed - Change back from @node/noble to @abandonware/noble **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.1.0...v1.1.1 ## [1.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.8...v1.1.0) (2021-10-26) ### What's Changed - Add Contact/Motion Sensor advertisement - Add Humidifier advertisement - Correct Model for advertisement **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.8...v1.1.0 ## [1.0.8](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.7...v1.0.8) (2021-09-30) ### What's Changed - fix extra trace of old noble from @abandonware/noble **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.7...v1.0.8 ## [1.0.7](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.6...v1.0.7) (2021-09-24) ### What's Changed - Change from @abandonware/noble to @homebridge/noble **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.6...v1.0.7 ## [1.0.6](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.5...v1.0.6) (2021-08-29) ### What's Changed - Fixes FATAL ERROR: ad_id is not defined **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.5...v1.0.6 ## [1.0.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.4...v1.0.5) (2021-08-04) ### What's Changed - Adding code for Contact and Motion Sensors - Not Ready to be used yet though **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.4...v1.0.5 ## [1.0.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.3...v1.0.4) (2021-08-03) ### What's Changed - Support for the discover method with id on macOS **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.3...v1.0.4 ## [1.0.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.2...v1.0.3) (2021-07-30) ### What's Changed - Fixed misspelling. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.2...v1.0.3 ## [1.0.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.1...v1.0.2) (2021-07-29) ### What's Changed - Housekeeping and update dependencies **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.1...v1.0.2 ## [1.0.1](https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.0...v1.0.1) (2021-07-29) ### What's Changed - Fixed issue where after switching Bluetooth off and on, would not work properly. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.0.0...v1.0.1 ## [1.0.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.2.0...v1.0.0) (2021-01-21) ### What's Changed - - fix "No device was found" in MacOS **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.2.0...v1.0.0 ## [0.2.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.1.0...v0.2.0) (2020-11-05) ### What's Changed - 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) **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.1.0...v0.2.0 ## [0.1.0](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.5...v0.1.0) (2020-10-28) ### What's Changed - Added support for SwitchBot Curtain [#6](https://github.com/OpenWonderLabs/node-switchbot/pull/6), Thanks [@SwitchBot-Wonderlabs](https://github.com/SwitchBot-Wonderlabs) - 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) **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.5...v0.1.0 ## [0.0.5](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.4...v0.0.5) (2020-02-19) ### What's Changed - Improved the stability of discovering the BLE characteristics [#3](https://github.com/OpenWonderLabs/node-switchbot/pull/3), Thanks [@dnicolson](https://github.com/dnicolson) **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.4...v0.0.5 ## [0.0.4](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.3...v0.0.4) (2020-02-11) ### What's Changed - 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) **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.3...v0.0.4 ## [0.0.3](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.2...v0.0.3) (2020-02-10) ### What's Changed - 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) - Fixed the bug that the `turnOn()` method returns an error if the "Press mode" is selected on the Bot. **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.2...v0.0.3 ## [0.0.2](https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.1...v0.0.2) (2019-11-20) ### What's Changed - First public release **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v0.0.1...v0.0.2 ## [0.0.1](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.1) (2019-11-20) ### What's Changed - Initial commit **Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v0.0.1