Bug: Child Bridge v4.0.0 keeps restarting after update
### Describe the Bug

After updating to 4.0.0, the child bridge keeps restarting. So had to downgrade to v3.8.3

### To Reproduce

Update plugin to v4.0.0

### Expected Behavior

Just run normally

### Relevant Log Output

```shell
[SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 2:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:15:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:21:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:27:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:33:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:39:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:45:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:51:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 3:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:15:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:21:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:27:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:33:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:39:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:45:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:51:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 4:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:15:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:21:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:27:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:33:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:39:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:45:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:51:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 5:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:15:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:21:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:27:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:33:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:39:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:45:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:51:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 6:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:15:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:21:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:27:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:33:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:39:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:45:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:51:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 7:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:15:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:21:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:27:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:33:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:39:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:45:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:51:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 8:57:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 9:03:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 9:09:00 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 9:13:15 AM] [SwitchBot] Restarting child bridge...
[10/12/2024, 9:13:15 AM] Got SIGTERM, shutting down child bridge process...
[10/12/2024, 9:13:20 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:13:20 AM] [SwitchBot] Process Ended. Code: 143, Signal: null
[10/12/2024, 9:13:27 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:13:27 AM] [SwitchBot] Launched child bridge with PID 24940
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:13:29 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:13:29 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:13:36 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:13:37 AM] [SwitchBot] Launched child bridge with PID 24975
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:13:39 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:13:39 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:13:46 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:13:47 AM] [SwitchBot] Launched child bridge with PID 25001
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:13:49 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:13:49 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:13:56 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:13:57 AM] [SwitchBot] Launched child bridge with PID 25033
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:13:59 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:13:59 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:14:06 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:14:07 AM] [SwitchBot] Launched child bridge with PID 25067
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:14:09 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:14:09 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:14:16 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:14:17 AM] [SwitchBot] Launched child bridge with PID 25126
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:14:19 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:14:19 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:14:26 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:14:27 AM] [SwitchBot] Launched child bridge with PID 25159
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:14:29 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:14:29 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:14:36 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:14:36 AM] [SwitchBot] Launched child bridge with PID 25194
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:14:39 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:14:39 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:14:46 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:14:46 AM] [SwitchBot] Launched child bridge with PID 25220
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:14:49 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:14:49 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:14:56 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:14:56 AM] [SwitchBot] Launched child bridge with PID 25253
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:14:59 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:14:59 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:15:06 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:15:06 AM] [SwitchBot] Launched child bridge with PID 25288
/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12
class BluetoothHciSocketWrapped extends BluetoothHciSocket {
^
Error: socket creation failed
    at new BluetoothHciSocketWrapped (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/bluetooth-hci-socket/lib/native.js:12:1)
    at new Hci (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/hci.js:100:18)
    at new NobleBindings (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/hci-socket/bindings.js:27:15)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/resolve-bindings.js:36:12)
    at module.exports (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/with-custom-binding.js:3:53)
    at Object.<anonymous> (/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/index.js:1:50)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
[10/12/2024, 9:15:08 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:15:08 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:15:16 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:15:17 AM] [SwitchBot] Launched child bridge with PID 25323
Error: Plugin /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot does not contain a package.json.
    at Function.loadPackageJSON (/homebridge/node_modules/homebridge/src/pluginManager.ts:418:13)
    at PluginManager.loadPlugin (/homebridge/node_modules/homebridge/src/pluginManager.ts:397:52)
    at ChildBridgeFork.loadPlugin (/homebridge/node_modules/homebridge/src/childBridgeFork.ts:109:38)
    at process.<anonymous> (/homebridge/node_modules/homebridge/src/childBridgeFork.ts:265:23)
    at process.emit (node:events:519:28)
    at process.emit (/homebridge/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)
    at emit (node:internal/child_process:951:14)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[10/12/2024, 9:15:17 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:15:17 AM] [SwitchBot] Process Ended. Code: 1, Signal: null
[10/12/2024, 9:15:24 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:15:24 AM] [SwitchBot] Launched child bridge with PID 25471
[10/12/2024, 9:15:25 AM] [SwitchBot] Restarting child bridge...
[10/12/2024, 9:15:27 AM] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[10/12/2024, 9:15:27 AM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.8.3 child bridge successfully
[10/12/2024, 9:15:27 AM] Got SIGTERM, shutting down child bridge process...
[10/12/2024, 9:15:27 AM] Loaded 11 cached accessories from cachedAccessories.0E42877738D0.
[10/12/2024, 9:15:27 AM] Homebridge v1.8.4 (HAP v0.12.2) (SwitchBot) is running on port 35961.
[10/12/2024, 9:15:27 AM] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[10/12/2024, 9:15:28 AM] [SwitchBot] No deviceType or configDeviceType for device. No device will be created.
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB Kitchen deviceId: C570785DCA9D
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB SR deviceId: CF160F90171D
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB Balcony deviceId: D1B95C6CA12E
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: 2 AC Door deviceId: D2353334687D
[10/12/2024, 9:15:28 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB BedR deviceId: DEB95B5130DE
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB Hub 2 deviceId: E55460B62D51
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB Office deviceId: EB7427216D7B
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB DR deviceId: ED5B287A4053
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB LR deviceId: EE927C000563
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB SBathR deviceId: F4CA70379451
[10/12/2024, 9:15:28 AM] [SwitchBot] Restoring existing accessory from cache: SB BathR deviceId: FD81452A7817
[10/12/2024, 9:15:32 AM] [SwitchBot] Child bridge process ended
[10/12/2024, 9:15:32 AM] [SwitchBot] Process Ended. Code: 143, Signal: null
[10/12/2024, 9:15:39 AM] [SwitchBot] Restarting Process...
[10/12/2024, 9:15:40 AM] [SwitchBot] Launched child bridge with PID 25514
[10/12/2024, 9:15:42 AM] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[10/12/2024, 9:15:42 AM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.8.3 child bridge successfully
[10/12/2024, 9:15:42 AM] Loaded 11 cached accessories from cachedAccessories.0E42877738D0.
[10/12/2024, 9:15:43 AM] Homebridge v1.8.4 (HAP v0.12.2) (SwitchBot) is running on port 37325.
[10/12/2024, 9:15:43 AM] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[10/12/2024, 9:15:43 AM] [SwitchBot] No deviceType or configDeviceType for device. No device will be created.
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB Kitchen deviceId: C570785DCA9D
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB SR deviceId: CF160F90171D
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB Balcony deviceId: D1B95C6CA12E
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: 2 AC Door deviceId: D2353334687D
[10/12/2024, 9:15:43 AM] [SwitchBot] Bot: 2 AC Door failed openAPIRefreshStatus with OpenAPI Connection, Error Message: "Cannot read properties of null (reading 'json')"
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB BedR deviceId: DEB95B5130DE
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB Hub 2 deviceId: E55460B62D51
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB Office deviceId: EB7427216D7B
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB DR deviceId: ED5B287A4053
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB LR deviceId: EE927C000563
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB SBathR deviceId: F4CA70379451
[10/12/2024, 9:15:43 AM] [SwitchBot] Restoring existing accessory from cache: SB BathR deviceId: FD81452A7817
```


### Config for homebridge-switchbot

```shell
{
    "name": "SwitchBot",
    "credentials": {
        "token": "DELETED",
        "secret": "DELETED",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "devices": [
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB Hub 2",
                "configDeviceType": "Hub 2",
                "connectionType": "OpenAPI",
                "hub": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "history": true,
                "firmware": "1.4-2.3",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "2 AC Door",
                "configDeviceType": "Bot",
                "connectionType": "OpenAPI",
                "bot": {
                    "mode": "press",
                    "deviceType": "door",
                    "allowPush": false,
                    "doublePress": 1
                },
                "maxRetries": 0,
                "delayBetweenRetries": 3,
                "firmware": "6.6",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB LR",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB Balcony",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB BathR",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB BedR",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB DR",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB Office",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB SBathR",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB SR",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4"
            },
            {
                "deviceId": "DELETED",
                "configDeviceName": "SB Kitchen",
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "iosensor": {
                    "convertUnitTo": "FAHRENHEIT"
                },
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "history": true,
                "firmware": "0.4",
                "refreshRate": 360,
                "pushRate": 360
            }
        ],
        "pushRate": 1
    },
    "_bridge": {
        "username": "deleted"
    },
    "platform": "SwitchBot"
}
```


### Screenshots

_No response_

### Device and Model

Switch Bot Hub2, Bot and Sensors

### Node.js Version

v20.18.0

### NPM Version

N/A

### Homebridge Version

v1.8.4

### Homebridge Switchbot Plugin Version

v4.0.0

### Homebridge Config UI X Plugin Version

v4.61.0

### Operating System

Docker