kopiro / homebridge-tapo-camera

Homebridge plugin for TP-Link TAPO security cameras
ISC License
129 stars 11 forks source link

Frequent "StokRefresh: Temporary Suspension" Errors Despite High Pull Interval #155

Closed denis08stgt closed 2 weeks ago

denis08stgt commented 1 month ago

Describe The Bug:

I am experiencing frequent "StokRefresh: Temporary Suspension" errors with my Tapo camera using the homebridge-tapo-camera plugin. Despite setting a high pullInterval, my console is getting spammed with these errors. Additionally, I'm seeing unhandled error messages related to the characteristic 'On'. The plugin updates the cameras despite the errors, and they work perfectly fine in Apple Home. The errors are just showing up without any apparent reason. Streaming also works flawlessly.

To Reproduce:

  1. Configure the plugin with the provided settings.
  2. Start Homebridge and observe the console logs.
  3. Notice frequent "StokRefresh: Temporary Suspension" errors.

Expected behavior:

The plugin should handle API rate limits more gracefully and not spam the console with frequent errors.

Logs:

[7.8.2024, 15:02:12] [Terrasse] Error when retrieving data Error: StokRefresh: Temporary Suspension: Try again in 607 seconds
    at TAPOCamera.refreshStok (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:276:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getAuthenticatedAPIURL (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:349:19)
    at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:429:23
    at TAPOCamera.getStatus (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:612:26)
    at CameraAccessory.getStatusAndNotify (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:205:28)
[7.8.2024, 15:06:51] [homebridge-tapo-camera] This plugin threw an error from the characteristic 'On': Unhandled error thrown inside read handler for characteristic: StokRefresh: Temporary Suspension: Try again in 1274 seconds. See https://homebridge.io/w/JtMGR for more info.

Plugin Config:

{
    "cameras": [
        {
            "name": "Hof",
            "ipAddress": "192.168.178.174",
            "username": "/",
            "password": "/",
            "streamUser": "/",
            "streamPassword": "/",
            "pullInterval": 15000,
            "eyesToggleAccessoryName": "Privatsphäre-Modus",
            "alarmToggleAccessoryName": "Alarm",
            "notificationsToggleAccessoryName": "Benachrichtigungen",
            "motionDetectionToggleAccessoryName": "Bewegungserkennung",
            "ledToggleAccessoryName": "LED"
        },
        {
            "name": "Terrasse",
            "ipAddress": "192.168.178.129",
            "username": "/",
            "password": "/",
            "streamUser": "/",
            "streamPassword": "/",
            "pullInterval": 15000,
            "debug": false,
            "eyesToggleAccessoryName": "Privatsphäre-Modus",
            "alarmToggleAccessoryName": "Alarm",
            "notificationsToggleAccessoryName": "Benachrichtigungen",
            "motionDetectionToggleAccessoryName": "Bewegungserkennung",
            "ledToggleAccessoryName": "LED"
        }
    ],
    "_bridge": {
        "username": "0E:84:7A:7E:E1:6E",
        "port": 37974
    },
    "platform": "tapo-camera"
}

Screenshots:

https://prnt.sc/t4MC_ZEm1T85 <- Getting spammed with these Errors. https://prnt.sc/WZ2ZwvuCzxvF <- Works totally fine in App.

Environment:

denis08stgt commented 1 month ago

As I just saw, the buttons do not work in the home app.

denis08stgt commented 1 month ago

Sorry, missclick!

lebence commented 1 month ago
[8/8/2024, 5:14:34 PM] Error: Invalid device confirm
    at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:213:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:340:7)
    at TAPOCamera.getAuthenticatedAPIURL (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:348:19)
    at /homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:429:23
    at TAPOCamera.getStatus (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:612:26)
    at CameraAccessory.getStatusAndNotify (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:204:26)

[8/8/2024, 5:14:35 PM] Got SIGTERM, shutting down Homebridge...

[8/8/2024, 5:14:35 PM] Error: StokRefresh: Temporary Suspension: Try again in 41 seconds
    at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:276:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:340:7)
    at TAPOCamera.getAuthenticatedAPIURL (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:348:19)
    at /homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:429:23
    at TAPOCamera.getStatus (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:612:26)
    at CameraAccessory.getStatusAndNotify (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:204:26)

This is my errror message. HB keeps restarting because of this

Edit: version 2.4.3

denis08stgt commented 1 month ago
[8/8/2024, 5:14:34 PM] Error: Invalid device confirm
    at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:213:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:340:7)
    at TAPOCamera.getAuthenticatedAPIURL (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:348:19)
    at /homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:429:23
    at TAPOCamera.getStatus (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:612:26)
    at CameraAccessory.getStatusAndNotify (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:204:26)

[8/8/2024, 5:14:35 PM] Got SIGTERM, shutting down Homebridge...

[8/8/2024, 5:14:35 PM] Error: StokRefresh: Temporary Suspension: Try again in 41 seconds
    at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:276:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:340:7)
    at TAPOCamera.getAuthenticatedAPIURL (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:348:19)
    at /homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:429:23
    at TAPOCamera.getStatus (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:612:26)
    at CameraAccessory.getStatusAndNotify (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:204:26)

This is my errror message. HB keeps restarting because of this

Edit: version 2.4.3

Lol, I disabled all extra features, and now this is the same thing xDDD

denis08stgt commented 3 weeks ago

@kopiro

kopiro commented 2 weeks ago

Hey, please update to https://github.com/kopiro/homebridge-tapo-camera/releases/tag/v2.4.5 where I added more debug logs and post your logs again.

kopiro commented 2 weeks ago

Update: you may be affected by this issue. Please follow this guide on how to fix it.