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

Bug: Stuck in Reboot Loop

Open tjridge opened this issue 9 months ago • 4 comments

Describe the Bug

Unable to setup plugin. Stuck in a rebooting loop

Launched child bridge with PID 5580 [07/04/2025, 15:29:53] [SwitchBot] Loaded @switchbot/homebridge-switchbot v4.3.1 child bridge successfully [07/04/2025, 15:29:54] [SwitchBot] Child bridge process ended [07/04/2025, 15:29:54] [SwitchBot] Process Ended. Code: 1, Signal: null [07/04/2025, 15:30:01] [SwitchBot] Restarting Process... [07/04/2025, 15:30:01] [SwitchBot] Launched child bridge with PID 5645 [07/04/2025, 15:30:02] [SwitchBot] Loaded @switchbot/homebridge-switchbot v4.3.1 child bridge successfully Error: The devices config section is missing the Device ID in the config. Please check your config. at SwitchBotPlatform.verifyConfig (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/platform.ts:372:21)

To Reproduce

Launched child bridge with PID 5580 [07/04/2025, 15:29:53] [SwitchBot] Loaded @switchbot/homebridge-switchbot v4.3.1 child bridge successfully [07/04/2025, 15:29:54] [SwitchBot] Child bridge process ended [07/04/2025, 15:29:54] [SwitchBot] Process Ended. Code: 1, Signal: null [07/04/2025, 15:30:01] [SwitchBot] Restarting Process... [07/04/2025, 15:30:01] [SwitchBot] Launched child bridge with PID 5645 [07/04/2025, 15:30:02] [SwitchBot] Loaded @switchbot/homebridge-switchbot v4.3.1 child bridge successfully Error: The devices config section is missing the Device ID in the config. Please check your config. at SwitchBotPlatform.verifyConfig (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/platform.ts:372:21)

Expected Behavior

Devices listed to add to HomeKit

Relevant Log Output

Launched child bridge with PID 5580
[07/04/2025, 15:29:53] [SwitchBot] Loaded @switchbot/homebridge-switchbot v4.3.1 child bridge successfully
[07/04/2025, 15:29:54] [SwitchBot] Child bridge process ended
[07/04/2025, 15:29:54] [SwitchBot] Process Ended. Code: 1, Signal: null
[07/04/2025, 15:30:01] [SwitchBot] Restarting Process...
[07/04/2025, 15:30:01] [SwitchBot] Launched child bridge with PID 5645
[07/04/2025, 15:30:02] [SwitchBot] Loaded @switchbot/homebridge-switchbot v4.3.1 child bridge successfully
Error: The devices config section is missing the *Device ID* in the config. Please check your config.
    at SwitchBotPlatform.verifyConfig (file:///var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/src/platform.ts:372:21)

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "XXXXXX",
                "secret": "XXXXXXX",
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "devices": [
                    {
                        "logging": "standard"
                    }
                ],
                "logging": "standard"
            },
            "platform": "SwitchBot",
            "_bridge": {
                "username": "XXXX:6B:5B:C2",
                "port": 35644
            }

Screenshots

No response

Device and Model

Debian GNU/Linux Bookworm (12)

Node.js Version

v22.14.0

NPM Version

N/A

Homebridge Version

N/A

Homebridge Switchbot Plugin Version

v4.3.1

Homebridge Config UI X Plugin Version

N/A

Operating System

Raspbian

tjridge avatar Apr 07 '25 19:04 tjridge

Still happening

tjridge avatar Apr 23 '25 18:04 tjridge

After updating node.js to v22.16.0, the SwitchBot child bridge keeps rebooting. Downgrading the plugin from v4.3.1 to any earlier version doesn’t solve it. Logging:

[29/05/2025, (node: internal/process/task_queues: 105:5) 19:30:570 Child bridge process ended [29/05/2025, 19:30:571 [29/05/2025, Ended. Code: 1, Signal: null 19:31:040 [29/05/2025, 19:31:051 [29/05/2025, [29/05/2025, 19:31:080 19:31:081 Launched child bridge with PID 15670 '@switchbot/homebridge-switchbot.SwitchBot' Loaded @switchbot/homebridge-switchbot v4.3.0 child bridge successfully Error: listen DADDRINUSE: at Server.setupListenHandle [as listen2] (node:net: 1939:16) at listenInCluster (node: net: 1996:12) at Server. listen (node:net:2101:7) at BventedHTTPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts: 166:20) at HAPServer. listen (/var/lib/homebridge/node modules/homebridge/node modules/hap-nodejs/src/lib/HAPServer.ts: 380:21) at Bridge. (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts: 1378:18) at step (/var/lib/homebridge/node modules/homebridge/node modules/tslib/tslib.js: 196:27) at Object.next (/var/lib/homebridge/node modules/homebridge/node modules/tslib/tslib.js: 177:57) at fulfilled (/var/1ib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:167:62) at processTicksAndRejections (node:internal/process/task_queues: 105:5)

tetanus avatar May 29 '25 11:05 tetanus

@tjridge looks like you have a device config with no device id

donavanbecker avatar May 29 '25 13:05 donavanbecker

@tetanus please open your own issue so we can see your config

donavanbecker avatar May 29 '25 13:05 donavanbecker