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
248 stars 54 forks source link

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

Closed tony-brookes closed 2 days ago

tony-brookes commented 3 weeks ago

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

github-actions[bot] commented 1 week 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.

github-actions[bot] commented 2 days ago

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