RMCob / homebridge-wyze-connected-home-op

Wyze Connected Home plugin for Homebridge with support for the Wyze Outdoor Plug
http://github.com/RMCob/homebridge-wyze-connected-home
MIT License
41 stars 20 forks source link

[Wyze] Request failed: Error: Request failed with status code 429 #36

Open iarroniz opened 2 years ago

iarroniz commented 2 years ago

all the time I am receiving this errors on Wyze. Thanks [08/08/2022, 11:08:32] [Wyze] Request failed: Error: Request failed with status code 429 [08/08/2022, 11:08:32] [Wyze] Response (Too Many Requests): "" [08/08/2022, 11:08:32] [Wyze] Error getting devices: Error: Request failed with status code 429 [08/08/2022, 11:08:37] [Wyze] Request failed: Error: Request failed with status code 429 [08/08/2022, 11:08:37] [Wyze] Response (Too Many Requests): "" [08/08/2022, 11:08:37] [Wyze] Error, refreshing access token and trying again [08/08/2022, 11:08:37] [Wyze] Request failed: Error: Request failed with status code 429 [08/08/2022, 11:08:37] [Wyze] Response (Too Many Requests): "" [08/08/2022, 11:08:37] [Wyze] Error, logging in and trying again [08/08/2022, 11:08:38] [Wyze] Successfully logged into Wyze API

ourstanley commented 2 years ago

I'm getting the same error (although it doesn't seem to ever connect as yours seems to eventually do).

Any thoughts on ways to resolve this?

jfarmer08 commented 2 years ago

What do you have your Refresh Interval rate set too?

https://github.com/jfarmer08/homebridge-wyze-smart-home

ourstanley commented 2 years ago

It’s at the default of 10000

jfarmer08 commented 2 years ago

That's the problem. Your hitting wyze api to hard. I would move that up to 30 seconds.

ourstanley commented 2 years ago

Hmmm, is that value in milliseconds? I.e, should I be changing that value to 30000?

jfarmer08 commented 2 years ago

correct

ourstanley commented 2 years ago

OK, I’ve updated the interval to 30000 and I’m still getting failures.

8/15/2022, 6:16:49 PMWyze Connected Home Op Bridge inc CBConfiguration change 8/15/2022, 6:16:49 PMwyzeconnectedhomeopbridgeinccb stopping 8/15/2022, 6:16:54 PMWyze Connected Home Op Bridge inc CB starting 8/15/2022, 6:16:58 PMWyze Connected Home Op Bridge inc CBLoaded plugin 'homebridge-wyze-connected-home-op' 8/15/2022, 6:16:58 PMWyze Connected Home Op Bridge inc CBLoading 1 platforms... 8/15/2022, 6:16:58 PMWyze Connected Home Op Bridge inc CBBridge is running on port 51876. 8/15/2022, 6:16:58 PMWyze Connected Home Op Bridge inc CBWyzeERRORRequest failed: Error: Request failed with status code 400 8/15/2022, 6:16:58 PMWyze Connected Home Op Bridge inc CBWyzeERRORResponse (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"d27b9184-xxxx-4f31-b269-355dca10b2b9","errorCode":1000} 8/15/2022, 6:16:58 PMWyze Connected Home Op Bridge inc CBWyzeERRORError getting devices: Error: Request failed with status code 400 8/15/2022, 6:17:29 PMWyze Connected Home Op Bridge inc CBWyzeERRORRequest failed: Error: Request failed with status code 400 8/15/2022, 6:17:29 PMWyze Connected Home Op Bridge inc CBWyzeERRORResponse (Bad Request): {"description":"Too many failed attempts. Please try again later.","requestId":"979235a8-xxxx-4164-bb7b-3af781127657","errorCode":1000} 8/15/2022, 6:17:29 PMWyze Connected Home Op Bridge inc CBWyzeERRORError getting devices: Error: Request failed with status code 400

Note I’ve changed the requestid as I wasn’t sure if this contains any identifying information that could compromise my system.

ourstanley commented 2 years ago

OK, seems like my HOOBS and Homebridge installs were old and not picking up the need for updates. I’ve run the terminal command to ‘fix’ stuck updates and now when HOOBS starts I don’t see anything in my dashboard, log screen, bridges nor plugin screens (though if I select the Bridges drop-down it does show me my list of Bridges and they are all selected to show). Might have to do a complete re-install - probably a job to try at the weekend.

jfarmer08 commented 2 years ago

If your going to reinstall it you could go with https://github.com/jfarmer08/homebridge-wyze-smart-home.

It's has more features and verified with homebridge.

ourstanley commented 2 years ago

OK, finally had time to 'nuke and pave' my Hoobs install and have installed the plugin you suggested. However I'm now getting the error:

8/23/2022, 9:36:38 PMWyze Smart Home BridgeConfiguration change 8/23/2022, 9:36:39 PMwyzesmarthomebridge stopping 8/23/2022, 9:36:44 PMWyze Smart Home Bridge starting 8/23/2022, 9:36:49 PMWyze Smart Home BridgeLoaded plugin 'homebridge-wyze-smart-home' 8/23/2022, 9:36:49 PMWyze Smart Home BridgeLoading 1 platforms... 8/23/2022, 9:36:50 PMWyze Smart Home BridgeBridge is running on port 51866. 8/23/2022, 9:36:51 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/wyzesmarthomebridge/persist/wyze-d1736ee3-20f7-43a7-b631-770b9200b08d.json'

First time it started I did get a similar message, but it instantly discovered the 14 items on my network (does this plugin not recognize the sprinkler controller?), but the 14 minutes later gave me this sequence of errors:

8/23/2022, 9:33:07 PMWyze Smart Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 400 8/23/2022, 9:33:07 PMWyze Smart Home BridgeWyzeERRORResponse (Bad Request): {"description":"Invalid Verification Code.","requestId":"2e4190ef-503d-xxxx-xxxxxxxxxxxxxxxxxxx","errorCode":1000} 8/23/2022, 9:33:07 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 400

I distorted the requestId.

Any ideas what's going on? Other than putting in my user name, password and 2FA code I haven't changed any defaults.

Thanks

jfarmer08 commented 2 years ago

Looks like an issue with 2fa. Can yo try it without?