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
243 stars 53 forks source link

Constantly “Updating” #273

Closed dampney closed 2 years ago

dampney commented 2 years ago

Describe The Bug

SwitchBots are constantly “Updating” in Homekit.

To Reproduce

3 SwitchBots on a Hub Mini, with this plugin installed on Hoobs for Homekit support

Expected behavior

Sometimes it takes a few seconds for “updating” to finish, others it never finishes.

Relevant log output

17/1/2022, 10:20:52 amSwitchbot BridgeInitializing HAP-NodeJS v0.9.4...
17/1/2022, 10:21:22 amSwitchbot BridgeERRORThe plugin "homebridge-switchbot" requires a Homebridge version of ^1.3.9 which does not satisfy the current Homebridge version of 1.3.4. You may need to update this plugin (or Homebridge) to a newer version. You may face unexpected issues or stability problems running this plugin.
17/1/2022, 10:21:24 amSwitchbot BridgeLoaded plugin '@switchbot/homebridge-switchbot'
17/1/2022, 10:21:24 amSwitchbot BridgeLoading 1 platforms...
17/1/2022, 10:21:24 amSwitchbot BridgeSwitchBotLoading accessory from cache: Intercom Lock
17/1/2022, 10:21:24 amSwitchbot BridgeSwitchBotLoading accessory from cache: Fan
17/1/2022, 10:21:24 amSwitchbot BridgeSwitchBotLoading accessory from cache: Fan Wave
17/1/2022, 10:21:24 amSwitchbot BridgeSwitchBotLoading accessory from cache: Intercom Video
17/1/2022, 10:21:24 amSwitchbot BridgeRegistering platform '@switchbot/homebridge-switchbot.SwitchBot'
17/1/2022, 10:21:24 amSwitchbot BridgePreparing Advertiser for 'Switchbot Bridge B8C2' using bonjour-hap backend!
17/1/2022, 10:21:24 amSwitchbot BridgeBridge is running on port XXXXX.
17/1/2022, 10:21:24 amSwitchbot BridgeStarting to advertise 'Switchbot Bridge B8C2' using bonjour-hap backend!
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotTotal SwitchBot Devices Found: 4
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Intercom Video DeviceID: XXXXXXXXXXXX
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Intercom Lock DeviceID: XXXXXXXXXXXX
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotTotal IR Devices Found: 2
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Fan DeviceID: XX-XXXXXXXXXXXX-XXXXXXXX
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Fan Wave DeviceID: XX-XXXXXXXXXXXX-XXXXXXXX
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotWARNINGBot: Intercom Video Using Device Config Logging: standard
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotBot: Intercom Video Using Bot Mode: press
17/1/2022, 10:21:26 amSwitchbot BridgeSwitchBotBot: Intercom Video Displaying as Switch
17/1/2022, 10:21:27 amSwitchbot BridgeSwitchBotWARNINGBot: Intercom Lock Using Platform Config Logging: standard
17/1/2022, 10:21:27 amSwitchbot BridgeSwitchBotBot: Intercom Lock Using Bot Mode: press
17/1/2022, 10:21:27 amSwitchbot BridgeSwitchBotBot: Intercom Lock Displaying as Switch
17/1/2022, 10:21:27 amSwitchbot BridgeSwitchBotWARNINGFan: Fan Using Device Config Logging: standard
17/1/2022, 10:21:27 amSwitchbot BridgeSwitchBotWARNINGFan: Fan Wave Using Platform Config Logging: standard
17/1/2022, 10:34:37 amSwitchbot BridgeSwitchBotERRORBot: Intercom Lock failed refreshStatus with OpenAPI Connection
2/2/2022, 5:41:18 pmSwitchbot BridgeInitializing HAP-NodeJS v0.9.4...
2/2/2022, 5:41:22 pmSwitchbot BridgeERRORThe plugin "homebridge-switchbot" requires a Homebridge version of ^1.3.9 which does not satisfy the current Homebridge version of 1.3.4. You may need to update this plugin (or Homebridge) to a newer version. You may face unexpected issues or stability problems running this plugin.
2/2/2022, 5:41:34 pmSwitchbot BridgeLoaded plugin '@switchbot/homebridge-switchbot'
2/2/2022, 5:41:34 pmSwitchbot BridgeRegistering platform '@switchbot/homebridge-switchbot.SwitchBot'
2/2/2022, 5:41:34 pmSwitchbot BridgeLoading 1 platforms...
2/2/2022, 5:41:34 pmSwitchbot BridgeSwitchBotLoading accessory from cache: Intercom Lock
2/2/2022, 5:41:34 pmSwitchbot BridgeSwitchBotLoading accessory from cache: Fan
2/2/2022, 5:41:34 pmSwitchbot BridgeSwitchBotLoading accessory from cache: Fan Wave
2/2/2022, 5:41:34 pmSwitchbot BridgeSwitchBotLoading accessory from cache: Intercom Video
2/2/2022, 5:41:34 pmSwitchbot BridgePreparing Advertiser for 'Switchbot Bridge B8C2' using bonjour-hap backend!
2/2/2022, 5:41:35 pmSwitchbot BridgeStarting to advertise 'Switchbot Bridge B8C2' using bonjour-hap backend!
2/2/2022, 5:41:35 pmSwitchbot BridgeBridge is running on port XXXXX.
2/2/2022, 5:41:35 pmSwitchbot BridgeSwitchBotERRORFailed to Discover Devices
26/2/2022, 5:22:07 amSwitchbot BridgeInitializing HAP-NodeJS v0.9.4...
26/2/2022, 5:22:13 amSwitchbot BridgeERRORThe plugin "homebridge-switchbot" requires a Homebridge version of ^1.4.0 which does not satisfy the current Homebridge version of 1.3.4. You may need to update this plugin (or Homebridge) to a newer version. You may face unexpected issues or stability problems running this plugin.
26/2/2022, 5:22:16 amSwitchbot BridgeLoaded plugin '@switchbot/homebridge-switchbot'
26/2/2022, 5:22:16 amSwitchbot BridgeRegistering platform '@switchbot/homebridge-switchbot.SwitchBot'
26/2/2022, 5:22:16 amSwitchbot BridgeLoading 1 platforms...
26/2/2022, 5:22:16 amSwitchbot BridgeSwitchBotPlatform Config: {"logging":"standard","refreshRate":30}
26/2/2022, 5:22:16 amSwitchbot BridgePreparing Advertiser for 'Switchbot Bridge B8C2' using bonjour-hap backend!
26/2/2022, 5:22:16 amSwitchbot BridgeStarting to advertise 'Switchbot Bridge B8C2' using bonjour-hap backend!
26/2/2022, 5:22:16 amSwitchbot BridgeBridge is running on port XXXXX.
26/2/2022, 5:22:16 amSwitchbot BridgeSwitchBotERRORFailed to Discover Devices
26/2/2022, 11:41:56 amSwitchbot BridgeInitializing HAP-NodeJS v0.9.4...
26/2/2022, 11:41:58 amSwitchbot BridgeERRORThe plugin "homebridge-switchbot" requires a Homebridge version of ^1.4.0 which does not satisfy the current Homebridge version of 1.3.4. You may need to update this plugin (or Homebridge) to a newer version. You may face unexpected issues or stability problems running this plugin.
26/2/2022, 11:41:58 amSwitchbot BridgeLoaded plugin '@switchbot/homebridge-switchbot'
26/2/2022, 11:41:58 amSwitchbot BridgeRegistering platform '@switchbot/homebridge-switchbot.SwitchBot'
26/2/2022, 11:41:58 amSwitchbot BridgeLoading 1 platforms...
26/2/2022, 11:41:58 amSwitchbot BridgeSwitchBotPlatform Config: {"logging":"standard","refreshRate":30}
26/2/2022, 11:41:58 amSwitchbot BridgePreparing Advertiser for 'Switchbot Bridge B8C2' using bonjour-hap backend!
26/2/2022, 11:41:58 amSwitchbot BridgeStarting to advertise 'Switchbot Bridge B8C2' using bonjour-hap backend!
26/2/2022, 11:41:58 amSwitchbot BridgeBridge is running on port XXXXX.
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotTotal SwitchBot Devices Found: 5
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Intercom Video DeviceID: XXXXXXXXXXXX
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Coffee Machine DeviceID: XXXXXXXXXXXX
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Intercom Lock DeviceID: XXXXXXXXXXXX
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotTotal IR Devices Found: 2
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Fan DeviceID: XX-XXXXXXXXXXXX-XXXXXXXX
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotRestoring existing accessory from cache: Fan Wave DeviceID: XX-XXXXXXXXXXXX-XXXXXXXX
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotBot: Intercom Video Config: {"mode":"press","deviceType":"switch","doublePress":3,"logging":"standard"}
26/2/2022, 11:42:00 amSwitchbot BridgeSwitchBotBot: Intercom Video Displaying as Switch
26/2/2022, 11:42:01 amSwitchbot BridgeSwitchBotBot: Coffee Machine Config: {"mode":"press","deviceType":"switch","logging":"standard"}
26/2/2022, 11:42:01 amSwitchbot BridgeSwitchBotBot: Coffee Machine Displaying as Switch
26/2/2022, 11:42:02 amSwitchbot BridgeSwitchBotBot: Intercom Lock Config: {"mode":"press","deviceType":"switch","logging":"standard"}
26/2/2022, 11:42:02 amSwitchbot BridgeSwitchBotBot: Intercom Lock Displaying as Switch
26/2/2022, 11:42:02 amSwitchbot BridgeSwitchBotFan: Fan Config: {"swing_mode":true,"logging":"standard"}

Config for homebridge-switchbot

{
    "platform": "SwitchBot",
    "name": "SwitchBot",
    "credentials": {
        "notice": "Keep your token a secret!",
        "openToken": "xxxxxxx…"
    },
    "options": {
        "refreshRate": 30,
        "devices": [
            {
                "deviceId": "XXXXXXXXXXXX",
                "configDeviceName": "Intercom Lock",
                "configDeviceType": "Bot",
                "bot": {
                    "mode": "press",
                    "deviceType": "switch"
                },
                "ble": false,
                "logging": "standard"
            },
            {
                "deviceId": "XXXXXXXXXXXX",
                "configDeviceName": "Intercom Video",
                "configDeviceType": "Bot",
                "bot": {
                    "mode": "press",
                    "deviceType": "switch",
                    "doublePress": 3
                },
                "logging": "standard"
            },
            {
                "deviceId": "XXXXXXXXXXXX",
                "configDeviceName": "Coffee Machine",
                "configDeviceType": "Bot",
                "bot": {
                    "mode": "press",
                    "deviceType": "switch"
                },
                "logging": "standard"
            }
        ],
        "irdevices": [
            {
                "deviceId": "XX-XXXXXXXXXXXX-XXXXXXXX",
                "configRemoteType": "Fan",
                "irtv": {
                    "disable_power": true
                }
            },
            {
                "deviceId": "XX-XXXXXXXXXXXX-XXXXXXXX",
                "configRemoteType": "DIY Fan",
                "irfan": {
                    "swing_mode": true
                },
                "logging": "standard",
                "other": {
                    "deviceType": "Fan"
                }
            }
        ],
        "logging": "standard"
    }
}

Screenshots

8CE6B0ED-01F2-464B-8A68-5134EF042769

Device & Model

Homekit: 3 HomePod Hubs, iOS 15.3.1, iPadOS 15.3.1

Node.js Version

14.18.2

NPM Version

Homebridge Version

1.3.4

Homebridge Switchbot Plugin Version

1.12.15

Homebridge Config UI X Plugin Version

No response

Operating System

Hoobs 4.0.110

dampney commented 2 years ago

EDIT: The only solution I’ve found that works is rebooting the individual bridge the plugin is installed on - it seems to kick back into gear and works. I’ve tried reinstalling the plug-in numerous times.

donavanbecker commented 2 years ago

FYI, this plugin is developed for homebridge not HOOBs. So really able to reproduce this.

Can you switch to homebridge and see if the same thing happens?

github-actions[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

dampney commented 2 years ago

Late follow up:

I've switched to Homebridge installed on Mac Mini and it's working reliably now compared to Hoobs. There are times where one or two will go "offline" in the Home app but thats a Homekit issue, besides that it's reliable as HomeKit can be.

Thanks!