Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Homebridge logs report [SwitchBot] Failed to import noble: "socket creation failed" and some curtains no longer respond #1103

Closed
tony-brookes opened this issue Nov 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working stale

Comments

@tony-brookes
Copy link

tony-brookes commented Nov 5, 2024

Describe the Bug

I upgraded to version v4.1.0 and as soon as Homebridge restarted the error message:

[SwitchBot] Failed to import noble: "socket creation failed" and some curtains no longer respond

start to appear in the logs. At the same time most curtains stopped responding via HomeKit. They still respond fine via the SwitchBot app on iPhone or iPad but they will not respond via Homebridge.

Only the 3 curtains specifically referenced in the logs (see extract below) still work. All others have simply stopped even appearing as accessories.

Curtains which still work clearly show their state change in the log when I try to adjust their position via HomeKit. But curtains which do not work do not cause any log entries to appear. It seems that HomeKit doesn't even think they exist any more.

Just before submitting noticed that my node and switchbot plugins were both now in need of upgrade. Upgraded both and the problem still exists (version numbers noted below are after these upgrades)

To Reproduce

Upgrade to v1.4

Restart home bridge.

Expected Behavior

All curtains continue to work.

Relevant Log Output

[11/5/2024, 11:35:12 AM] [SwitchBot] Failed to import noble: "socket creation failed"
[11/5/2024, 11:35:13 AM] [SwitchBot] Restoring existing accessory from cache: Bedroom Left deviceId: C2D00D7EBAF7
[11/5/2024, 11:35:13 AM] [SwitchBot] Restoring existing accessory from cache: Back Door deviceId: DFA8D593B868
[11/5/2024, 11:35:13 AM] [SwitchBot] Restoring existing accessory from cache: Front Door deviceId: CCF36ACE018D
[11/5/2024, 11:35:13 AM] [SwitchBot] Restoring existing accessory from cache: Dyson deviceId: 02-202306131352-13913062

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "token": "removed",
        "secret": "removed",
        "notice": "Keep your token a secret!"
    },
    "options": {
        "devices": [
            {
                "deviceId": "removed",
                "configDeviceName": "Bedroom Left",
                "configDeviceType": "Curtain",
                "connectionType": "OpenAPI",
                "curtain": {
                    "set_minStep": 20,
                    "set_min": 10,
                    "set_max": 90,
                    "updateRate": 20,
                    "setOpenMode": "0",
                    "setCloseMode": "0",
                    "hide_lightsensor": true
                }
            },
            {
                "deviceId": "removed",
                "configDeviceName": "Bedroom Right",
                "configDeviceType": "Curtain",
                "connectionType": "OpenAPI",
                "curtain": {
                    "set_minStep": 20,
                    "set_min": 10,
                    "set_max": 90,
                    "updateRate": 20,
                    "setOpenMode": "0",
                    "setCloseMode": "0",
                    "hide_lightsensor": true
                }
            },
            {
                "deviceId": "removed",
                "configDeviceName": "Back Door",
                "configDeviceType": "Curtain",
                "connectionType": "OpenAPI",
                "curtain": {
                    "set_minStep": 20,
                    "set_min": 10,
                    "set_max": 90,
                    "updateRate": 20,
                    "setOpenMode": "0",
                    "setCloseMode": "0",
                    "hide_lightsensor": true
                }
            },
            {
                "deviceId": "removed",
                "configDeviceName": "Den",
                "configDeviceType": "Curtain",
                "connectionType": "OpenAPI",
                "curtain": {
                    "set_minStep": 20,
                    "set_min": 10,
                    "set_max": 90,
                    "updateRate": 20,
                    "setOpenMode": "0",
                    "setCloseMode": "0",
                    "hide_lightsensor": true
                }
            },
            {
                "deviceId": "removed",
                "configDeviceName": "Front Door",
                "configDeviceType": "Curtain",
                "connectionType": "OpenAPI",
                "curtain": {
                    "set_minStep": 20,
                    "set_min": 10,
                    "set_max": 90,
                    "updateRate": 20,
                    "setOpenMode": "0",
                    "setCloseMode": "0",
                    "hide_lightsensor": true
                }
            }
        ],
        "irdevices": [
            {
                "deviceId": "removed",
                "configDeviceName": "Dyson",
                "configRemoteType": "DIY Fan",
                "connectionType": "OpenAPI",
                "customize": false,
                "disablePushOff": false,
                "disablePushDetail": true,
                "irfan": {
                    "swing_mode": true,
                    "rotation_speed": false
                },
                "other": {
                    "deviceType": "Fan"
                },
                "external": false,
                "logging": "standard"
            }
        ],
        "refreshRate": 360,
        "pushRate": 2
    },
    "platform": "SwitchBot"
}

Screenshots

No response

Device and Model

Various

Node.js Version

v22.11.0

NPM Version

10.9

Homebridge Version

v1.8.5

Homebridge Switchbot Plugin Version

v1.4.2

Homebridge Config UI X Plugin Version

No response

Operating System

Docker

Copy link
Contributor

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.

@github-actions github-actions bot added the stale label Nov 20, 2024
Copy link
Contributor

This issue has been closed as no further activity has occurred.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

6 participants