shauntarves / wyze-sdk

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

Login with Google #179

Open jak83A opened 1 month ago

jak83A commented 1 month ago

My wyze account logs in with my google account, i also created an API Key, how can i login since i kinda miss the EMAIL/Password method?

import os
from wyze_sdk import Client

response = Client().login(
    email=os.environ['mymail'], # i don't have a password with Wyze app! 
    key_id=os.environ['mykeyid'],
    api_key=os.environ['myapikey']
)

gives me

Traceback (most recent call last):
  File "/home/jakob/PycharmProjects/WyzeAPI/main.py", line 5, in <module>
    email=os.environ['mymail'],
          ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen os>", line 687, in __getitem__
KeyError: 'mymail'
jak83A commented 1 month ago

ok... i foiund that i need to learn how to work with environ os variables ... but passing the parameters as strings.. creates the problem

    raise WyzeClientConfigurationError("must provide email and password")
wyze_sdk.errors.WyzeClientConfigurationError: must provide email and password
KyGuy2002 commented 3 weeks ago

If you have never created a wyze password, then use the reset password link with the same email your google account uses. This will let you set one.