OpenWonderLabs / homebridge-switchbot

The Homebridge SwitchBot plugin allows you to access your SwitchBot Device(s) from HomeKit. Homebridge.
https://openwonderlabs.github.io/homebridge-switchbot/
ISC License
242 stars 53 forks source link

Support Request: BOT STOPPED WORKING ON BLE #1027

Closed att11 closed 3 weeks ago

att11 commented 2 months ago

Describe Your Problem

BOT over BLE returns error message

Relevant log output

[20/08/2024, 02:31:39] [SwitchBot] [DEBUG] Bot: AC Set On: 0
[20/08/2024, 02:31:54] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges
[20/08/2024, 02:31:54] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges On: true OnCached: false
[20/08/2024, 02:31:54] [SwitchBot] [DEBUG] Bot: AC 'node-switchbot' found: [object Object]
[20/08/2024, 02:31:54] [SwitchBot] [DEBUG] Bot: AC BLE Address: f8:a4:79:8a:02:4c
[20/08/2024, 02:31:54] [SwitchBot] [DEBUG] Bot: AC Bot Mode: press
[20/08/2024, 02:31:59] [SwitchBot] Bot: AC On: true
[20/08/2024, 02:31:59] [SwitchBot] Bot: AC failed BLEpushChanges with BLE Connection, Error Message: "Cannot read properties of undefined (reading 'press')"
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges On: true OnCached: false
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC 'node-switchbot' found: [object Object]
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC BLE Address: f8:a4:79:8a:02:4c
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC Bot Mode: press
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:32:09] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c
[20/08/2024, 02:32:14] [SwitchBot] Bot: AC On: true
[20/08/2024, 02:32:14] [SwitchBot] Bot: AC failed BLEpushChanges with BLE Connection, Error Message: "Cannot read properties of undefined (reading 'press')"
[20/08/2024, 02:32:24] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:32:24] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:32:24] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c
[20/08/2024, 02:32:25] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:32:25] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:32:25] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c
[20/08/2024, 02:32:58] [Homebridge UI] [att] Accessory layout changes saved.
[20/08/2024, 02:33:16] [SwitchBot] [DEBUG] Bot: AC Set On: 1
[20/08/2024, 02:33:32] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges
[20/08/2024, 02:33:32] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges On: true OnCached: false
[20/08/2024, 02:33:32] [SwitchBot] [DEBUG] Bot: AC 'node-switchbot' found: [object Object]
[20/08/2024, 02:33:32] [SwitchBot] [DEBUG] Bot: AC BLE Address: f8:a4:79:8a:02:4c
[20/08/2024, 02:33:32] [SwitchBot] [DEBUG] Bot: AC Bot Mode: press
[20/08/2024, 02:33:37] [SwitchBot] Bot: AC On: true
[20/08/2024, 02:33:37] [SwitchBot] Bot: AC failed BLEpushChanges with BLE Connection, Error Message: "Cannot read properties of undefined (reading 'press')"
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC BLEpushChanges On: true OnCached: false
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC 'node-switchbot' found: [object Object]
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC BLE Address: f8:a4:79:8a:02:4c
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC Bot Mode: press
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:33:47] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c
[20/08/2024, 02:33:52] [SwitchBot] Bot: AC On: true
[20/08/2024, 02:33:52] [SwitchBot] Bot: AC failed BLEpushChanges with BLE Connection, Error Message: "Cannot read properties of undefined (reading 'press')"
[20/08/2024, 02:34:02] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:34:02] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:34:02] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c
[20/08/2024, 02:34:25] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:34:25] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:34:25] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c
[20/08/2024, 02:36:25] [SwitchBot] [DEBUG] Bot: AC BLERefreshStatus
[20/08/2024, 02:36:25] [SwitchBot] [DEBUG] Bot: AC is listening to Platform BLE.
[20/08/2024, 02:36:25] [SwitchBot] [DEBUG] Bot: AC bleMac: f8:a4:79:8a:02:4c

Config for homebridge-switchbot

"devices": [
                {
                    "type": "bot",
                    "name": "AC Central",
                    "address": "xxxxxxxxxx",
                    "autoTurnOffInPressMode": false
                }
            ],
            "name": "SwitchBotPlatform",
            "platform": "SwitchbotBluetoothPlatform"
        },
        {
            "name": "SwitchBot",
            "credentials": {
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "xxxxxxxxxxxxxxx",
                        "configDeviceName": "AC",
                        "configDeviceType": "Bot",
                        "connectionType": "BLE",
                        "bot": {
                            "mode": "press",
                            "deviceType": "fan",
                            "doublePress": 1
                        },
                        "offline": true,
                        "external": false,
                        "logging": "debug"
                    }
                ],
                "BLE": true,
                "logging": "debug"
            },
            "platform": "SwitchBot"
        }
    ],

Screenshots

No response

Device & Model

Raspberry Pi 4

Node.js Version

v20.15.0

NPM Version

v20.15.0

Homebridge Version

v 1.8.4

Homebridge SwitchBot Plugin Version

v3.7.0

Homebridge Config UI X Plugin Version

v.4.56.4

Operating System

Raspbian

donavanbecker commented 1 month ago

Can you try the latest beta:

npm version

Click here to find out how to install Beta

github-actions[bot] commented 1 month ago

This issue 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.

donavanbecker commented 3 weeks ago

Closing all issues now that v4.0.0 is out. If you are still having an issue after trying v4.0.0, please open a new issue. Keep in mind v4.0.0 has some breaking changes with the config. You will need to re set your config up, however there are some nice added bonuses since you can set settings at a deviceType level or individual level.