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

Support Request: No devices through OpenAPI #261

Closed EricSabe closed 2 years ago

EricSabe commented 2 years ago

Describe Your Problem

SwitchBot devices no longer appear in Homebridge. Everything works fine through the iOS App. The SwitchBot plugin was working fine and several Meters and Motion sensors were present up until I started troubleshooting the Motion sensor events last night. I have removed/reinstalled the plugin, cleared the device cache, and created a new token. Still nothing in Homebridge.

Relevant log output

[2/12/2022, 2:00:17 PM] [SwitchBot] Initializing SwitchBot platform...
[2/12/2022, 2:00:17 PM] [SwitchBot] Using Config Logging: debug
[2/12/2022, 2:00:17 PM] [SwitchBot] [DEBUG] Finished initializing platform:
[2/12/2022, 2:00:17 PM] [SwitchBot] Platform Config: {"logging":"debug"}
[2/12/2022, 2:00:17 PM] [SwitchBot] "The devices config section is missing the *Device ID* in the config, Check Your Conifg."
[2/12/2022, 2:00:17 PM] [SwitchBot] {}

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "openToken": [Redacted],
                "notice": "Keep your token a secret!"
            },
            "options": {
                "devices": [
                    {
                        "logging": "standard"
                    }
                ],
                "irdevices": [
                    {
                        "logging": "standard"
                    }
                ],
                "logging": "debug"
            },
            "platform": "SwitchBot"
        }

Screenshots

No response

Device & Model

SwitchBot Hub Mini + Original Meter and Motion sensors

Node.js Version

v16.13.2

NPM Version

v8.1.2

Homebridge Version

v1.4

Homebridge SwitchBot Plugin Version

v1.12.3

Homebridge Config UI X Plugin Version

v4.42.0

Operating System

Alpine Linux (3.12.9) (Docker on Synology)

EricSabe commented 2 years ago

On the troubleshooting - Using Nodered to sense occupancy across SwitchBot, Nest Protect, and UniFi motion sensors and control the states of TP-Link Kasa switches. Noticed the lights were going out where only SwitchBot motion sensors were present. They were popping notifications in the iOS app, but those events weren't coming through the Homebridge status node in Nodered. Tried reducing API polling to 30, repositioning the sensor, etc. I can see an active state between the Hub Mini and the SwitchBot service in pfSense and I can control devices through the SwitchBot iOS app. So, first I removed/reinstalled the Homebridge switchbot plugin... then I reset the device cache... then I reset the Switchbot token... all the while restarting HB several times and watching the logs.

EricSabe commented 2 years ago

Wondering if I somehow hit the 10k API calls/day limit.

image

donavanbecker commented 2 years ago

Remove your device and irdevice config section and restart. I need to make a change to correct that.

EricSabe commented 2 years ago

Seems to be working now. I installed the beta plugin, but I don't know if that did anything - might have also hit the 24-hour mark on the API request limit.

donavanbecker commented 2 years ago

the latest version will not default logging configs:

"options": {
                "devices": [
                    {
                        "logging": "standard"
                    }
                ],
                "irdevices": [
                    {
                        "logging": "standard"
                    }
                ],
                "logging": "debug"
            },