Just starting - SOLVED

The Netatmo API is a set of webservices allowing developers and third parties to access Netatmo device's data.
Post Reply
andy@2610.co.uk
Posts: 7
Joined: 01 Jan 2019, 20:12

Just starting - SOLVED

Post 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
Last edited by andy@2610.co.uk on 02 Jan 2019, 10:57, edited 1 time in total.
andy@2610.co.uk
Posts: 7
Joined: 01 Jan 2019, 20:12

Re: Just starting

Post by andy@2610.co.uk »

Found out that it doesn't actually need the device_id.
Post Reply

Return to “Netatmo API”