This is the netatmo driver for WeeWX, a free, open-source weather station software. The driver allows you to retrieve data from your Netatmo weather station and integrate it seamlessly into WeeWX.
- Two Modes of Operation: This driver can use the netatmo API to obtain data from the netatmo servers (
cloud
) or parse the packets sent from a netatmo station (sniff
). The latter works only with netatmo firmware 101 (circa early 2015), see why in the Firmware 102 note. By default, this driver will operate in 'cloud' mode. - Compatibility: The driver is compatible with both Python 2.7 and 3.x and supports WeeWX 4.* versions as well as earlier versions.
- Automatic Token Handling: Communication with the netatmo servers requires
refresh_token
,client_id
, andclient_secret
. Therefresh_token
is the one you can find on your application page after creating a new token. Theclient_id
andclient_secret
must be obtained via the dev.netatmo.com web site. Using these 3 things, the driver automatically obtains and updates the tokens needed to get data from the server. - Enhanced Rain Data Handling: Special logic is included to address discrepancies in rain data retrieval from the netatmo API, ensuring accurate rain summaries in WeeWX.
Firmware 102 introduced arbitrary encryption in response to a poorly chosen decision to include the wifi password in network traffic sent to the netatmo servers. Unfortunately, the encryption blocks end-users from accessing their data, while the netatmo stations might still send information such as the wifi password to the netatmo servers.
-
Download the driver:
wget -O weewx-netatmo.zip https://github.com/Buco7854/weewx-netatmo/archive/master.zip
-
Install the driver:
sudo wee_extension --install weewx-netatmo.zip
or for WeeWX 5.0
weectl extension install weewx-netatmo.zip
-
Configure the driver: Edit the
/etc/weewx/weewx.conf
, see Configuration. -
Restart WeeWX:
sudo /etc/init.d/weewx restart
or
sudo systemctl restart weewx.service
For communication with the netatmo servers, you will need to add these parameters to your WeeWX configuration :
-
tokens_persistence_file
: The path to a json file that requires arefresh_token
key. Obtain this from your application page after creating a new token. You must NEVER delete the file since it will contain a temporary token that will be reused between restart.For example your
tokens_persistence_file
will be/etc/weewx/tokens_persistence_file.json
and will look as followed:{"refresh_token":"YOUR_TOKEN"}
⚠️ Make sure weewx user can read and write in this file. -
client_id
andclient_secret
: These must be obtained via the dev.netatmo.com website.
This driver is distributed under the GPLv3 license. See LICENSE for more information.
For questions, bug reports, or feature requests, please create an issue on the GitHub repository.
- matthewwall (Original Author) - Original Repository
- bricebou (Contributor) - Original Fork
- jkrasinger (Contributor) - Merged Fork