Closed aws-chris closed 17 hours ago
Also seeing this error with certain configs (for example, setting the deviceID to that of the bot)
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] statusCode: 200
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] devicesAPI: {"statusCode":100,"body":{"deviceList":[{"deviceId":"C713C4321CEA","deviceName":"Espresso Bot","deviceType":"Bot","enableCloudService":true,"hubDeviceId":"E95CEE348AC9"},{"deviceId":"E95CEE348AC9","deviceName":"Espresso Hub","deviceType":"Hub Mini","hubDeviceId":"000000000000"}],"infraredRemoteList":[]},"message":"success"}
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] devicesAPI Body: {"deviceList":[{"deviceId":"C713C4321CEA","deviceName":"Espresso Bot","deviceType":"Bot","enableCloudService":true,"hubDeviceId":"E95CEE348AC9"},{"deviceId":"E95CEE348AC9","deviceName":"Espresso Hub","deviceType":"Hub Mini","hubDeviceId":"000000000000"}],"infraredRemoteList":[]}
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] devicesAPI StatusCode: 100
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] statusCode: 200 & devicesAPI StatusCode: 100
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] DeviceLists: [{"deviceId":"C713C4321CEA","deviceName":"Espresso Bot","deviceType":"Bot","enableCloudService":true,"hubDeviceId":"E95CEE348AC9"},{"deviceId":"E95CEE348AC9","deviceName":"Espresso Hub","deviceType":"Hub Mini","hubDeviceId":"000000000000"}]
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] DeviceLists Length: 2
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] SwitchBot Device Config Set: [{"deviceId":"C7:13:C4:32:1C:EA","configDeviceName":"Espresso Bot","configDeviceType":"Bot","connectionType":"BLE","bot":{"mode":"press","deviceType":"switch"},"refreshRate":30,"logging":"debug"}]
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] SwitchBot Devices: [{"deviceId":"C713C4321CEA","configDeviceName":"Espresso Bot","configDeviceType":"Bot","connectionType":"BLE","bot":{"mode":"press","deviceType":"switch"},"refreshRate":30,"logging":"debug","deviceName":"Espresso Bot","deviceType":"Bot","enableCloudService":true,"hubDeviceId":"E95CEE348AC9"},{"deviceId":"E95CEE348AC9","deviceName":"Espresso Hub","deviceType":"Hub Mini","hubDeviceId":"000000000000"}]
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Discovered Bot: C713C4321CEA
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Discovered Hub Mini: E95CEE348AC9
[7/29/2024, 12:48:38 PM] [SwitchBot] Total SwitchBot Devices Found: 2
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] IR Device Config Not Set: undefined
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Total IR Devices Found: 0
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Device: Espresso Bot registerDevice: true
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Device: Espresso Bot connectionType: BLE, will display in HomeKit
[7/29/2024, 12:48:38 PM] [SwitchBot] Restoring existing accessory from cache: Espresso Bot deviceId: C713C4321CEA
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Device Config Logging: debug
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Device Config refreshRate: 30, Default updateRate: 5, Platform Config pushRate: 0.1
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Default Max Retries: 5, Default Delay Between Retries: 3000
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Model: SwitchBot S1, BLE Model: H, BLE Model Name: WoHand, BLE Model Friendly Name: Bot
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Default scanDuration: 5
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Default MQTT URL: , Default mqttOptions: {}, Default mqttPubOptions: {}
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Displaying as Switch
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Fan Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Lock Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Door Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Faucet Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Outlet Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Window Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Garage Door Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Window Covering Service
[7/29/2024, 12:48:38 PM] [SwitchBot] Bot: Espresso Bot Removing any leftover Stateful Programmable Switch Service
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Retrieve initial values and update Homekit
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot BLERefreshStatus
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Registering Webhook Event Handler
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot is not listening webhook.
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot uuid: C713C4321CEA-Bot, (da86e9de-2981-4bd3-ac15-c5313ac40c22)
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Config: {"logging":"debug","refreshRate":30,"connectionType":"BLE","mode":"press","deviceType":"switch"}
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Device Type: switch, from Accessory Cache.
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Firmware Version: 3.7.0
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot is using Device BLE Scanning.
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot version: 3.7.0
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Bot Mode: switch, from Accessory Cache.
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Double Press: 1, from Accessory Cache.
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Using Push Rate Press: 15, from Accessory Cache.
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot No Allow Push Set, Using default Allow Push: false
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Multi Press Count: 0
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot 'node-switchbot' found: [object Object]
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot BLE Address: c7:13:c4:32:1c:ea
[7/29/2024, 12:48:38 PM] [SwitchBot] [DEBUG] Bot: Espresso Bot Scanning for WoHand devices...
[7/29/2024, 12:48:38 PM] Error: Failed to initialize the Noble object: unauthorized
at Noble.<anonymous> (file:///Users/chris/.nvm/versions/node/v18.17.0/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/node-switchbot/src/switchbot.ts:244:19)
at Object.onceWrapper (node:events:629:26)
at Noble.emit (node:events:514:28)
at Noble.onStateChange (/Users/chris/.nvm/versions/node/v18.17.0/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/noble.js:92:8)
at NobleMac.emit (node:events:514:28)
[7/29/2024, 12:48:38 PM] Got SIGTERM, shutting down Homebridge...
I see that the referenced file and parent directory don't exist on my filesystem:
$ pwd
/Users/chris/.nvm/versions/node/v18.17.0/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/node-switchbot
$ ls
CHANGELOG.md LICENSE README.md dist docs eslint.config.js package.json typedoc.json
Oh, does homebridge now need to be run as root
for this to work?
That did it! Thanks so much!
Chris
Describe Your Problem
Hi, I had this configuration (Homebridge -> Hub Mini -> Bot) working a couple of years ago, but have since removed the homebridge-switchbot plugin from Homebridge as I no longer needed the bot. In any case, it was working fine back then. I have since found a new use for the bot, but just can't seem to get it to work again. The config is almost identical to what it was when it was working. All I see though in the Homebridge accessories is a tile with "Espresso Bot Battery Not Chargeable" and nothing in HomeKit.
Relevant log output
But this at the 30 refresh rate:
Config for homebridge-switchbot
Screenshots
Device & Model
Switchbot Bot, Switchbot Hub Mini
Node.js Version
v18.17.0
NPM Version
10.2.5
Homebridge Version
v1.8.4
Homebridge SwitchBot Plugin Version
v3.7.0
Homebridge Config UI X Plugin Version
v4.56.4
Operating System
macOS