Skip to content

[WIP] Bug: Bot not able to send BLE commands#1259

Closed
Copilot wants to merge 1 commit intolatestfrom
copilot/fix-1073
Closed

[WIP] Bug: Bot not able to send BLE commands#1259
Copilot wants to merge 1 commit intolatestfrom
copilot/fix-1073

Conversation

Copy link
Contributor

Copilot AI commented Aug 21, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

Describe the Bug

ive just installed Version 4.0.0, set up the bot from scratch but still receiving the Same error as in the old Issue.

Bot: Swotchbot failed BLEpushChanges with
BLE Connection, Error Message: "Cannot read properties of undefined (reading 'press') "

To Reproduce

  • install Version 4.0.0
  • Setup bot with BLE
  • tap Switchbot bot with Firmware v6.6

Expected Behavior

properties can be read and makes a press

Relevant Log Output


[10/12/2024, 11:00:38 AM] [SwitchBot] ID EBUG] Bot: Swotchbot (power, battery, de
viceMode) = BLE: (undefined, undefined, u
ndefined), current: (undefined, 100, press)

[10/12/2024, 11:00:38 AM] [SwitchBot] [D EBUG] Bot: Swotchbot Press Mode, On: fal se
[10/12/2024, 11:00:38 AM] [SwitchBot] [D EBUG] Bot: Swotchbot BatteryLevel: undef ined
[10/12/2024, 11:00:38 AM] [SwitchBot] [D EBUG] Bot: Swotchbot StatusLowBattery: 0 [10/12/2024, 11:00:38 AM] [SwitchBot] ID EBUG] Bot: Swotchbot updateHomeKitCharac teristics
[10/12/2024, 11:00:38 AM] [SwitchBot] ID EBUG] Bot: Swotchbot BatteryLevel: undef ined
[10/12/2024, 11:00:38 AM] [SwitchBot] [D EBUG] Bot: Swotchbot updateCharacteristi c StatusLowBattery: 0
[10/12/2024, 11:00:38 AM] [SwitchBot] ID EBUG] Bot: Swotchbot updateCharacteristi c On: false
[10/12/2024, 11:00:58 AM] [SwitchBot] ID
EBUG] Bot: Swotchbot value: true
[10/12/2024, 11:00:58 AM] [SwitchBot] [D EBUG] Bot: Swotchbot BLEpushChanges

[10/12/2024, 11:00:58 AM] [SwitchBot] [D
EBUG] Bot: Swotchbot value: true
[10/12/2024, 11:00:58 AM] [SwitchBot] [D EBUG] Bot: Swotchbot BLEpushChanges
[10/12/2024, 11:00:58 AM] [SwitchBot] [D EBUG] Bot: Swotchbot BLEpushChanges On:
true OnCached: false
[10/12/2024, 11:00:58 AM] [SwitchBot] [D EBUG] Bot: Swotchbot bleMac: c7:32:34:35
: 0b: 5c
[10/12/2024, 11:00:58 AM] [SwitchBot] ID
EBUG] Bot: Swotchbot Bot Mode: press [10/12/2024, 11:01:03 AM] [SwitchBot] St opped Scanning for SwitchBot BLE devices
[10/12/2024, 11:01:03 AM] [SwitchBot] BO
t: Swotchbot On: true
[10/12/2024, 11:01:03 AM] [SwitchBot] Bot: Swotchbot failed BLEpushChanges with
BLE Connection, Error Message: "Cannot read properties of undefined (reading 'press') "

Config for homebridge-switchbot


{
"name": "Switchbot",
"credentials": {
        "token": "x",
        "secret": "x",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "devices": [
            {
                "configDeviceName": "Swotchbot",
                "deviceId": "c7:32:34:35:0B:5C",
                "configDeviceType": "Bot",
                "connectionType": "BLE",
                "mode": "press",
                "doublePress": 1,
                "logging": "debug"
            }
        ]
    },
    "platform": "SwitchBot"
}

Screenshots

No response

Device and Model

Switchbot Bot with Firmware v6.6

Node.js Version

v20.10.0

NPM Version

10.2.3

Homebridge Version

v1.8.4

Homebridge Switchbot Plugin Version

v4.0.0

Homebridge Config UI X Plugin Version

v4.58.0

Operating System

Raspian / Portainer / homebridge Image

Fixes #1073.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 5, 2025
@donavanbecker donavanbecker deleted the copilot/fix-1073 branch November 2, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Bot not able to send BLE commands

2 participants