OpenWonderLabs / homebridge-switchbot

The Homebridge SwitchBot plugin allows you to access your SwitchBot Device(s) from HomeKit. Homebridge.
https://www.switch-bot.com/
ISC License
229 stars 47 forks source link

BUG: [SwitchBot] Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 #959

Closed mrlightison closed 3 weeks ago

mrlightison commented 2 months ago

Describe the Bug

When attempting to interact with WoIOSensor (Kitchen Sensor) and Smart Lock (LightBolt) devices using the homebridge-switchbot plugin, I receive an "Internal Server Error" with a status code of 500. Additionally, an "Unknown statusCode: undefined" error is logged. This suggests an unexpected error on the SmartThings servers.

To Reproduce

  1. Install and configure the homebridge-switchbot plugin.
  2. Add WoIOSensor (Kitchen Sensor) and Smart Lock (LightBolt) devices to the configuration.
  3. Observe the error logs when Homebridge attempts to interact with these devices.

Expected Behavior

The plugin should successfully interact with the WoIOSensor and Smart Lock devices without encountering server errors.

Relevant Log Output

[4/7/2024, 12:10:02 AM] [SwitchBot] WoIOSensor: Kitchen Sensor Internal Server Error,   An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500
[4/7/2024, 12:10:02 AM] [SwitchBot] WoIOSensor: Kitchen Sensor Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug
[4/7/2024, 12:10:13 AM] [SwitchBot] Smart Lock: LightBolt Internal Server Error,        An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500
[4/7/2024, 12:10:13 AM] [SwitchBot] Smart Lock: LightBolt Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug
[4/7/2024, 12:25:15 AM] [SwitchBot] Internal Server Error,      An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500
[4/7/2024, 12:25:15 AM] [SwitchBot] Unknown statusCode, statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "token": "REDACTED",
        "secret": "REDACTED",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "devices": [
            {
                "deviceId": "REDACTED",
                "configDeviceName": "Kitchen Sensor",
                "hide_device": false,
                "configDeviceType": "WoIOSensor",
                "connectionType": "OpenAPI",
                "webhook": true,
                "lock": {
                    "activate_latchbutton": false
                },
                "history": true,
                "firmware": "0.4",
                "external": true
            },
            {
                "deviceId": "REDACTED",
                "configDeviceName": "LightBolt",
                "hide_device": false,
                "configDeviceType": "Smart Lock",
                "connectionType": "OpenAPI",
                "webhook": true,
                "lock": {
                    "activate_latchbutton": false
                },
                "firmware": "2.1.1",
                "refreshRate": 20,
                "external": false,
                "logging": "standard"
            },
            {
                "deviceId": "REDACTED",
                "configDeviceName": "LightHub 2",
                "hide_device": true,
                "lock": {
                    "activate_latchbutton": false
                }
            }
        ],
        "refreshRate": 60
    },
    "_bridge": {
        "username": "REDACTED,"
        "port": REDACTED
    },
    "platform": "SwitchBot"
}

Screenshots

No response

Device and Model

Outdoor Thermohygrometer, SmartLock

Node.js Version

v20.12.1

NPM Version

v10.5.0

Homebridge Version

v1.7.0

Homebridge Switchbot Plugin Version

v3.4.0

Homebridge Config UI X Plugin Version

v4.56.1

Operating System

macOS

cjtylr commented 2 months ago

Just adding a +1 to this - seeing the same thing in my instance. Let me know if there are any helpful details I can provide.

donavanbecker commented 2 months ago

Sorry nothing I can do about this. This is all the SwitchBot API. SwitchBot will have to resolve this.

And no I don't work for switchBot, I just manage this plugin.

twentyNoise commented 2 months ago

I just updated to 3.4.0 from 2.12.1 and had this error. I rolled back to 2.12.1 and things are fine again.

JeremyLaurenson commented 2 months ago

I see a ton of these and my blinds do not operate reliably anymore:

Maybe a backoff/retry loop in there?

[4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 1 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 1 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 2 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 2 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 3 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 3 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 4 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:19:34 AM] [SwitchBot] Blind Tilt: Blind 4 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:19:54 AM] [HttpWebHooks] Change HomeKit value for temperature sensor to '25.625'. [4/30/2024, 6:19:58 AM] [Lutron] Button /button/178 on Pico remote Jeremy office Controller Pico got action Press [4/30/2024, 6:19:58 AM] [Lutron] Button /button/178 on Pico remote Jeremy office Controller Pico got action Release [4/30/2024, 6:19:59 AM] [Lutron] button /button/178 got a short press [4/30/2024, 6:20:02 AM] [HttpWebHooks] Change HomeKit value for temperature sensor to '20.013'. [4/30/2024, 6:20:03 AM] [HttpWebHooks] Change HomeKit value for humidity sensor to '49.95829564303247'. [4/30/2024, 6:20:03 AM] [HttpWebHooks] Change HomeKit value for temperature sensor to '19.910'. [4/30/2024, 6:20:03 AM] [HttpWebHooks] Change HomeKit value for humidity sensor to '92.4650363188'. [4/30/2024, 6:20:07 AM] [HttpWebHooks] Change HomeKit value for humidity sensor to '25.73'. [4/30/2024, 6:20:31 AM] [SwitchBot] Blind Tilt: Blind 1 Checking Status ... [4/30/2024, 6:20:33 AM] [SwitchBot] Blind Tilt: Blind 2 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:20:33 AM] [SwitchBot] Blind Tilt: Blind 2 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:20:34 AM] [HttpWebHooks] Change HomeKit value for temperature sensor to '25.5625'. [4/30/2024, 6:20:34 AM] [SwitchBot] Blind Tilt: Blind 2 Checking Status ... [4/30/2024, 6:20:36 AM] [SwitchBot] Blind Tilt: Blind 4 Checking Status ... [4/30/2024, 6:20:48 AM] [SwitchBot] Blind Tilt: Blind 2 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:20:48 AM] [SwitchBot] Blind Tilt: Blind 2 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:20:54 AM] [SwitchBot] Blind Tilt: Blind 1 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:20:54 AM] [SwitchBot] Blind Tilt: Blind 1 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:20:54 AM] [SwitchBot] Blind Tilt: Blind 1 Checking Status ... [4/30/2024, 6:20:56 AM] [SwitchBot] Blind Tilt: Blind 2 Internal Server Error, An unexpected error on the SmartThings servers has occurred. These errors should be rare, statusCode: 500 [4/30/2024, 6:20:56 AM] [SwitchBot] Blind Tilt: Blind 2 Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug [4/30/2024, 6:21:01 AM] [HttpWebHooks] Change HomeKit value for temperature sensor to '20.018'. [4/30/2024, 6:21:01 AM] [HttpWebHooks] Change HomeKit value for humidity sensor to '49.807790798316574'.

sametguzeldev commented 2 months ago

I just updated to 3.4.0 from 2.12.1 and had this error. I rolled back to 2.12.1 and things are fine again.

I am thinking about rolling back as well. Maybe older version of this plugin is using an older version of Switchbot API?

JeremyLaurenson commented 2 months ago

The alternate option I suppose is to look at the new Switchbot Hub that supports Matter

twentyNoise commented 2 months ago

The alternate option I suppose is to look at the new Switchbot Hub that supports Matter

I bought the new Hub when it was released specifically for this purpose, but it's unfortunately useless for me because the Switchbot Bots / Button Pushers will only show up in HomeKit (through Matter) as a Light Switch. So it defeats the whole purpose of the Bot and the different types of Press States etc. Switchbot says it's a Matter limitation right now.

evanedinger commented 2 months ago

I just updated to 3.4.0 from 2.12.1 and had this error. I rolled back to 2.12.1 and things are fine again.

I am thinking about rolling back as well. Maybe older version of this plugin is using an older version of Switchbot API?

I just rolled back from 3.4.0 to 2.12.1 and I now have access to my tilt blinds again. I thought it might be a hangup from switching from a docker(container) instance of homebridge to native on DS7, but it seems that's coincidental timing

JeremyLaurenson commented 2 months ago

I tried 2.12.1 and see the same lack of errors and better reliability.... of what its worth

jrolfs commented 2 months ago

Thank you very much y'all, 2.12.1 also saved my bacon.

nnhoang commented 2 months ago

Reverting to v3.1.3 also worked for me. After reverting the errors disappeared and IR worked again.

JordanOsterberg commented 2 months ago

For what it's worth, I reverted to 2.12.1 and I'm still seeing the 500 error with my SwitchBot curtains. Only getting it when attempting to change state (i.e. open/close). I get 200s back when polling their status. Seems to just be my curtains though- I have a SwitchBot which has been working fine despite the curtain issue.

[5/2/2024, 4:39:36 AM] [SwitchBot] [DEBUG] Curtain: Curtains deviceStatus: {"message":"Internal server error"}
[5/2/2024, 4:39:36 AM] [SwitchBot] [DEBUG] Curtain: Curtains deviceStatus body: undefined
[5/2/2024, 4:39:36 AM] [SwitchBot] [DEBUG] Curtain: Curtains deviceStatus statusCode: undefined
[5/2/2024, 4:39:36 AM] [SwitchBot] Curtain: Curtains Unknown statusCode: 500, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug
[5/2/2024, 4:39:36 AM] [SwitchBot] Curtain: Curtains Unknown statusCode: undefined, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug

Edit: Also reset my developer token from the app and no dice.

mrlightison commented 2 months ago

I also reverted to 2.12.1 and I'm still seeing the 500 error with my Smart Lock Series 1.

sametguzeldev commented 2 months ago

This is an issue directly with Switchbot API v1.1. I've tested it myself on Postman and I saw the same 500 status code. image

I did the same test on Switchbot API v1.0 and that seemed to be working. Haven't received any 500 status code but I did not test it that much since I have Curtain 3 and it only works with Switchbot API v1.1 What I saw was if you try to do the request again after a while it succeeds. So I implemented a retry mechanism myself and it worked. Received status code 100 after several tries.

image

donavanbecker commented 2 months ago

Nice @sametguzeldev, would you be willing to submit a PR?

sametguzeldev commented 2 months ago

I am not a typescript expert at all 😄 I only changed it for Curtain device and modified openAPIRefreshStatus method just to test the theory. I think it would be better if we can wrap the request function completely and handle this retry mechanism directly inside the request and put maximumRetry and delayBetweenRetries inside config settings or something. Here is the code that I modified. But this is a bad practice to apply one by one to all devices and all openApi methods.

async openAPIRefreshStatus(): Promise<void> {
    this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} openAPIRefreshStatus`);
    let retryCount = 0;
    const maxRetries = 5; // Maximum number of retries
    const delayBetweenRetries = 5000; // Delay between retries in milliseconds
    while (retryCount < maxRetries) {
      try {
        const { body, statusCode } = await request(`${Devices}/${this.device.deviceId}/status`, {
          headers: this.platform.generateHeaders(),
        });
        this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
        const deviceStatus: any = await body.json();
        this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
        this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
        if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
          this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
            + `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
          this.OpenAPI_CurrentPosition = deviceStatus.body.slidePosition;
          this.OpenAPI_InMotion = deviceStatus.body.moving;
          this.OpenAPI_CurrentAmbientLightLevel = deviceStatus.body.brightness;
          this.OpenAPI_BatteryLevel = deviceStatus.body.battery;
          this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
          this.openAPIparseStatus();
          this.updateHomeKitCharacteristics();
          break;
        } else {
          this.statusCode(statusCode);
          this.statusCode(deviceStatus.statusCode);
          if (statusCode === 500) {
            retryCount++;
            this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName}statusCode: ${statusCode} Attempt ${retryCount} of ${maxRetries}`);
            await sleep(delayBetweenRetries);
          }
        }
      } catch (e: any) {
        retryCount++;
        this.apiError(e);
        this.errorLog(
          `${this.device.deviceType}: ${this.accessory.displayName} failed openAPIRefreshStatus with ${this.device.connectionType}` +
          ` Connection, Error Message: ${JSON.stringify(e.message)}`,
        );
      }
    }
  }
donavanbecker commented 2 months ago

Thanks, I will see what I can do

sametguzeldev commented 2 months ago

@donavanbecker Since I saw every device has access to platform, I wrote this function to platform.ts file. (logs can be removed) For some reason when I build the library locally, the plugin's config does not open for me visually so I put maxRetries and delayBetweenRetries inside this function. I am also making it retry even if an error happens, maybe we could just break the loop there as well.

  async retryRequest(url: string | URL | UrlObject,
    options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions,
      'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>): Promise<{ body: any; statusCode: number }> {
    let retryCount = 0;
    const maxRetries = 5; // Maximum number of retries
    const delayBetweenRetries = 3000; // Delay between retries in milliseconds
    while (retryCount < maxRetries) {
      try {
        const { body, statusCode } = await request(url, options);
        if (statusCode === 200 || statusCode === 100) {
          return { body, statusCode };
        } else {
          this.debugLog(`Received status code: ${statusCode}`);
        }
      } catch (error: any) {
        this.errorLog(`Error making request: ${error.message}`);
      }
      retryCount++;
      this.debugLog(`Retry attempt ${retryCount} of ${maxRetries}`);
      await sleep(delayBetweenRetries);
    }
    return { body: null, statusCode: -1 };
  }

then I made all devices to call this method. For example for openAPIRefreshStatus, it became from

const { body, statusCode } = await request(`${Devices}/${this.device.deviceId}/status`, {
        headers: this.platform.generateHeaders(),
      });

to

const { body, statusCode } = await this.platform.retryRequest(`${Devices}/${this.device.deviceId}/status`, {
        headers: this.platform.generateHeaders(),
      });

I'll be running it like this on my environment for now. Maybe this could give you some kind of idea to how to implement it better.

donavanbecker commented 2 months ago

Thanks @sametguzeldev, I have added this to the latest beta. maxRetries and delayBetweenRetries are both customizable in the config.

nyjklein commented 1 month ago

I've been getting these unknown statuscode errors constantly across all my devices (meters, curtains, etc.) on v3.4.0. (had opened a separate issue a while ago). The latest beta V3.5.0-beta22 seems to have fixed it.

Thanks!

Ave87 commented 1 month ago

Been following this for a while. Thanks for the input and progress so far! The 500 errors are now gone. However, after updating to the newest beta’s .22 and .23 my curtains are unresponsive.

Fresh install from 3.4.0 will detect the hub mini and curtains after inputting token with intermittent issues and 500 errors

Updating from 3.4.0 to the beta’s results in the curtains being unresponsive.

Fresh beta install .22 and .23 will not detect the hub mini and curtains

mrlightison commented 1 month ago

Same for me with the Smart Lock. The 500 errors are solved, but newest betas .22 and .23 cause the Lock to become entirely unresponsive. Similar troubleshooting re: version installations yields the same result. Fresh install from 3.4.0 will detect the hub mini and curtains after inputting token with intermittent issues and 500 errorsUpdating from 3.4.0 to the beta’s results in the curtains being unresponsive.Fresh beta install .22 and .23 will not detect the hub mini and curtainsOn May 7, 2024, at 3:27 AM, Ave87 @.***> wrote: Been following this for a while. Thanks for the input and progress so far! The 500 errors are now gone. However, after updating to the newest beta’s .22 and .23 my curtains are unresponsive. Fresh install from 3.4.0 will detect the hub mini and curtains after inputting token with intermittent issues and 500 errors Updating from 3.4.0 to the beta’s results in the curtains being unresponsive. Fresh beta install .22 and .23 will not detect the hub mini and curtains

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

sametguzeldev commented 1 month ago

I am not using the latest beta. I am still using my own solution and I can confirm my Smart Lock and my Curtain 3 are still working. If you want @donavanbecker I can install the beta version and see how it interacts with my devices? I can enable debug and check it out.

nyjklein commented 1 month ago

500 errors gone, but curtains unresponsive on the latest betas as ave87 posted.

donavanbecker commented 1 month ago

I am not using the latest beta. I am still using my own solution and I can confirm my Smart Lock and my Curtain 3 are still working. If you want @donavanbecker I can install the beta version and see how it interacts with my devices? I can enable debug and check it out.

Yes please

donavanbecker commented 1 month ago

500 errors gone, but curtains unresponsive on the latest betas as ave87 posted.

Do you have logs?

nyjklein commented 1 month ago

Yes. Logs attached. I've enabled debug logging. Logs don't seem to show much. Not only are my curtains unresponsive, but even my meters don't seem to be updating.
@switchbot_homebridge-switchbot.log (1).txt

sametguzeldev commented 1 month ago

Yes. Logs attached. I've enabled debug logging. Logs don't seem to show much. Not only are my curtains unresponsive, but even my meters don't seem to be updating. @switchbot_homebridge-switchbot.log (1).txt

I think you need to run it for a while for it to trigger openAPIRefreshStatus and also try execute some stuff on the curtain. If this log is sent after you've tried to execute some stuff on the curtain device, than the request is not going through at all

sametguzeldev commented 1 month ago

From my testing, sometimes even 5 tries are not enough. (Max tries = 5, delay = 3 seconds) This is from my own solution. I'll try the beta now. image

sametguzeldev commented 1 month ago

@donavanbecker I can confirm nothing is responding. I don't see any request log to anything in debug mode when using the latest beta.

donavanbecker commented 1 month ago

maxRetries are configurable per device, so you can set a different max on each one.

sametguzeldev commented 1 month ago

I don't even see the discovery running at all. When I rolled back to 3.4.0 version, I saw these logs. But on beta version, never saw these logs at all.

[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Contact Sensor: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Bot: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Device: Main Keypad with Device Type: Keypad Touch, is currently not supported.
[5/7/2024, 8:33:09 PM] [SwitchBot] Submit Feature Requests Here: https://tinyurl.com/SwitchBotFeatureRequest
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Smart Lock: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Hub Mini: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Meter: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Curtain3 Bedroom Curtain: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Meter: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Bot: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Hub Mini: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Hub Mini: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Motion Sensor: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Discovered Contact Sensor: xxx
[5/7/2024, 8:33:09 PM] [SwitchBot] Total SwitchBot Devices Found: 13
nyjklein commented 1 month ago

Yes. Logs attached. I've enabled debug logging. Logs don't seem to show much. Not only are my curtains unresponsive, but even my meters don't seem to be updating. @switchbot_homebridge-switchbot.log (1).txt

I think you need to run it for a while for it to trigger openAPIRefreshStatus and also try execute some stuff on the curtain. If this log is sent after you've tried to execute some stuff on the curtain device, than the request is not going through at all

Looks like nothing is getting through at all. No matter how many times I try to manipulate the curtains

nyjklein commented 1 month ago

So I just increased "Max Retries for OpenAPI" in advanced settings from 5 to 15, restarted the bridge and I'm back in action!

log excerpt: [07/05/2024, 14:52:59] [SwitchBot] Launched child bridge with PID 497782 [07/05/2024, 14:53:02] Registering platform '@switchbot/homebridge-switchbot.SwitchBot' [07/05/2024, 14:53:02] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.5.0-beta.23 child bridge successfully [07/05/2024, 14:53:02] Loaded 9 cached accessories from cachedAccessories.0E524B5C18A9. [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Platform Config: {"logging":"debug"} [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Using Config Logging: debug [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Plugin Version: 3.5.0-beta.23 [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Finished initializing platform: SwitchBot [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Verifying Config [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Platform Config: {"logging":"debug"} [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Using Default Refresh Rate (2 minutes). [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Using Default Push Rate. [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Using Default Delay Between Retries. [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Config OK [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Outdoor Meter SwB [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Dining Room SwB [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Bedroom SwBP [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Motion Sensor 2E [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Small Bathroom SwB [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Main Bathroom SwB [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Living Room SwBP [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Office SwBP [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Loading accessory from cache: Living Room Curtain [07/05/2024, 14:53:02] [SwitchBot] [DEBUG] Executed didFinishLaunching callback [07/05/2024, 14:53:02] Homebridge v1.8.1 (HAP v0.12.0) (SwitchBot) is running on port 55335. [07/05/2024, 14:53:03] [SwitchBot] [DEBUG] statusCode: 200 [07/05/2024, 14:53:03] [SwitchBot] [DEBUG] devicesAPI: {"statusCode":100,"body":{"deviceList":[{"deviceId":"C3C2 2D5491D3","deviceName":"Living Room Hub 2","deviceType":"Hub 2","enableCloudService":true,"hubDeviceId":"000000000000"},{"deviceId": "C93E0238D1B2","deviceName":"Curtain B2","deviceType":"Curtain","hubDeviceId":"000000000000","curtainDevicesIds":["FD1E6D06B532","C9 3E0238D1B2"],"calibrate":false,"group":true,"master":false,"openDirection":"right"},{"deviceId":"CFD41B916DA3","deviceName":"Outdoor Meter SwB","deviceType":"WoIOSensor","enableCloudService":true,"hubDeviceId":"C3C22D5491D3"},{"deviceId":"E0C8750159BB","deviceName ":"Dining Room SwB","deviceType":"Meter","enableCloudService":true,"hubDeviceId":"C3C22D5491D3"},{"deviceId":"E3D163DE2E31","deviceN ame":"Bedroom SwBP","deviceType":"MeterPlus","enableCloudService":true,"hubDeviceId":"C3C22D5491D3"},{"deviceId":"EBA08112E12E","dev iceName":"Motion Sensor 2E","deviceType":"Motion Sensor","enableCloudService":true,"hubDeviceId":"C3C22D5491D3"},{"deviceId":"F1BAF4 B4E58E","deviceName":"Small Bathroom SwB","deviceType":"Meter","enableCloudService":true,"hubDeviceId":"C3C22D5491D3"},{"deviceId":"

Ave87 commented 1 month ago

Setting the retries to 15 resulted in my curtains being discovered again. They are now responsive and mostly functional again.

This morning the curtains remained closed when they should be open. In the log there was another 500 error again. So previously mentioned fixes did not completely solve the issues

julioviegas commented 1 month ago

Confirmed from my side too, the beta is not working at all. I'm now using native SwitchBot automations and app until this gets solved.

palancana commented 1 month ago

I had the same issue, using an Smart Lock and Hub 2:

Node.js Version: v20.12.1 Homebridge Version: v1.8.1 Homebridge Switchbot Plugin Version: v3.4.0 Smart Lock Firmware Version: V6.6

BUT it got fixed yesterday night after an update of the Smart Lock firmware to version V6.8.

github-actions[bot] commented 4 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 weeks ago

This issue has been closed as no further activity has occurred.