Page 3 of 3

Re: Ambient Weather WS-2902A / WS-2902C

Posted: Mon 09 Aug 2021 8:11 am
by mcrossley
Hunter362 wrote: Sun 08 Aug 2021 1:11 am I'm looking at the WS-2902C as a replacement for my current WS-2080 which has served me faithfully for 10 years now.
Is it easier / better to use the GW-1000 I see you guys talking about? or are you sending the data via the console to ambientweather, then your pulling it back via the API to update your own site? I think I'm lost here?
The GW-1000 would plug into the computer like my current setup, pick up the data from the sensors and MX would pull it directly the way it currently is now from the WS-2080 console, correct? This sounds like the way to go then.

Thanks
Bill
Cumulus pulls the data direct from the GW1000, it cannot pull from AmbientWeather.com

The GW1000 connects via WiFi, it does not have to be plugged into your computer - it just uses the USB connector for power.

The next release of Cumulus MX will have direct (possibly experimental) support for newer Ambient consoles that have the ability to configure a Custom upload server.

Re: Ambient Weather WS-2902A / WS-2902C

Posted: Tue 19 Jul 2022 6:52 pm
by Trasd
mcrossley wrote: Mon 09 Aug 2021 8:11 am The next release of Cumulus MX will have direct (possibly experimental) support for newer Ambient consoles that have the ability to configure a Custom upload server.
Any info on this feature? I noticed Ambient added a new screen to its setup - a "Customized" server. As I'm not totally internet protocol literate, I don't know if this helps those of us with the WS-2902(C).

Here is some of the fields that can be filled in:

Protocol Type Same As: Ambient Weather, Wunderground
Server IP / Hostname :
Path : /weatherstation/updateweatherstation.php?
Station ID:
Station Key:
Port: 80
Upload Interval: 60 Seconds

Re: Ambient Weather WS-2902A

Posted: Tue 19 Jul 2022 6:58 pm
by mcrossley
Yes, that feature was added quite some time ago. The station type is HTTP Ambient - from memory.

Select that station type in the config and it will tell you how to configure the console.

Re: Ambient Weather WS-2902A

Posted: Tue 19 Jul 2022 7:15 pm
by Trasd
mcrossley wrote: Tue 19 Jul 2022 6:58 pm Yes, that feature was added quite some time ago. The station type is HTTP Ambient - from memory.

Select that station type in the config and it will tell you how to configure the console.
You are a scholar and a gentleman, Mark!

Really, thank you for adding the support.

Re: Ambient Weather WS-2902A

Posted: Mon 24 Oct 2022 9:17 am
by mstrandbo
I've had a WS-2902 since release, and wanted to use Cumulus since I was already using it. Didn't care for ambientweather's user interface and presentation.
Since it only delivered the data to their own website (and WU, WeatherCloud), I ended up using their API to extract the data needed, converting some numbers and putting them into a easyweather.dat-file.
Using a powershell script that runs every minutes to fetch and convert the latest data. Been working great with Cumulus1 for the last ... 4 years? Can't remember when I bought the station now.
Recently I migrated ovewr to using CumulusMX, and since it's the same "source" - the easyweather.dat-file, it it was a painless migration.

As for now I'll let it run as it is, it works after all, but I did try to capture the packets from the WS-2902, and it is indeed sending all the information to api.ambientweather.net in cleartext, so I'm thinking in the future I will just capture the packets with the data locally and just forgo the api alltogether.

Re: Ambient Weather WS-2902A

Posted: Wed 02 Nov 2022 9:53 am
by vr34
Hello mstrandbo and Cumulus community,

I recently changed my PWS. My new one is a Bresser 7-in-1 wifi. As yours, my PWS is not in the supported devices list of Cumulus MX.
Thus I added it to WU (stationID = ILESMA30) and made a short python3 script to convert the api.weather.com JSON file to an easyweatherplus.dat file.
My Cumulus MX is installed on a Raspberry. I set crontab to execute my script every minute (* * * * *) to update the dat file.
Here is the py script :

Code: Select all

# -*- coding: utf-8 -*-
# script pour extraire les valeurs de 
# https://api.weather.com/v2/pws/observations/current?stationId=***&format=json&units=m&apiKey=*****

from urllib.request import urlopen
import json

rose = ["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW","N"]

f = urlopen("https://api.weather.com/v2/pws/observations/current?stationId=ILESMA30&format=json&units=m&apiKey=#####
chain = json.load(f)
#codeStation = chain["observations"][0]["stationID"]
chainDateTime = chain["observations"][0]["obsTimeLocal"]
chainDateTime = chainDateTime.replace(" ",",")
outdoorHum = chain["observations"][0]["humidity"]
outdoorTemp = chain["observations"][0]["metric"]["temp"]
dewPoint = chain["observations"][0]["metric"]["dewpt"] # point de rosée
windChill = chain["observations"][0]["metric"]["windChill"] # refroidissement éolien
pressure = chain["observations"][0]["metric"]["pressure"]
windAverage = chain["observations"][0]["metric"]["windSpeed"] # vitesse moyenne du vent
windGust = chain["observations"][0]["metric"]["windGust"] # rafale de vent # Cumulus displays huge unconsistant windgust far from windGust from this JSON. Why ?!??? 
windDirection = chain["observations"][0]["winddir"] # en degrés
windDirectionText = rose[round(int(windDirection)/22.5)]
rainTotal = chain["observations"][0]["metric"]["precipTotal"] # pluie depuis 00:00 (correct? to be verified)
rainLastHour = chain["observations"][0]["metric"]["precipRate"] # pluie / heure = taux de pluie (correct? to be verified)
lightReading = int(126.6 * float(chain["observations"][0]["solarRadiation"])) # en lux (=lumen/m2)
UVindex = chain["observations"][0]["uv"]
easyweatherplus = "0,0,0," + chainDateTime + ",0,0,0," + str(outdoorHum) + "," + str(outdoorTemp) + "," + str(dewPoint) + "," + str(windChill) + ",0," + str(pressure) + "," + str(windAverage) + ",0," + str(windGust) + ",0," + str(windDirection) + "," + windDirectionText + ",0,0,0," + str(rainLastHour) + ",0,0,0," + str(rainTotal) + "," + str(lightReading) + "," + str(UVindex) 
#print (easyweatherplus)
f = open("/home/pi/CumulusMX/easyweatherplus.dat", "w")
f.write(easyweatherplus)
f.close()
You just have to:
- change the code line starting from "f = urlopen..." with your station ID and API key
- crontab -e to edit the cron tasks list. Add the new line " * * * * * python3 /<path>/<name of the py script> "
- configure the station settings in Cumulus MX. 1) in General Settings: Station type: EasyWether, Log interval: 1 minute ; 2) in EasyWeather File Settings: the full path and name of the py file.
- if your PWS can measure light intensity and UV level, check Extra sensors in Common Options.

Cheers
vr34

EDIT: script Python corrected. Post updated 2022/11/03. Everything ok excepted windgust