Page 1 of 1

Just starting - SOLVED

Posted: 01 Jan 2019, 20:18
by andy@2610.co.uk
Just got my Netatmo weather station for Christmas. I do a lot of stuff on home automation with Raspberry Pis and have built a dashboard that I use. At the moment, this gets the external temp from OpenWeatherMap but, obviously, I want to use my own data.

I'm following the tutorial here:

https://dev.netatmo.com/en-US/resources ... odesamples

What I can't work out is my device_id for this bit:

Code: Select all

#This code sample uses requests (HTTP library)
import requests

params = {
    'access_token': '[YOUR_ACCESS_TOKEN]',
    'device_id': '[YOUR_DEVICE_ID]'
}

try:
    response = requests.post("https://api.netatmo.com/api/getstationsdata", params=params)
    response.raise_for_status()
    data = response.json()["body"]
except requests.exceptions.HTTPError as error:
    print(error.response.status_code, error.response.text)
Looking at the documentation, I'm wondering if I've missed something as it all seems to assume a high degree of prior knowledge - this being a case in point.

Could someone point me in the right direction, please.

Cheers
Andy

Re: Just starting

Posted: 02 Jan 2019, 10:57
by andy@2610.co.uk
Found out that it doesn't actually need the device_id.