Skip to content

Netatmo

Peter Trimmel edited this page Feb 19, 2019 · 1 revision

Netatmo

This library provides access to various data fields from the Netatmo weather station and devices. The data properties are based on the online specification found at Netatmo connect (https://dev.netatmo.com).

The Netatmo Weather Station is composed of a main module (Indoor module) and additional modules (indoor and outdoor)

The Indoor Station measures the Temperature, Humidity, CO2 and acoustic comfort at home.

The Outdoor Module measures the Temperature, Pressure and Humidity outside.

The Rain Gauge module (1 per Station) measures rainfall.

The Wind Gauge module (1 per Station) measures wind speed, wind direction and wind gusts.

Netatmo REST Web Service API

The REST Web Service of the Fronius Symo provides access to data values from the Netatmo weather station and devices. Netatmo Weather Station sends its measures to the server every ten minutes (there is no local access to the weather station).

  • Temperature (inside/outside): measures, max, min, dates
  • Humidity (inside/outside): measures, max, min, dates
  • CO2 (inside): measures and dates of measures
  • Noise (inside): measures, max, min, dates
  • Pressure (outside): measures, min, max, dates
  • Rain: measures, sum, dates
  • Wind: strength, angle
  • Gust: strength, angle, max date
  • Device information: wifi status, radio status, battery level...
Authentication

To access users data, an access token is needed for each user. The fastest way to retrieve a token is to authenticate the application with the user Netatmo credentials. The pair of access token + refresh token and the validity period of the access_token is returned. Access tokens expire, and a new one using the refresh token has to be required. Access tokens are associated to a scope, when requesting one (Getstationsdata).

When an application is registered at the Netatmo developer website, the client ID and client secret can be obtained.

Netatmo Class

The Netatmo class implements all communication routines to read the data values from the Netatmo web service. The only data needed to instanciate a Netatmo class instance are:

  • A logger
  • The base uri
  • The user name
  • The user password
  • The client ID
  • The client secret

The Netatmo class provides simple Read() methods to update the data values. Additional property helper functions allow to read properties or get property values.

Clone this wiki locally