Netatmo Binding

The Netatmo binding integrates the Netatmo Personal Weather Station into openHAB. Its different modules allow you to measure temperature, humidity, air pressure, carbon dioxide concentration in the air, as well as the ambient noise level.

The Netatmo Welcome Camera is also supported; it is a home camera with face recognition. It notifies you when it sees someone it knows, but also when it sees a stranger. See information below to obtain the necessary informations to setup your Netatmo Gear, also see the Netatmo website for details on their products.

The Netatmo Binding (1.x) is considered a legacy binding and does not show up by default as an add-on in the OpenHAB 2 Paper UI. In order for the binding to show up as a add-on, you need to go to Configuration->System and enable both Access Remote Repositories and Include Legacy 1.x Bindings and save the setting. Once you have done this, you will see both Netatmo Binding and Netatmo Binding (1.x) in Add-ons, you will want to install Netatmo Binding.

Prerequisites

To make the binding work an OAuth2 authorization has to be performed by hand to let openHAB connect to your Netatmo devices. The following is a step by step guide to do so.

A note on the notation: Variable are written like this <VARIABLE_NAME> when replacing the variable, replace the < and > as well. E.g. Assuming <CLIENT_ID> is 1234 then,

<CLIENT_ID> Your client ID taken from your App at https://dev.netatmo.com/dev/listapps

<SCOPE> A list of devices and capabilities. The full scope would be read_station read_thermostat write_thermostat read_camera access_camera, see the Netatmo Scope Documentation for more info. Please ensure that the variable is URL encoded if your browser doesn’t do it automatically, e.g. the URL encoded complete list of scopes would be read_station%20read_thermostat%20write_thermostat%20read_camera%20access_camera

When entering the URL to your browser it will take you to the Netatmo Webpage asking you to authorize your application to access your Netatmo data. The page should look something like this. After this step your Application should appear as an authorized application in your Netatmo profile. Please make sure it is there, the setup can not continue if your app is not authorized.

Measurement Units

You can optionally set the unit system and/or pressure units. The unit systems options are either Metric (Celsius/meters/millimeters) or US (Fahrenheit/feet/inches) and is case insensitive. The temperature (Celsius or Fahrenheit), rain (millimeter or inches) and altitude (meters or feet) are affected by this parameter. If not specified, openHAB defaults to Metric.

unitsystem=m
unitsystem=us

The pressure unit is either mbar, inHg, or mmHg and is used for pressure, and is case insenstive. If not specified, openHAB defaults to mbar.

pressureunit=mbar
pressureunit=inHg
pressureunit=mmHg

Items and Rules Configuration

The IDs for the modules can be extracted from the developer documentation on the netatmo site. First login with your user. Then some examples of the documentation contain the real results of your weather station. Get the IDs of your devices (indoor, outdoor, rain gauge) here:

https://dev.netatmo.com/doc/methods/devicelist

main_device is the ID of the “main device”, the indoor sensor. This is equal to the MAC address of the Netatmo.

The other modules you can recognize by “module_name” and then note the “_id” which you need later.

Another way to get the IDs is to calculate them

You have to calculate the ID for the outside module as follows: (it cannot be read from the app)
if the first serial character is “h”: start with “02”,
if the first serial character is “i”: start with “03”,

append “:00:00:”,

split the rest into three parts of two characters and append with a colon as delimeter.

For example your serial number “h00bcdc” should end up as “02:00:00:00:bc:dc”.

Welcome Camera

Setup

First, create your developer Account and App, as described above. The Steps are all the same, but for Welcome, you will need some more information (Home ID, Face ID etc) to get all the Input you need. There are two different ways to retrieve those infos:

Option 1

Obtain the Home ID from the Netatmo Web Interface (will only work with a PC or Mac and a browser that is displaying links on mouse over)

Go to https://my.netatmo.com/app/camera

Log in with your Netatmo Credentials

Click on the Gear-Icon in the upper right corner

In the next window hover your mouse pointer over one of the Options as Localisation or Timezone and check the preview address for the page (in Chrome in the lower left corner)