homebridge-switchbot icon indicating copy to clipboard operation
homebridge-switchbot copied to clipboard

Bug: BLE Curtain Control Broken

Open ukiews opened this issue 1 year ago • 6 comments

Describe the Bug

This seems to be a carryover of this:[ #1007 (comment)](https://github.com/OpenWonderLabs/homebridge-switchbot/issues/1007#issuecomment-2361594324)

However, with version 4.0 my BLE control is completely broken.

To Reproduce

Update from 3.8 to 4.0

Relevant Log Output

[10/14/2024, 2:23:26 PM] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Target Position': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.
[10/14/2024, 2:23:27 PM] [SwitchBot] Curtain3: LeftCurtain TypeError: Cannot read properties of undefined (reading 'runToPos')
[10/14/2024, 2:23:27 PM] [SwitchBot] Curtain3: LeftCurtain Retrying
[10/14/2024, 2:23:28 PM] [SwitchBot] Curtain3: LeftCurtain TypeError: Cannot read properties of undefined (reading 'runToPos')
[10/14/2024, 2:23:28 PM] [SwitchBot] Curtain3: LeftCurtain Retrying
[10/14/2024, 2:23:29 PM] [SwitchBot] Curtain3: LeftCurtain TypeError: Cannot read properties of undefined (reading 'runToPos')
[10/14/2024, 2:23:29 PM] [SwitchBot] Curtain3: LeftCurtain Retrying
[10/14/2024, 2:23:30 PM] [SwitchBot] Curtain3: LeftCurtain TypeError: Cannot read properties of undefined (reading 'runToPos')
[10/14/2024, 2:23:30 PM] [SwitchBot] Curtain3: LeftCurtain Retrying
[10/14/2024, 2:23:31 PM] [SwitchBot] Curtain3: LeftCurtain failed BLEpushChanges with BLE Connection, Error Message: "Cannot read properties of undefined (reading 'runToPos')"

Config for homebridge-switchbot

"name": "SwitchBot",
            "credentials": {
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "...",
                        "configDeviceName": "LeftCurtain",
                        "configDeviceType": "Curtain3",
                        "connectionType": "BLE",
                        "customBLEaddress": "...",
                        "curtain": {
                            "setOpenMode": "1",
                            "setCloseMode": "0",
                            "silentModeSwitch": true,
                            "hide_lightsensor": true
                        },
                        "external": true
                    },
                    {
                        "deviceId": "...",
                        "configDeviceName": "RightCurtain",
                        "configDeviceType": "Curtain3",
                        "connectionType": "BLE",
                        "curtain": {
                            "setOpenMode": "1",
                            "setCloseMode": "0",
                            "silentModeSwitch": true,
                            "hide_lightsensor": true
                        },
                        "external": true
                    }
                ],
                "BLE": true
            },
            "_bridge": {
                "username": "...",
                "port": 59906
            },
            "platform": "SwitchBot"
        }
    ],

Device and Model

Raspberry Pi 4

Node.js Version

20.17.0

NPM Version

10.2.4

Homebridge Version

1.8.4

Homebridge Switchbot Plugin Version

4

ukiews avatar Oct 14 '24 18:10 ukiews

any word on this?

ukiews avatar Oct 30 '24 15:10 ukiews

I'm also having the same issue

hqy2000 avatar Nov 20 '24 08:11 hqy2000

@donavanbecker any chance you could take a look into this. Still stuck on v.3.8.0

ukiews avatar Dec 12 '24 03:12 ukiews

I have the same issue with my blind tilt! My bug was closed (https://github.com/OpenWonderLabs/homebridge-switchbot/issues/1101). Still on version 3.8.3 due to this issue.

DJGizbo avatar Jan 04 '25 10:01 DJGizbo

@donavanbecker Any progress on this? There have been multiple versions pushed, but it does not seem any of them fix whatever happened after v3.8 and loss of curtain control over BLE. Thank you for the excellent work!

ukiews avatar Jul 05 '25 21:07 ukiews

I haven't had time. I will merge any pull request anyone puts forward to the repo.

donavanbecker avatar Jul 05 '25 23:07 donavanbecker