Repository navigation
Adjust BLE failure log levels - #352
Merged
Merged
Conversation
donavanbecker
added a commit
that referenced
this pull request
Oct 30, 2026
Merges `latest` (5.2.1 to 5.2.4) into `beta-6.0.0` before the 6.0.0 release, so 6.0.0 keeps dnicolson's BLE logging changes (#351, #352, #353). There was one conflict: the disconnect fix landed on both branches (#349 to `latest`, #350 to `beta-6.0.0`). I kept the `beta-6.0.0` version, which also clears the encrypted session on disconnect. I checked that no log line from `latest` was dropped. 435 tests pass. Build and lint pass. --- _Generated by [Claude Code](https://claude.ai/code/session_01TYWa2RXoWsaUTWh76oNv8s)_
Merged
donavanbecker
added a commit
that referenced
this pull request
Oct 30, 2026
## node-switchbot 6.0.0 ### What's new - **Encrypted BLE devices** (#347): pySwitchbot's `SwitchbotEncryptedDevice` protocol, supporting both CTR and GCM sessions. Call `device.setKey({ keyId, encryptionKey })` to use it with relay switches, locks, air purifiers and bulbs. - **BLE replies from notifications** (#347): replies are read from the notify characteristic, as in pySwitchbot, with a 5 s timeout. A disconnect rejects a pending reply. - **Disconnect handling** (#349, #350): - Disconnects the library starts no longer log `Unexpected disconnect`. - When a device drops the link, the connection and encrypted session are cleared, so the next command reconnects. - **BLE logging** from 5.2.x (#351, #352, #353, dnicolson). ### Breaking changes - **`SwitchBotBLEModel` values** now use pySwitchbot's primary advertisement codes: - Meter Pro `4` - Lock Pro `$` - Keypad `y` - Strip Light `r` - Hub 2 `v` - Air Purifier `*` - Air Purifier Table `7` - Remote `b` - Relay Switch 1 `;` - Relay Switch 1PM `<` - Water Leak Detector `&` - Humidifier 2 `#` - Battery Circulator Fan `~` - K10+ Pro Combo / K10 Pro `3` - K10+ `}` - **Removed enum members:** `KeypadTouch`, `RobotVacuumCleanerS1`, `RobotVacuumCleanerS1Plus` and `PresenceSensor`. ### Migration (homebridge-switchbot) - Code that compares `SwitchBotBLEModel` values must use the new codes. homebridge-switchbot doesn't switch on these values, so it needs no change there. - Pass keys with `setKey`. homebridge-switchbot does this as of #1432, and #1433 moves it to 6.0.0-beta. Tested as `6.0.0-beta.0` / `beta.1` on npm. 435 tests pass. Build and lint pass. --- _Generated by [Claude Code](https://claude.ai/code/session_01TYWa2RXoWsaUTWh76oNv8s)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: dnicolson <dnicolson@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
♻️ Current situation
Warning messages are logged very frequently:
💡 Proposed solution
Describe the proposed solution and changes. How does it affect the project? How does it affect the internal structure (e.g., refactorings)?
⚙️ Release Notes
Adjust log levels.