jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
93 stars 14 forks source link

API error #243

Closed netmatrixtech closed 2 months ago

netmatrixtech commented 2 months ago

Describe Your Problem: I've been using this Wyze plugin for a long time now but recently had to upgrade my networking equipment which inevitably ended up changing my HomeBridge IP due to introducing VLANs. I had also placed my Wyze Cam Pro v3's on a separate VLAN but that caused a lot of issues with numerous IoT devices and I reverted the cams to the same VLAN as HomeBridge. While all my other HomeBridge/HomeKit plugins are now working again with the new HomeBridge server IP, it seems I can't get the Wyze plugin to work again. I continually get API errors even after creating new API keys on the Wyze website, deleting, and reinstalling the plugin or even reverted to a previous revision. It doesn't seem to matter what I do I'm always getting these API errors now. Even removing and registering the plugin from within HomeKit doesn't work. Any thoughts? Thanks so much!! love ya work! cheers

Tim

Logs:

[10/04/2024, 9:07:22 pm] [Wyze] Wyze API Error (2001): 'access token is error' [10/04/2024, 9:07:22 pm] [Wyze] API response PerformRequest: {"url":"app/user/refresh_token","status":200,"data":{"ts":1712747242360,"code":"2002","msg":"RefreshTokenError","data":{}},"headers":{"date":"Wed, 10 Apr 2024 11:07:22 GMT","content-type":"application/json; charset=utf-8","content-length":"70","connection":"keep-alive","x-ratelimit-remaining":"298","x-ratelimit-reset-by":"Wed Apr 10 11:10:20 GMT 2024","cache-control":"no-cache","pragma":"no-cache","expires":"-1","server":"Microsoft-IIS/8.5","access-control-allow-headers":"Origin, X-Requested-With, Content-Type, Cache-Control, Accept, authorization, content-type","access-control-allow-methods":"POST,GET,OPTIONS","access-control-allow-origin":"*","x-aspnet-version":"4.0.30319","x-powered-by":"ASP.NET"}} [10/04/2024, 9:07:22 pm] [Wyze] API rate limit remaining: 298. Expires in 177559ms [10/04/2024, 9:07:22 pm] [Wyze] Wyze API Error (2002): 'RefreshTokenError' [10/04/2024, 9:07:22 pm] [Wyze] Error getting devices: Error: Refresh Token could not be used to get a new access token. Error: Wyze API Error (2002) - RefreshTokenError

Show the Homebridge logs here, remove any sensitive information.


**Plugin Config:**

{
    "name": "Wyze",
    "username": "me@mofo.com",
    "password": "xxxxxxx",
    "keyId": "jxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "apiKey": "Txxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "refreshInterval": 60000,
    "hms": false,
    "showAdvancedOptions": true,
    "apiLogEnabled": true,
    "pluginLoggingEnabled": false,
    "lowBatteryPercentage": 30,
    "excludeMacAddress": false,
    "excludedeviceType": false,
    "_bridge": {
        "username": "0E:F8:5C:73:71:99",
        "port": 59060
    },
    "platform": "WyzeSmartHome"
}

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Just the API errors really.

Environment:

github-actions[bot] commented 2 months ago

Message that will be displayed on users' first issue

jfarmer08 commented 2 months ago

You can try and delete the persist/wyze-UUID.json and then restart.

netmatrixtech commented 2 months ago

Bloody brilliant.... thanks so much and appreciate your quick response. cheers!