Netatmo setup instructions

This commit is contained in:
Pete ba
2019-06-15 12:19:25 +01:00
parent 0347c42ae6
commit 4c00eb1b21
4 changed files with 75 additions and 4 deletions

View File

@@ -56,6 +56,7 @@ The WeeWX project provides a mechanism for OpenSprinkler owners to capture the d
For more information on the "WeeWX Solution" click [here](docs/weewx.md) For more information on the "WeeWX Solution" click [here](docs/weewx.md)
**4 ) Solutions for Other PWS** **4 ) Solutions for specific PWS (provided by OpenSprinkler Forum members)**
- Davis Vantage: a solution for this PWS has been kindly provided by @rmloeb [here](docs/davis-vantage.md) - Davis Vantage: a solution for this PWS has been kindly provided by @rmloeb [here](docs/davis-vantage.md)
- Netatmo: instructions for configuring this PWS have been greatfully provided by @franzstein [here](docs/netatmo.md)

View File

@@ -5,7 +5,7 @@
*For Raspberry Pi 2 or Pi 3 models that are based on the newer ARMv7 and ARMv8 chip* *For Raspberry Pi 2 or Pi 3 models that are based on the newer ARMv7 and ARMv8 chip*
``` ```
pi@OSPi:~ $ curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -l pi@OSPi:~ $ curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -l
pi@OSPi:~ $ sudo apt install -y nodejs pi@OSPi:~ $ sudo apt-get install -y nodejs
``` ```
*For Raspberry Pi Model A, B, B+, Zero and Compute Module based on the older ARMv6 chip, the process is slightly more convoluted* *For Raspberry Pi Model A, B, B+, Zero and Compute Module based on the older ARMv6 chip, the process is slightly more convoluted*

70
docs/netatmo.md Normal file
View File

@@ -0,0 +1,70 @@
## Setup a Netatmo PWS to stream data to a local Weather Service
**Background**
Netatmo Weather Stations send weather information to the Netatmo Cloud using an encrypted data stream. So for this PWS, we cannot readily intercept the data before it leaves the home network. Instead, we can make use of a WeeWX plug-in that can retreive the weather data from the Netatmo Cloud and then forward it onto our local Weather Service.
**Step 1: Install the local Weather Service and WeeWX solutions**
* **Step 1a:** Install your local Weather Service and configure the service for PWS input using the instructions [here](local-installation.md).
* **Step 1b:** Next, install the WeeWX platofrm using the instructions [here](weewx.md)
Note that you can install both the local Weather Service and the WeeWX solution onto the same Raspberry Pi if you wish.
**Step 3: Register a Client ID on the Netatmo Cloud**
Now we need to register with the Netatmo Cloud service in order to obtain a `Client ID` and a `Client Secret` via the `netatmo.com` web site.
During registration, you will need to create a Netatmo Connect project and an APP in addition to the username and password already available for the existing Netatmo account:
* Whilst creating the APP, a form will be presented requesting a number of items. As a minimum, you need to provide: Name; Description; Data Protection Officer Name; and Data Protection Officer Email.
* Note that the Email Address should be the same as used to access the Netatmo account, all the other text may vary.
* After saving this form the so called “Technical Parameters” Client id and Client secret can be obtained.
These credentials, together with the username (Email Address) and password, are needed to install the WeeWX Netatmo plug-in.
**Step 4: Install and Configure the WeeWX Netatmo Plug-In**
There is a Netatmo/WeeWX driver, written by Matthew Wall, that can be added to the WeeWX platform in order to retreive weather data from the Netatmo Cloud service. The procedure to install the plug-in as avaliable [here](https://github.com/matthewwall/weewx-netatmo)
Once installed, confirm that the necessary configuration has been added to the `/etc/weewx/weewx.conf` file. The file should be set to select the `netatmo` station type and to provide your account information as follows:
```
# in this file with a driver parameter indicating the driver to be used.
station_type = netatmo
...
##############################################################################
[netatmo]
username = <Email Address as used for Netatmo login>
client_secret = <Client secret as obtained from the Netatmo Connect website>
password = <Password as used for Netatmo login>
driver = user.netatmo
client_id = <Client id as obtained from the Netatmo Connect website>
mode = cloud
##############################################################################
```
**Step 4: Configure WeeWX to forward Weather Data to you local Weather Service**
Once installed and capturing data, the WeeWX solution can send the Netatmo weather observation onto the local Weather Service. WeeWX's built-in Weather Underground plug-in can be configured in the ```/etc/weewx/weewx.conf``` file specifying the IP Address and Port of the local Weather Service server as follows:
```
[[Wunderground]]
enable = true
station = anyText
password = anyText
server_url = http://<IP>:<PORT>/weatherstation/updateweatherstation.php
rapidfire = False
```
Note: the `station` and `password` entries are not used by the OS Weather Service but must be populated to keep the plug-in happy.
You should now `stop` and `start` the WeeWX service for the configuration options to take effect:
```
$ sudo /etc/init.d/weewx stop
$ sudo /etc/init.d/weewx start
```
Your Netatmo weather information should now be sent to the local Weather Service every 5 minutes.

View File

@@ -4,7 +4,7 @@ The following steps are based on a Raspberry Pi Zero W with an Ethernet/USB adap
**Step 1: Install Software and Basic Setup** **Step 1: Install Software and Basic Setup**
Install the latest version of Raspbian onto the Pi as per the instructions from the Raspberry Pi Foundation. Do not enable the WiFi interface by providing a `wpa_supplicant.conf` file but do enable `ssh`. You can now `ssh` into the Pi via the ethernet network and contiue the setup process. Install the latest version of Raspbian onto the Pi as per the instructions from the Raspberry Pi Foundation. Do not enable the WiFi interface at this stage instead `ssh` into the Pi via the ethernet network and contiue the setup process.
We need to install two software packages to allow our Raspberry Pi to connect to our PWS and send the weather information across to our home network. The first, `hostapd`, will provide an access point to connect the PWS, and the second, `bridge-utils`, will route the information from the wifi-side of the rapsberry pi to the ethernet-side: We need to install two software packages to allow our Raspberry Pi to connect to our PWS and send the weather information across to our home network. The first, `hostapd`, will provide an access point to connect the PWS, and the second, `bridge-utils`, will route the information from the wifi-side of the rapsberry pi to the ethernet-side:
``` ```