shauntarves / wyze-sdk

A modern Python client for controlling Wyze devices.
The Unlicense
313 stars 49 forks source link

Guidance on new API implementation? #142

Closed subatomike closed 1 year ago

subatomike commented 1 year ago

Using v2.0 wyze-sdk, I get an expired token: wyze_sdk.errors.WyzeApiError: The access token has expired. Please refresh the token and try again. The server responded with: {'ts': 1690073311112, 'code': '2001', 'msg': 'AccessTokenError', 'data': {}}

I have created new tokens at the wyze portal, and implemented using:

os.environ['WYZE_ACCESS_TOKEN']='xxxxx'
client = Client(token=os.environ['WYZE_ACCESS_TOKEN'])
vacuum = client.vacuums.info(device_mac=the_mac[vac])

It is the client.vacuums.info which throws the error.

subatomike commented 1 year ago

Nevermind. Found errors in my code.