Closed Jscho7 closed 11 months ago
According to Netatmo documentation, https://dev.netatmo.com/apidocumentation/oauth, to access homeData, that seems to me mandatory to enumerate homes and stations in homes you need one of read_camera or read_presence or read_smokedetector
role in your token scope.
read_station
is not mentioned so ensure you have at least one of this roles in your scope added to read_station.
Are you referring the reference token generated based on the scope? I generated the token in the application homepage using read_station scope and authorized it. Now I don't own any netatmo sensors and I want to get access to the temperature measurements from other netatmo stations across the world. To do that I need to know the IDs of stations available within a region which can be possible by Getpublicdata() function. But I do not know if this exists in lnetatmo module. In patatmo I used these lines of code to get it.
client = patatmo.api.client.NetatmoClient()
client.authentication.credentials = credentials
region = { lat and long }
output = client.Getpublicdata(region = region, filter=True)
Unfortunately, I never implemented access to other stations in this library because I don't have a use case for it 🙃
I just pushed a new version of the library with a direct raw access to netatmo API. Look at the sample at https://github.com/philippelt/netatmo-api-python/blob/v3.2.0/samples/rawAPIsample.py for an example...
weatherData = lnetatmo.WeatherStationData(auth)
This line throws an error that there are no weather stations in any homes. What does it mean? I was using patatmo module (or library?), and retrieved data for a longer time period by creating a client, authorizing it with client credentials, and using Getpublicdata() to get a list of stations available. It was working well before the new authorization method last week. Thanks to @philippelt, I found their repo to do the authorization part. I want to get the information on all available stations in the API and the documentation says to use Getpublicdata(), but I don't know how to access this function in lnetatmo library. Can somebody please help me with this?