Skip to content

[WIP] Bug: BLE Curtain Control Broken#1258

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

[WIP] Bug: BLE Curtain Control Broken#1258
Copilot wants to merge 1 commit intolatestfrom
copilot/fix-1077

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

This seems to be a carryover of this:[ #1007 (comment)](#1007 (comment))

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

Fixes #1077.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@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-1077 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: BLE Curtain Control Broken

2 participants