Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authentication #417

Open
larszod opened this issue Feb 20, 2023 · 2 comments
Open

authentication #417

larszod opened this issue Feb 20, 2023 · 2 comments

Comments

@larszod
Copy link

larszod commented Feb 20, 2023

This is not an issue or bug, but a request for some instructions (sorry).

Maybe add some simple, basic example for connecting to netatmo on the home network inside firewall.

Something that I don't understand is the significance of "client_id" and "client_secret" and also the "redirect URL". Can you maybe shed some light on this?:

import pyatmo

USERNAME = "netatmo username"
PASSWORD = "netatmo password"
REDIRECT_URL = What is this?

authorization = pyatmo.ClientAuth(
client_id=None,
client_secret=None,
username=USERNAME,
password=PASSWORD,
redirect_uri=REDIRECT_URL,
scope="read_station",
)
r = pyatmo.HomeData(authorization)
r.update()
r.process()
print(r.homes)
for home_id in r.homes.keys():
r = pyatmo.HomeStatus(authorization, home_id)
r.update()
r.process()
print(r.rooms)

@jabesq
Copy link
Collaborator

jabesq commented Feb 22, 2023

This is used in netatmo authentication process to return the authentication code: https://dev.netatmo.com/apidocumentation/oauth

@larszod
Copy link
Author

larszod commented Feb 22, 2023

Forgot to write that I already had a look at https://dev.netatmo.com/apidocumentation/oauth

Netatmo also states on that webpage that the method "Client credentials grant type" in the script above is deprecated by October 2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants