jfarmer08 / homebridge-wyze-smart-home

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

Forbidden / 403 Errors #127

Closed alardierejr closed 9 months ago

alardierejr commented 11 months ago

Describe Your Problem: Starting today the plugin stopped working. I reinstalled, restarted, checked password and it still will not work now. No 2 factor turned on

Logs:

BridgeWARNINGunhandled rejection: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/wyzesmarthomebridge/persist/wyze-51298708-78cf-4d01-8ccb-9d057574d999.json' 7/21/2023, 10:53:42 PMWyze Smart Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 403 7/21/2023, 10:53:42 PMWyze Smart Home BridgeWyzeERRORResponse (Forbidden): "" 7/21/2023, 10:53:42 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 403 7/21/2023, 10:54:43 PMWyze Smart Home BridgeWyzeERRORRequest failed: Error: Request failed with status code 403 7/21/2023, 10:54:43 PMWyze Smart Home BridgeWyzeERRORResponse (Forbidden): "" 7/21/2023, 10:54:43 PMWyze Smart Home BridgeWyzeERRORError getting devices: Error: Request failed with status code 403

Plugin Config:

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

Screenshots:

Environment:

github-actions[bot] commented 11 months ago

Message that will be displayed on users' first issue

mrlt8 commented 11 months ago

You need to add a keyId and apiKey.

See: https://github.com/jfarmer08/homebridge-wyze-smart-home#optional-fields

tryphoon commented 11 months ago

That's a tricky one to find. Not documented in the UI. Also, will need a refresh after 12 months as I'll never remember that I need to check this site to refresh my tokens and copy them in there.

mrlt8 commented 11 months ago

The API key was still optional when the feature was merged earlier this month.

@jfarmer08 may want to make the key and ID a hard requirement now that it's required?

jfarmer08 commented 11 months ago

v0.5.36

BarnesGH commented 11 months ago

I’m also having the same issue. I put the API and Key ID in but same message on the logs and no devices pull in. I was struggling with getting it to let me view the entire API key. I suppose it could be that that was incorrect, so I am looking at that now.

BarnesGH commented 11 months ago

I got my API Key and Key ID put in correctly. Now, this is the error I see in the log:

Wyze Smart Home Bridge2WARNINGunhandled rejection: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined

rt1711 commented 11 months ago

Cant figure out what im doing wrong here. I added everything into my plugin and generated the api key and keyid but am still getting errors. I’m getting illegal argument undefined now instead of the 403 error. Any ideas what I am missing?

jfarmer08 commented 11 months ago

Can you paste your config?

rt1711 commented 11 months ago

I had the MFA line in at one point but I disabled it and removed the line for troubleshooting. This is what I currently have. Thanks.

{ "platform": "WyzeSmartHome", "name": "Wyze", "username": "email@emailhere.fake", "password": "fasfasifjasifja", "refreshInterval": 60000, "keyId": "abcdefg-hijk-lmnop-qrst-uvwxwz", "apiKey": "oajfoasjfosajfoasjfoasjfoasjfopsajfa" }

jfarmer08 commented 11 months ago

That looks fine - Can you add "logging": "debug" to the config and restart.

rt1711 commented 11 months ago

Started working after adding that. No clue why