Project

General

Profile

Support #9463

Setup a weather station in Kalpana

Added by Philippe May about 5 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Start date:
18/12/2019
Due date:
% Done:

100%

Close

Description

After a discussion in the Kalpana mailing list related to a rain gauge, i (Philippe) proposed to use an automatic weather station instead, giving the link to the model we have in Kalpana. The idea was turned down, however Raymond (friend of Patricia) liked the idea and purchased a weather station quite similar to the one in CSR (on Amazon Netherlands).

Setup, installation, connection details below.

History

#1 Updated by Philippe May about 5 years ago

Raymond installed the WS on the roof of the North Block, then gave me the console (today).
Temporarily, i installed the console in our apartment, and re-run the setup.

See the attached file: user manual.

- Download and install the application on smartphone (Android version here: https://apkpure.com/ws-view/com.ost.wsview).

- Follow instructions and setup with WeatherCloud.

https://app.weathercloud.net/d8107807957#profile

user: avcsrgeomatics
password: <Same as Jupyter, etc>
mail:

exclamation One very nice feature: apparently, we can define in the setup a server to send the information to, defining the IP address and the protocol (ecowitt or Wunderground). This would allow us to send information to a local server, what we missed with the WS deployed in CSR. Deserves investigation.

Next:

- define the WS in our database
- check the APIs and develop poll script, feeding our database
- inform Kalpana residents

#2 Updated by Philippe May about 5 years ago

After a bit of research, it seems that weatercloud.com and ecowitt.net do not have proper APIs.

So, I have set up an account on wunderground.com (same username/password then on weathercloud, see above).

The station id is IIRUMB2, key: CgcImOlj.

The web dashboard is at https://www.wunderground.com/dashboard/pws/IIRUMB2

Getting latest data is easy (replace API key):

http 'https://api.weather.com/v2/pws/observations/current?stationId=IIRUMB2&format=json&units=m&numericPrecision=decimal&apiKey=xxxxx'
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: max-age=5
Connection: keep-alive
Content-Length: 497
Content-Type: application/json; charset=UTF-8
Date: Wed, 18 Dec 2019 18:55:57 GMT
Surrogate-Control: ESI/1.0
Vary: Accept-Encoding
X-Region: us-east-1
X-Trace-Token: fee3dbc6-f09a-4242-a3db-c6f09a7242b4
X-Trace-Token: fee3dbc6-f09a-4242-a3db-c6f09a7242b4

{
    "observations": [
        {
            "country": "IN",
            "epoch": 1576695346,
            "humidity": 94,
            "lat": 12.00157452,
            "lon": 79.81304932,
            "metric": {
                "dewpt": 23,
                "elev": 57,
                "heatIndex": 25,
                "precipRate": 0.0,
                "precipTotal": 0.51,
                "pressure": 1015.51,
                "temp": 24,
                "windChill": 24,
                "windGust": 2,
                "windSpeed": 0
            },
            "neighborhood": "Irumbai",
            "obsTimeLocal": "2019-12-19 00:25:46",
            "obsTimeUtc": "2019-12-18T18:55:46Z",
            "qcStatus": -1,
            "realtimeFrequency": null,
            "softwareType": "EasyWeatherV1.4.4",
            "solarRadiation": 0.0,
            "stationID": "IIRUMB2",
            "uv": 0.0,
            "winddir": 34
        }
    ]
}

#3 Updated by Philippe May about 5 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

Created a script to poll wunderground: avgs_device_interfaces/wundergground.py. It uses gisaf config (eg in /etc/gisaf/prod.yml), such as:

weather_station:
  WUnderground:
    api_key: xxxxxxx
    stations:
      IIRUMB2: 2

Added the service on the server:

root@gisaf2:~# cat /etc/systemd/system/wunderground_poll.service 
[Service]
ExecStart=/usr/local/lib/venv/gisaf_python3.7/bin/python /usr/local/lib/avgs_device_interfaces/wunderground.py
Restart=always
User=www-data
Group=www-data

[Install]
WantedBy=multi-user.target

#5 Updated by Philippe May about 3 years ago

The console of this weather station was handed over today to Auroville Consulting (Abhi and Veera). The wifi config was changed accordingly, with no other change.

Also available in: Atom PDF